mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Warn about legacy function calls using too many arguments
This commit is contained in:
parent
1b0cefe5f2
commit
4e6c5c3a1f
@ -143,6 +143,10 @@
|
||||
// Dump the executed code for debugging
|
||||
egw.debug('log', 'Executing legacy JS code: ', _code);
|
||||
|
||||
if(arguments && arguments.length > 2)
|
||||
{
|
||||
egw.debug('warn', 'Legacy JS code only supports 2 arguments (event and widget)', _code, arguments);
|
||||
}
|
||||
// Return the result of the called function
|
||||
return func.call(context, ev, _widget);
|
||||
};
|
||||
|
@ -1642,9 +1642,9 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
|
||||
*
|
||||
* @param {String|Function} handler
|
||||
*/
|
||||
set_onfiledrop: function(handler) {
|
||||
set_onfiledrop: function(handler) {
|
||||
this.options.onfiledrop = handler;
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle drops of files by linking to the row, if possible.
|
||||
@ -1657,7 +1657,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
|
||||
* @param {object} event
|
||||
* @param {object} target
|
||||
*/
|
||||
handle_drop: function(event, target) {
|
||||
handle_drop: function(event, target) {
|
||||
// Check to see if we can handle the link
|
||||
// First, find the UID
|
||||
var row = this.controller.getRowByNode(target);
|
||||
@ -1732,7 +1732,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
|
||||
|
||||
// Upload and link - this triggers the upload, which triggers the link, which triggers the cleanup and refresh
|
||||
link.file_upload.set_value(files);
|
||||
},
|
||||
},
|
||||
|
||||
getDOMNode: function(_sender) {
|
||||
if (_sender == this)
|
||||
|
Loading…
Reference in New Issue
Block a user