[eGroupWare-svn] r56012 - in /trunk/egroupware/api/js/etemplate: et2_dataview_model_columns.js et2_extension_nextmatch.js

[email protected] Wed, 04 May 2016 15:48:58 -0000
Newsgroups gmane.comp.web.egroupware.cvs
Message-ID <[email protected]>
Author: nathangray
Date: Wed May  4 17:48:58 2016
New Revision: 56012

URL: http://svn.stylite.de/viewvc/egroupware?rev=56012&view=rev
Log:
Properly handle nextmatch columns where the width is not set

Modified:
    trunk/egroupware/api/js/etemplate/et2_dataview_model_columns.js
    trunk/egroupware/api/js/etemplate/et2_extension_nextmatch.js

Modified: trunk/egroupware/api/js/etemplate/et2_dataview_model_columns.js
URL: http://svn.stylite.de/viewvc/egroupware/trunk/egroupware/api/js/etemplate/et2_dataview_model_columns.js?rev=56012&r1=56011&r2=56012&view=diff
==============================================================================
--- trunk/egroupware/api/js/etemplate/et2_dataview_model_columns.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_dataview_model_columns.js Wed May  4 17:48:58 2016
@@ -90,12 +90,19 @@
 		this.initAttributes(_attrs);
 	},
 
+	/**
+	 * Set the column width
+	 *
+	 * Posible value types are:
+	 * 	1. "100" => fixedWidth 100px
+	 * 	2. "100px" => fixedWidth 100px
+	 *	3. "50%" => relativeWidth 50%
+	 *	4. 0.5 => relativeWidth 50%
+	 *
+	 * @param {float|string} _value
+	 */
 	set_width: function(_value) {
-		// Parse the width parameter. Posible values are:
-		// 	1. "100" => fixedWidth 100px
-		// 	2. "100px" => fixedWidth 100px
-		// 	3. "50%" => relativeWidth 50%
-		// 	4. 0.5 => relativeWidth 50%
+		// Parse the width parameter. 
 		this.relativeWidth = false;
 		this.fixedWidth = false;
 		var w = _value;
@@ -408,7 +415,7 @@
 				if(this.columns[columnIndex].visibility === ET2_COL_VISIBILITY_INVISIBLE ||
 					this.columns[columnIndex].visibility === ET2_COL_VISIBILITY_DISABLED ||
 					this.columnWidths[columnIndex] <= 0 ||
-					this.columnWidths[columnIndex] <= this.columns[columnIndex].minWidth)
+					remaining_width > 0 && this.columnWidths[columnIndex] <= this.columns[columnIndex].minWidth)
 				{
 					continue;
 				}

Modified: trunk/egroupware/api/js/etemplate/et2_extension_nextmatch.js
URL: http://svn.stylite.de/viewvc/egroupware/trunk/egroupware/api/js/etemplate/et2_extension_nextmatch.js?rev=56012&r1=56011&r2=56012&view=diff
==============================================================================
--- trunk/egroupware/api/js/etemplate/et2_extension_nextmatch.js (original)
+++ trunk/egroupware/api/js/etemplate/et2_extension_nextmatch.js Wed May  4 17:48:58 2016
@@ -1061,6 +1061,12 @@
 				"visibility": visibility,
 				"width": _colData[x] ? _colData[x].width : 0
 			};
+			if(_colData[x].width === 'auto')
+			{
+				// Column manager does not understand 'auto', which grid widget
+				// uses if width is not set
+				columnData[x].width = '100%';
+			}
 			if(_colData[x].minWidth)
 			{
 				columnData[x].minWidth = _colData[x].minWidth;


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z