Grid.js (PHProjekt-6.2.0) | : | Grid.js (PHProjekt-6.2.1) | ||
---|---|---|---|---|
skipping to change at line 505 | skipping to change at line 505 | |||
editable: false | editable: false | |||
}); | }); | |||
this.filterField.push({ | this.filterField.push({ | |||
key: meta[i].key, | key: meta[i].key, | |||
label: meta[i].label, | label: meta[i].label, | |||
type: 'text' | type: 'text' | |||
}); | }); | |||
break; | break; | |||
case 'rating': | case 'rating': | |||
var max = parseInt(meta[i].range.id); | var max = parseInt(meta[i].range.id, 10); | |||
opts = []; | opts = []; | |||
vals = []; | vals = []; | |||
maxLength = meta[i].key.length; | maxLength = meta[i].key.length; | |||
for (var j = 1; j <= max; j++) { | for (var j = 1; j <= max; j++) { | |||
vals.push(j); | vals.push(j); | |||
opts.push(j); | opts.push(j); | |||
} | } | |||
this.gridLayout.push({ | this.gridLayout.push({ | |||
name: meta[i].label, | name: meta[i].label, | |||
field: meta[i].key, | field: meta[i].key, | |||
skipping to change at line 1176 | skipping to change at line 1176 | |||
dojo.cookie(this._sortAscCookie, sortAsc, {expires: 365}); | dojo.cookie(this._sortAscCookie, sortAsc, {expires: 365}); | |||
}, | }, | |||
loadGridSorting: function() { | loadGridSorting: function() { | |||
// Summary: | // Summary: | |||
// Retrieves from cookies the sorting criterion for the current grid if any | // Retrieves from cookies the sorting criterion for the current grid if any | |||
// Use the hash for identify the cookie | // Use the hash for identify the cookie | |||
var sortColumn = dojo.cookie(this._sortColumnCookie); | var sortColumn = dojo.cookie(this._sortColumnCookie); | |||
var sortAsc = dojo.cookie(this._sortAscCookie); | var sortAsc = dojo.cookie(this._sortAscCookie); | |||
if (sortColumn !== undefined && sortAsc !== undefined) { | if (sortColumn !== undefined && sortAsc !== undefined) { | |||
this.grid.setSortIndex(parseInt(sortColumn), eval(sortAsc)); | this.grid.setSortIndex(parseInt(sortColumn, 10), eval(sortAsc)); | |||
} | } | |||
}, | }, | |||
doDblClick: function(e) { | doDblClick: function(e) { | |||
// Summary: | // Summary: | |||
// Process a double click | // Process a double click | |||
if (this._doubleClickTimer !== null) { | if (this._doubleClickTimer !== null) { | |||
window.clearTimeout(this._doubleClickTimer); | window.clearTimeout(this._doubleClickTimer); | |||
this._doubleClickTimer = null; | this._doubleClickTimer = null; | |||
} | } | |||
skipping to change at line 1216 | skipping to change at line 1216 | |||
if ((useCheckBox && usePencilForEdit && index == 1) || | if ((useCheckBox && usePencilForEdit && index == 1) || | |||
(!useCheckBox && usePencilForEdit && index === 0) || | (!useCheckBox && usePencilForEdit && index === 0) || | |||
(this.firstExtraCol && index >= this.firstExtraCol)) { | (this.firstExtraCol && index >= this.firstExtraCol)) { | |||
if ((useCheckBox && index == 1) || (!useCheckBox && index === 0) ) { | if ((useCheckBox && index == 1) || (!useCheckBox && index === 0) ) { | |||
// Click on the pencil | // Click on the pencil | |||
openForm = true; | openForm = true; | |||
} else { | } else { | |||
var key = e.cell.field; | var key = e.cell.field; | |||
var temp = key.split('|'); | var temp = key.split('|'); | |||
var action = temp[0]; | var action = temp[0]; | |||
var mode = parseInt(temp[1]); | var mode = parseInt(temp[1], 10); | |||
var item = this.grid.getItem(e.rowIndex); | var item = this.grid.getItem(e.rowIndex); | |||
var rowId = this.grid.store.getValue(item, 'id'); | var rowId = this.grid.store.getValue(item, 'id'); | |||
// Click on an extra action button | // Click on an extra action button | |||
this.doAction(action, rowId, mode, this.TARGET_SINGLE); | this.doAction(action, rowId, mode, this.TARGET_SINGLE); | |||
} | } | |||
} else { | } else { | |||
// Click on the row | // Click on the row | |||
openForm = true; | openForm = true; | |||
} | } | |||
skipping to change at line 1376 | skipping to change at line 1376 | |||
} | } | |||
} | } | |||
if (ids.length > 0) { | if (ids.length > 0) { | |||
var idsSend = ids.join(','); | var idsSend = ids.join(','); | |||
var select = this._gridComboAction; | var select = this._gridComboAction; | |||
var key = select.value; | var key = select.value; | |||
if (key !== null) { | if (key !== null) { | |||
var temp = key.split('|'); | var temp = key.split('|'); | |||
var action = temp[0]; | var action = temp[0]; | |||
var mode = parseInt(temp[1]); | var mode = parseInt(temp[1], 10); | |||
// Check for multiple rows | // Check for multiple rows | |||
var actionName = select.children[select.selectedIndex].text; | var actionName = select.children[select.selectedIndex].text; | |||
this.garbageCollector.addNode( | this.garbageCollector.addNode( | |||
phpr.confirmDialog(dojo.hitch(this, function() { | phpr.confirmDialog(dojo.hitch(this, function() { | |||
this.doAction(action, idsSend, mode, this.TARGET _MULTIPLE); | this.doAction(action, idsSend, mode, this.TARGET _MULTIPLE); | |||
}), | }), | |||
phpr.nls.get('Please confirm the following action:') + ' "' + | phpr.nls.get('Please confirm the following action:') + ' "' + | |||
actionName + '"<br />(' + ids.length + ' ' + | actionName + '"<br />(' + ids.length + ' ' + | |||
phpr.nls.get('rows selected') + ')')); | phpr.nls.get('rows selected') + ')')); | |||
End of changes. 4 change blocks. | ||||
4 lines changed or deleted | 4 lines changed or added |