diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js index 17077297ffc20ee882703d3d7a2daad8f210b7c7..388bc19b4b4cee600d46dad6df5070ae5a779bef 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js @@ -113,6 +113,12 @@ $.extend(DefaultProfile.prototype, { } this.isAdmin = false; + + this.forcedDisableRTF = ["NAME", "SEQUENCE"]; + this.isForcedDisableRTF = function(propertytype) { + return (propertytype && $.inArray(propertytype.code, this.forcedDisableRTF) !== -1); + } + this.searchDomains = [ { "@id" : -1, "@type" : "GobalSearch", label : "Global", name : "global"}]; this.inventorySpaces = ["MATERIALS", "METHODS"]; //"STOCK_CATALOG" this.inventorySpacesReadOnly = []; //"STOCK_ORDERS" diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js index 81b6775270ed8121e2d183d129752902c46c904d..ffaa033c6cc1926cbae6c106b20201242755068c 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/FormUtil.js @@ -733,20 +733,24 @@ var FormUtil = new function() { // // Rich Text Editor Support - (CKEditor) // - var isCKEditorConfigured = false; - this.activateRichTextProperties = function($component, componentOnChange) { - if(!isCKEditorConfigured) { - CKEDITOR.on( 'instanceReady', function( ev ) { - ev.editor.dataProcessor.writer.selfClosingEnd = ' />'; + CKEDITOR.on( 'instanceReady', function( ev ) { + ev.editor.dataProcessor.writer.selfClosingEnd = ' />'; + }); + + this.activateRichTextProperties = function($component, componentOnChange, propertyType) { + + if(profile.isForcedDisableRTF(propertyType)) { + $component.change(function(event) { + componentOnChange(event, $(this).val()); + }); + } else { + var editor = $component.ckeditor().editor; + editor.on('change', function(event) { + var value = event.editor.getData(); + componentOnChange(event, value); }); - isCKEditorConfigured = true; } - var editor = $component.ckeditor().editor; - editor.on('change', function(event) { - var value = event.editor.getData(); - componentOnChange(event, value); - }); return $component; } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormView.js index 134bd6acb218ca416fc8afe7c06bf5b0fc1a74a9..423352ac3e0ef16bc0622862c3ea894332e40add 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormView.js @@ -496,7 +496,7 @@ function DataSetFormView(dataSetFormController, dataSetFormModel) { } if(propertyType.dataType === "MULTILINE_VARCHAR") { - $component = FormUtil.activateRichTextProperties($component, changeEvent(propertyType)); + $component = FormUtil.activateRichTextProperties($component, changeEvent(propertyType), propertyType); } else if(propertyType.dataType === "TIMESTAMP") { $component.on("dp.change", changeEvent(propertyType)); } else { diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormView.js index 242ef4802bbbccd896b0260944b398f014502c46..9153d0d344d35ade42c07dea00e7719e325d0910 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormView.js @@ -445,7 +445,7 @@ function ExperimentFormView(experimentFormController, experimentFormModel) { } if(propertyType.dataType === "MULTILINE_VARCHAR") { - $component = FormUtil.activateRichTextProperties($component, changeEvent(propertyType)); + $component = FormUtil.activateRichTextProperties($component, changeEvent(propertyType), propertyType); } else if(propertyType.dataType === "TIMESTAMP") { $component.on("dp.change", changeEvent(propertyType)); } else { diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormView.js index 3b761705d72bca677dea3bdf3f58f9860d71e6df..fa9d1c38ae44ade13bc6ed4de6945444b7628ab2 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormView.js @@ -152,7 +152,7 @@ function ProjectFormView(projectFormController, projectFormModel) { _this._projectFormModel.isFormDirty = true; }; $textBox.val(description); - $textBox = FormUtil.activateRichTextProperties($textBox, textBoxEvent); + $textBox = FormUtil.activateRichTextProperties($textBox, textBoxEvent, null); $formColumn.append(FormUtil.getFieldForComponentWithLabel($textBox, "Description")); } else { $formColumn.append(FormUtil.getFieldForLabelWithText("Description", description)); diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js index 305efc525d68bdffee5ffab2d98021fb2d7caab5..47b71c52682c0b79867c3c48deb9ee93286fca42 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js @@ -572,7 +572,7 @@ function SampleFormView(sampleFormController, sampleFormModel) { } if(propertyType.dataType === "MULTILINE_VARCHAR") { - $component = FormUtil.activateRichTextProperties($component, changeEvent(propertyType)); + $component = FormUtil.activateRichTextProperties($component, changeEvent(propertyType), propertyType); } else if(propertyType.dataType === "TIMESTAMP") { $component.on("dp.change", changeEvent(propertyType)); } else {