forked from extern/egroupware
Some more code cleanup:
- Remove some unexecutable code - Fix some variable declarations (to satisfy Scrutenizer)
This commit is contained in:
parent
eb51009ebd
commit
ceea2cb976
@ -643,12 +643,12 @@ function egwPopupActionImplementation()
|
||||
var paste_action = mgr.getActionById('egw_paste');
|
||||
|
||||
// Fake UI so we can simulate the position of the drop
|
||||
var ui = {
|
||||
position: {top: 0, left: 0},
|
||||
offset: {top: 0, left: 0}
|
||||
};
|
||||
if(this._context.event)
|
||||
{
|
||||
var ui = {
|
||||
position: {top: 0, left: 0},
|
||||
offset: {top: 0, left: 0}
|
||||
};
|
||||
var event = this._context.event.originalEvent;
|
||||
ui.position = {top: event.pageY, left: event.pageX};
|
||||
ui.offset = {top: event.offsetY, left: event.offsetX};
|
||||
|
@ -87,60 +87,6 @@ function egw_json_encode(input)
|
||||
{
|
||||
egw.debug("warn", "Function %s is deprecated, use egw.jsonEncode() instead", arguments.callee.name);
|
||||
return egw.jsonEncode(input);
|
||||
if (input == null || !input && input.length == 0) return 'null';
|
||||
|
||||
var simple_res = _egw_json_encode_simple(input);
|
||||
if (simple_res == null)
|
||||
{
|
||||
switch (input.constructor)
|
||||
{
|
||||
case Array:
|
||||
var buf = [];
|
||||
for (var k in input)
|
||||
{
|
||||
//Filter non numeric entries
|
||||
if (!isNaN(k))
|
||||
buf.push(egw_json_encode(input[k]));
|
||||
}
|
||||
return '[' + buf.join(',') + ']';
|
||||
|
||||
case Object:
|
||||
var buf = [];
|
||||
for (var k in input)
|
||||
{
|
||||
buf.push(_egw_json_encode_simple(k) + ':' + egw_json_encode(input[k]));
|
||||
}
|
||||
return '{' + buf.join(',') + '}';
|
||||
|
||||
default:
|
||||
switch(typeof input)
|
||||
{
|
||||
case 'array':
|
||||
var buf = [];
|
||||
for (var k in input)
|
||||
{
|
||||
//Filter non numeric entries
|
||||
if (!isNaN(k))
|
||||
buf.push(egw_json_encode(input[k]));
|
||||
}
|
||||
return '[' + buf.join(',') + ']';
|
||||
|
||||
case 'object':
|
||||
var buf = [];
|
||||
for (var k in input)
|
||||
{
|
||||
buf.push(_egw_json_encode_simple(k) + ':' + egw_json_encode(input[k]));
|
||||
}
|
||||
return '{' + buf.join(',') + '}';
|
||||
|
||||
}
|
||||
return 'null';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return simple_res;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -245,11 +245,12 @@ var et2_grid = (function(){ "use strict"; return et2_DOMWidget.extend([et2_IDeta
|
||||
|
||||
// Add in repeated rows
|
||||
// TODO: It would be nice if we could skip header (thead) & footer (tfoot) or treat them separately
|
||||
var rowIndex = Infinity;
|
||||
if(this.getArrayMgr("content"))
|
||||
{
|
||||
var content = this.getArrayMgr("content");
|
||||
var rowDataEntry = rowData[rowData.length-1];
|
||||
var rowIndex = rowData.length-1;
|
||||
rowIndex = rowData.length-1;
|
||||
// Find out if we have any content rows, and how many
|
||||
var cont = true;
|
||||
while(cont)
|
||||
|
@ -261,7 +261,7 @@ egw.extend('calendar', egw.MODULE_WND_LOCAL, function(_app, _wnd)
|
||||
*/
|
||||
time: function(_input, _callback, _context)
|
||||
{
|
||||
setupTime(this, _input, _callback, _context);
|
||||
setupTime(this, _input);
|
||||
},
|
||||
/**
|
||||
* transform PHP date/time-format to jQuery date/time-format
|
||||
|
Loading…
Reference in New Issue
Block a user