Some more code cleanup:

- Remove some unexecutable code
- Fix some variable declarations
(to satisfy Scrutenizer)
This commit is contained in:
nathangray 2017-01-31 08:29:00 -07:00
parent eb51009ebd
commit ceea2cb976
4 changed files with 7 additions and 60 deletions

View File

@ -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};

View File

@ -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;
}
}

View File

@ -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)

View File

@ -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