Skip to content

Commit

Permalink
[IMP] Display the CMIS widget in edit mode.
Browse files Browse the repository at this point in the history
In some cases it's useful to have access to the preview of one document when filling the html form to copy/paste information from document into the form.
  • Loading branch information
lmignon committed Jan 4, 2017
1 parent 8d4cc5d commit ef2cbb8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
9.0.?.?.? (?)
~~~~~~~~~~~~~

* Improvement: Display the CMIS widget in edit mode. In some cases it's useful
to have access to the preview of one document when filling the html form to
copy/paste information from document into the form.
* Improvement: The name used to create the folder in CMIS is automatically sanitized.
This feature can be deactivated by a flag on the backend configuration and it's also
possible to specify the character to use as replacement to invalid characters.
Expand Down
8 changes: 4 additions & 4 deletions cmis_web/static/src/js/form_widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,8 @@ var CmisMixin = {
if (this.$el.is(':visible')){
this.render_datatable();
}
if (this.field_manager.get("actual_mode") !== "view"){
// hide the widget in edit mode
if (!this.getParent().datarecord.id){
// hide the widget if the record is not yet created
this.$el.hide();
} else {
this.$el.toggle(!this.invisible);
Expand All @@ -567,8 +567,8 @@ var CmisMixin = {
if (this.$input) {
this.$input.val(value);
}
if (this.field_manager.get("actual_mode") !== "view"){
// hide the widget in edit mode
if (!this.getParent().datarecord.id){
// hide the widget if the record is not yet created
this.$el.hide();
}
this.$el.find('button.cmis-create-root').addClass('hidden');
Expand Down

0 comments on commit ef2cbb8

Please sign in to comment.