diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/index.html b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/index.html index a48d597185b83466215c040d3a8091dcbcbf6c1c..155af9499b87587e351e00a847ccdc579b41f7dc 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/index.html +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/index.html @@ -55,7 +55,7 @@ <script type="text/javascript" src="./lib/jquery-history/js/bundled/html5/jquery.history.js"></script> <script type="text/javascript" src="./lib/jquery-tooltipster/js/jquery.tooltipster.min.js"></script> <script type="text/javascript" src="./lib/jquery-tsv/js/jquery.tsv-0.96.min.js"></script> - <script type="text/javascript" src="./lib/fuelux/js/fuelux.js"></script> + <script type="text/javascript" src="./lib/fuelux/js/fuelux.min.js"></script> <script type="text/javascript" src="./lib/d3/js/d3.min.js"></script> <script type="text/javascript" src="./lib/d3-dagre/js/dagre-d3.min.js"></script> <script type="text/javascript" src="./lib/naturalsort/js/naturalSort.js"></script> diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/fuelux/js/fuelux.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/fuelux/js/fuelux.js index 56616ab40ccf64ff413aff63c7b7b1516bb17837..55e582f086e64227e5fb6af94a85366fa859f06e 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/fuelux/js/fuelux.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/fuelux/js/fuelux.js @@ -5551,12 +5551,8 @@ return true; } else { for ( j in newCols[ i ] ) { - if ( oldCols[ i ][ j ] !== newCols[ i ][ j ]) { - if(oldCols[ i ][ j ] && newCols[ i ][ j ] && (oldCols[ i ][ j ].name !== newCols[ i ][ j ].name)) { - return true; - } else if(!oldCols[ i ][ j ] && newCols[ i ][ j ] || oldCols[ i ][ j ] && !newCols[ i ][ j ]) { - return true; - } + if ( oldCols[ i ][ j ] !== newCols[ i ][ j ] ) { + return true; } } } diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.js index 202d48452809353339b5fb4e1501568a1bb9af0b..d2391efdfb0e3d1018e9503147ad0b04c83c6d49 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/lib/grid/js/Grid.js @@ -28,6 +28,7 @@ $.extend(Grid.prototype, { if(isMultiselectable) { this.addMultiSelect(columnsFirst); } + this.lastUsedColumns = []; }, addMultiSelect : function(columns) { var _this = this; @@ -612,7 +613,40 @@ $.extend(Grid.prototype, { thisGrid.columnsDynamic = thisGrid.columnsDynamicFunc(dataList); } thisGrid.renderColumnDropdown(thisGrid.getAllColumns()); - result.columns = thisGrid.getVisibleColumns(); + + if(!thisGrid.lastUsedColumns || thisGrid.lastUsedColumns.length === 0) { + thisGrid.lastUsedColumns = thisGrid.getVisibleColumns(); + result.columns = thisGrid.lastUsedColumns; + } else { + var newColumns = thisGrid.getVisibleColumns(); + if(newColumns.length === thisGrid.lastUsedColumns.length) { //No changes + + } else if(newColumns.length > thisGrid.lastUsedColumns.length) { //We added one column, first not matching column, we add to last used + var newLastUsedColumns = []; + for(var cIdx = 0; cIdx < thisGrid.lastUsedColumns.length; cIdx++) { + newLastUsedColumns.push(thisGrid.lastUsedColumns[cIdx]); + } + for(var cIdx = 0; cIdx < newColumns.length; cIdx++) { + if(newColumns[cIdx].property !== newLastUsedColumns[cIdx].property) { + newLastUsedColumns.splice(cIdx, 0, newColumns[cIdx]); + } + } + thisGrid.lastUsedColumns = newLastUsedColumns; + result.columns = thisGrid.lastUsedColumns; + } else { //We removed one column, first not matching column, we remove from last used + var newLastUsedColumns = []; + for(var cIdx = 0; cIdx < thisGrid.lastUsedColumns.length; cIdx++) { + newLastUsedColumns.push(thisGrid.lastUsedColumns[cIdx]); + } + for(var cIdx = 0; cIdx < newColumns.length; cIdx++) { + if(newColumns[cIdx].property !== newLastUsedColumns[cIdx].property) { + newLastUsedColumns.splice(cIdx, 1); + } + } + thisGrid.lastUsedColumns = newLastUsedColumns; + result.columns = thisGrid.lastUsedColumns; + } + } if(dataList.length === 0) { //Special case, empty table result.start = 0; @@ -639,6 +673,7 @@ $.extend(Grid.prototype, { bugHeader.remove(); } } + //HACK: Legacy Hacks no longer needed $(window).trigger('resize'); // HACK: Fixes table rendering issues when refreshing the grid on fuelux 3.1.0 for all browsers $(thisGrid.panel).hide().show(0); // HACK: Fixes Chrome rendering issues when refreshing the grid on fuelux 3.1.0 @@ -664,7 +699,7 @@ $.extend(Grid.prototype, { } } - }, 1); + }, 100); }, options); },