Author: hnategh
New Revision: 55324
URL: http://svn.stylite.de/viewvc/egroupware?rev=55324&view=rev
Log:
Revert commit 55312 because of breaking nm in mobile theme. It needs more investigation
Modified:
trunk/etemplate/js/et2_dataview_model_columns.js
trunk/etemplate/js/et2_extension_nextmatch.js
trunk/etemplate/js/et2_extension_nextmatch_controller.js
trunk/etemplate/js/et2_widget_grid.js
— trunk/etemplate/js/et2_dataview_model_columns.js (original)
+++ trunk/etemplate/js/et2_dataview_model_columns.js Wed Mar 9 11:31:29 2016
@@ -21,7 +21,6 @@
var ET2_COL_VISIBILITY_VISIBLE = 1;
var ET2_COL_VISIBILITY_INVISIBLE = 2;
var ET2_COL_VISIBILITY_ALWAYS_NOSELECT = 3;
-var ET2_COL_VISIBILITY_DISABLED = 4;
/**
- Class which stores the data of a single column.
@@ -252,9 +251,7 @@
result.push({
“id”: this.columns[i].id,
“width”: this.getColumnWidth(i),
@@ -275,7 +272,6 @@
result[this.columns[i].id] = {
“caption”: this.columns[i].caption,
“enabled”: (this.columns[i].visibility != ET2_COL_VISIBILITY_ALWAYS) &&
@@ -331,9 +327,7 @@
for (var i = 0; i < this.columns.length; i++)
{
var col = this.columns[i];
@@ -362,9 +356,7 @@
{
var w = 0;
var col = this.columns[i];
@@ -403,8 +395,7 @@
// Pick the first relative column and use it
for(columnIndex = 0; columnIndex < this.columns.length; columnIndex++)
{
— trunk/etemplate/js/et2_extension_nextmatch.js (original)
+++ trunk/etemplate/js/et2_extension_nextmatch.js Wed Mar 9 11:31:29 2016
@@ -850,9 +850,9 @@
for(var i = 0; i < _row.length; i++)
{
colName = ‘’;
@@ -873,14 +873,14 @@
}
// Resets field visibility too
_row[i].widget._getColumnName();
@@ -907,12 +907,12 @@
{
if(columnDisplay[j] == colName)
{
@@ -1047,18 +1047,12 @@
“widget”: _row[x].widget
},_colData[x]);
-
var visibility = (!_colData[x] || _colData[x].visible) ?
-
ET2_COL_VISIBILITY_VISIBLE :
-
ET2_COL_VISIBILITY_INVISIBLE;
-
if(_colData[x].disabled && _colData[x].disabled !=='' &&
-
this.getArrayMgr("content").parseBoolExpression(_colData[x].disabled))
-
{
-
visibility = ET2_COL_VISIBILITY_DISABLED;
-
}
-
"visibility": (!_colData[x] || _colData[x].disabled) ?
-
ET2_COL_VISIBILITY_INVISIBLE : ET2_COL_VISIBILITY_VISIBLE,
"width": _colData[x] ? _colData[x].width : 0
};
if(_colData[x].minWidth)
@@ -1148,7 +1142,7 @@
columnWidgets[x] = _row[x].widget;
}
// Pass along column alignment
@@ -1301,9 +1295,8 @@
{
var col = columnMgr.columns[i];
var widget = this.columns[i].widget;
@@ -1376,8 +1369,7 @@
for (var i = 0; i < columnMgr.columns.length; i++)
{
var col = columnMgr.columns[i];
— trunk/etemplate/js/et2_extension_nextmatch_controller.js (original)
+++ trunk/etemplate/js/et2_extension_nextmatch_controller.js Wed Mar 9 11:31:29 2016
@@ -581,27 +581,6 @@
}
}
}
-
// Might be trying to disable a column
-
var col_refresh = false;
-
for(var column_index = 0; column_index < nm.columns.length; column_index++)
-
{
-
if(typeof nm.columns[column_index].disabled === 'string' &&
-
nm.columns[column_index].disabled[0] === '@')
-
{
-
col_refresh = true;
-
nm.dataview.columnMgr.getColumnById('col_'+column_index)
-
.set_visibility(
-
mgr.parseBoolExpression(nm.columns[column_index].disabled) ?
-
ET2_COL_VISIBILITY_DISABLED :
-
ET2_COL_VISIBILITY_VISIBLE
-
);
-
}
-
}
-
if(col_refresh)
-
{
-
nm.dataview.columnMgr.updated = true;
-
nm.dataview._updateColumns();
-
}
// If we're doing an autorefresh and the count decreases, preserve the
// selection or it will be lost when the grid rows are shuffled. Increases
— trunk/etemplate/js/et2_widget_grid.js (original)
+++ trunk/etemplate/js/et2_widget_grid.js Wed Mar 9 11:31:29 2016
@@ -107,16 +107,12 @@
// Initialize the cell description objects
for (var x = 0; x < w; x++)
{
-
// Some columns (nm) we do not parse into a boolean
-
var col_disabled = typeof _colData[x].disabled == 'boolean' ?
-
_colData[x].disabled :
-
this.getArrayMgr("content").parseBoolExpression(_colData[x].disabled);
cells[y][x] = {
"td": null,
"widget": null,
"colData": _colData[x],
"rowData": _rowData[y],
-
"disabled": col_disabled || _rowData[y].disabled,
-
"disabled": _colData[x].disabled || _rowData[y].disabled,
"class": _colData[x]["class"],
"colSpan": 1,
"autoColSpan": false,
@@ -175,22 +171,10 @@
},
_fetchRowColData: function(columns, rows, colData, rowData) {
-
// Some things cannot be done inside a nextmatch - nm will do the expansion later
-
var nm = false;
-
var widget = this;
-
while(!nm && widget != this.getRoot())
-
{
-
nm = (widget._type == 'nextmatch');
-
widget = widget.getParent();
-
}
-
// Parse the columns tag
et2_filteredNodeIterator(columns, function(node, nodeName) {
var colDataEntry = this._getColDataEntry();
-
// This cannot be done inside a nm, it will expand it later
-
colDataEntry["disabled"] = nm ?
-
et2_readAttrWithDefault(node, "disabled", "") :
-
this.getArrayMgr("content")
@@ -270,6 +254,12 @@
// Old etemplate checked first two widgets, or first two box children
// This cannot be done inside a nextmatch - nm will do the expansion later
var nm = false;
-
var widget = this;
-
while(!nm && widget != this.getRoot())
-
{
-
nm = (widget._type == 'nextmatch');
-
widget = widget.getParent();
-
}
if(nm)
{
// No further checks for repeated rows
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs