From 1c10588249e3c14e7befbec28035397ec8ac32be Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 10 Sep 2014 11:22:04 +0000 Subject: [PATCH] Add some CSS during column resize to indicate which columns are fixed and which columns will change when you resize. --- etemplate/js/et2_dataview.js | 5 +++++ etemplate/js/et2_dataview_view_resizeable.js | 9 +++++++-- etemplate/templates/default/etemplate2.css | 7 +++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/etemplate/js/et2_dataview.js b/etemplate/js/et2_dataview.js index 5fbd24001c..365f6b1f30 100644 --- a/etemplate/js/et2_dataview.js +++ b/etemplate/js/et2_dataview.js @@ -386,6 +386,11 @@ var et2_dataview = Class.extend({ .attr("align", "left") .append(cont) .appendTo(this.headTr); + + if(this.columnMgr && this.columnMgr.columns[i]) + { + column.addClass(this.columnMgr.columns[i].fixedWidth ? 'fixedWidth' : 'relativeWidth'); + } // make column resizable var enc_column = self.columnMgr.getColumnById(col.id); diff --git a/etemplate/js/et2_dataview_view_resizeable.js b/etemplate/js/et2_dataview_view_resizeable.js index 5067cd857a..0112a131cd 100644 --- a/etemplate/js/et2_dataview_view_resizeable.js +++ b/etemplate/js/et2_dataview_view_resizeable.js @@ -53,6 +53,9 @@ }; } + // Indicate resizing is in progress + $j(_outerElem).addClass('egwResizing'); + // Reset the "didResize" flag didResize = false; @@ -78,7 +81,7 @@ }) .bind("mouseup", function() { - stopResize(); + stopResize(_outerElem); // Reset text selection _elem[0].onselectstart = null; @@ -93,8 +96,10 @@ } } - function stopResize() + function stopResize(_outerElem) { + + $j(_outerElem).removeClass('egwResizing'); if (helper != null) { helper.remove(); diff --git a/etemplate/templates/default/etemplate2.css b/etemplate/templates/default/etemplate2.css index 139f240899..ebbed90208 100644 --- a/etemplate/templates/default/etemplate2.css +++ b/etemplate/templates/default/etemplate2.css @@ -1149,6 +1149,13 @@ div.et2_progress > div { height: 100%; min-height: 5px; } + +/** + * For resizing (nextmatch columns) + */ +table.egwGridView_outer.egwResizing .fixedWidth { + opacity: 0.5; +} .egwResizeOverlay { position: fixed; width: 100%;