diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/LayoutManager.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/LayoutManager.js index 95955113349e654729ca6b7204ff2cb34e10e588..7e69a608a4c025242cf01ed5c3939c734ace605a 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/LayoutManager.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/controllers/LayoutManager.js @@ -23,7 +23,6 @@ var LayoutManager = { thirdColumn : null, isResizingColumn : false, isLoadingView : false, - isBlocked : false, _init : function(isFirstTime) { var _this = this; @@ -339,8 +338,7 @@ var LayoutManager = { } }, canReload : function() { - return this.isBlocked == false && - this.isResizingColumn === false && + return this.isResizingColumn === false && this.isLoadingView === false && this.firstColumn.width() > 0; }, @@ -384,6 +382,23 @@ var LayoutManager = { } } +var rtime; +var timeout = false; +var delta = 200; + $(window).resize(function() { - LayoutManager.resize(mainController.views, true); -}); \ No newline at end of file + rtime = new Date(); + if (timeout === false) { + timeout = true; + setTimeout(resizeend, delta); + } +}); + +function resizeend() { + if (new Date() - rtime < delta) { + setTimeout(resizeend, delta); + } else { + timeout = false; + LayoutManager.resize(mainController.views, true); + } +} 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 b01023d07758148af16ba3613405e53433c81cc7..83fd0a6ef0496109cdcb69ffe3480e55ed520466 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 @@ -816,12 +816,26 @@ var FormUtil = new function() { $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); - }); + } else { + var destroyAndRecreate = function($component) { + return function() { + if($component.editor) { + $component.editor.destroy(); + delete $component.editor; + } + var editor = $component.ckeditor().editor; + editor.on('change', function(event) { + var value = event.editor.getData(); + componentOnChange(event, value); + }); + } + } + + var destroyAndRecreateFunc = destroyAndRecreate($component); + + destroyAndRecreateFunc(); + + LayoutManager.addResizeEventHandler(destroyAndRecreateFunc); } 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 f041c1b5252edf29ffc6cd256f4938f49bf3cdf9..ac938eb6f73d582e280a5646caa71b4df9ccd713 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 @@ -22,10 +22,6 @@ function DataSetFormView(dataSetFormController, dataSetFormModel) { var $container = views.content; var _this = this; - if(!this._dataSetFormModel.isMini && this._dataSetFormModel.mode !== FormMode.VIEW) { - LayoutManager.isBlocked = true; // CKEDITOR owns hooks and variables that will break if the layout manager does its magic - } - //Clean and prepare container var $wrapper = $('<form>', { 'id' : 'mainDataSetForm', 'role' : 'form'}); if(this._dataSetFormModel.isMini) { 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 ba563f6106b80dc25b69989920ce13e783354736..2963624187dc165c9fe686678b413bb224a87967 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 @@ -29,10 +29,6 @@ function ExperimentFormView(experimentFormController, experimentFormModel) { 'action' : 'javascript:void(0);' }); - if(this._experimentFormModel.mode !== FormMode.VIEW) { - LayoutManager.isBlocked = true; // CKEDITOR owns hooks and variables that will break if the layout manager does its magic - } - var $rightPanel = null; if(this._experimentFormModel.mode === FormMode.VIEW) { $rightPanel = views.auxContent; 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 c3b21666e7bc9ae33f3325efb968b6318a402658..68e9fc8b2e7de9809a144d9f91a819fa1e36c75b 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 @@ -32,10 +32,6 @@ function SampleFormView(sampleFormController, sampleFormModel) { 'action' : 'javascript:void(0);' }); - if(this._sampleFormModel.mode !== FormMode.VIEW) { - LayoutManager.isBlocked = true; // CKEDITOR owns hooks and variables that will break if the layout manager does its magic - } - var $rightPanel = null; if(this._sampleFormModel.mode === FormMode.VIEW) { $rightPanel = views.auxContent;