diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/master-data/custom_widget_migration.sql b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/master-data/custom_widget_migration.sql new file mode 100644 index 0000000000000000000000000000000000000000..2eebf361c1b4ae0d4adb5815d28b6bca9df3a59c --- /dev/null +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/master-data/custom_widget_migration.sql @@ -0,0 +1 @@ +UPDATE property_types SET meta_data = '{ "custom_widget" : "word_processor" }'::jsonb WHERE id IN (SELECT id FROM property_types WHERE daty_id = (SELECT id FROM data_types WHERE code = 'MULTILINE_VARCHAR')); \ No newline at end of file diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/css/style.css b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/css/style.css index 72e7c4f33bf4f72a8c8bf6908d290c5e2139aef3..aab016d67217035d3eccdf3be19dd960a8d226f4 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/css/style.css +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/css/style.css @@ -780,4 +780,9 @@ span.fancytree-custom-icon { .jcolor-content > table > tr > td { padding : 7px !important; +} + +.jexcel > thead > tr > td { + position : relative !important; + z-index : auto !important; } \ No newline at end of file diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/JExcelEditorManager.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/JExcelEditorManager.js index e90a5308bb9fb85927c1c89cc18fa5cde8e36e58..0d98d8d6747439d04240a1906a3f49d73c21b8f9 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/JExcelEditorManager.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/JExcelEditorManager.js @@ -6,15 +6,17 @@ var JExcelEditorManager = new function() { var _this = this; return function() { var jExcelEditor = _this.jExcelEditors[guid]; - var data = jExcelEditor.getData(); - var style = jExcelEditor.getStyle(); - var meta = jExcelEditor.getMeta(); - var jExcelEditorValue = { - data : data, - style : style, - meta : meta + if(jExcelEditor) { + var data = jExcelEditor.getData(); + var style = jExcelEditor.getStyle(); + var meta = jExcelEditor.getMeta(); + var jExcelEditorValue = { + data : data, + style : style, + meta : meta + } + entity.properties[propertyCode] = "<DATA>" + JSON.stringify(jExcelEditorValue) + "</DATA>"; } - entity.properties[propertyCode] = "<DATA>" + JSON.stringify(jExcelEditorValue) + "</DATA>"; } } @@ -56,15 +58,36 @@ var JExcelEditorManager = new function() { { type:'color', content:'format_color_fill', k:'background-color' }, ]; } - var jexcelField = jexcel($container[0], { + + var options = { data: data, style: style, meta: meta, editable : mode == FormMode.EDIT, minDimensions:[30, 30], toolbar: toolbar, - onchange: onChangeHandler - }); + onchange: onChangeHandler, + onchangestyle: onChangeHandler, + onchangemeta: onChangeHandler + + }; + + if(mode != FormMode.EDIT) { + options.allowInsertRow = false; + options.allowManualInsertRow = false; + options.allowInsertColumn = false; + options.allowManualInsertColumn = false; + options.allowDeleteRow = false; + options.allowDeleteColumn = false; + options.allowRenameColumn = false; + options.allowComments = false; + + options.contextMenu = function(obj, x, y, e) { + return []; + } + } + + var jexcelField = jexcel($container[0], options); this.jExcelEditors[guid] = jexcelField; } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/jexcel/VERSION.txt b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/jexcel/VERSION.txt index 3e1700eef08ba52b40d2d8f4e0d85ff6b491d4bc..4e48a183b1e04b13e790490acc20f37e0b25afd3 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/jexcel/VERSION.txt +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/jexcel/VERSION.txt @@ -1 +1 @@ -3.4 from Master \ No newline at end of file +3.4.1 from Master 2019.08.08 \ No newline at end of file diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/jexcel/jexcel.css b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/jexcel/jexcel.css index 3b5711f7b21853b49e8d95e43e16fed5fb2e9471..55d0153866db4889f77742f1f0984696bbf9eb29 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/jexcel/jexcel.css +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/jexcel/jexcel.css @@ -1,5 +1,5 @@ /** - * (c) jExcel v3.4.0 + * (c) jExcel v3.4.1 * * Author: Paul Hodel <paul.hodel@gmail.com> * Website: https://bossanova.uk/jexcel/ diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/jexcel/jexcel.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/jexcel/jexcel.js index 7896bf64ea144494a7ef4577a73a3993a249977b..eb9fd03d45440fc121bae03209cdf633dc6a8265 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/jexcel/jexcel.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/jexcel/jexcel.js @@ -1,5 +1,5 @@ /** - * (c) jExcel v3.4.0 + * (c) jExcel v3.4.1 * * Author: Paul Hodel <paul.hodel@gmail.com> * Website: https://bossanova.uk/jexcel/ @@ -136,6 +136,8 @@ var jexcel = (function(el, options) { onchangeheader:null, oneditionstart:null, oneditionend:null, + onchangestyle:null, + onchangemeta:null, // Customize any cell behavior updateTable:null, // Texts @@ -173,7 +175,7 @@ var jexcel = (function(el, options) { noCellsSelected: 'No cells selected', }, // About message - about:"jExcel CE Spreadsheet\nVersion 3.4.0\nAuthor: Paul Hodel <paul.hodel@gmail.com>\nWebsite: https://jexcel.net/v3", + about:"jExcel CE Spreadsheet\nVersion 3.4.1\nAuthor: Paul Hodel <paul.hodel@gmail.com>\nWebsite: https://jexcel.net/v3", }; // Loading initial configuration from user @@ -2629,6 +2631,12 @@ var jexcel = (function(el, options) { } } } + + if (obj.ignoreEvents != true) { + if (typeof(obj.options.onchangemeta) == 'function') { + obj.options.onchangemeta(el, o, k, v); + } + } } /** @@ -2776,6 +2784,12 @@ var jexcel = (function(el, options) { newValue: newValue, }); } + + if (obj.ignoreEvents != true) { + if (typeof(obj.options.onchangestyle) == 'function') { + obj.options.onchangestyle(el, o, k, v); + } + } } /** @@ -4721,9 +4735,10 @@ var jexcel = (function(el, options) { if (query) { // Search filter - var search = function(item, query) { + var search = function(item, query, index) { for (var i = 0; i < item.length; i++) { - if ((''+item[i]).toLowerCase().search(query) >= 0) { + if ((''+item[i]).toLowerCase().search(query) >= 0 || + (''+obj.records[index][i].innerHTML).toLowerCase().search(query) >= 0) { return true; } } @@ -4739,7 +4754,7 @@ var jexcel = (function(el, options) { // Filter var data = obj.options.data.filter(function(v, k) { - if (search(v, query)) { + if (search(v, query, k)) { // Merged rows found var rows = obj.isRowMerged(k); if (rows.length) {