mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Handle if button onclick didn't get compiled. Still a problem with variable insertion though
This commit is contained in:
parent
f7b2a2b02f
commit
c622957b40
@ -91,8 +91,22 @@ var et2_button = et2_baseWidget.extend([et2_IInput, et2_IDetachedDOM], {
|
||||
// Execute the JS code connected to the event handler
|
||||
if (this.options.onclick)
|
||||
{
|
||||
if (!this.options.onclick())
|
||||
// onclick needs to get current values
|
||||
if(typeof this.options.onclick == "string") {
|
||||
// Don't change this.options.onclick so we can do this again
|
||||
var onclick = et2_js_pseudo_funcs(this.options.onclick, this.id);
|
||||
if(onclick.indexOf("$") >= 0 || onclick.indexOf("@") >= 0) {
|
||||
var mgr = this.getArrayMgr("content");
|
||||
if(mgr) onclick = mgr.expandName(onclick);
|
||||
}
|
||||
onclick = new Function(onclick);
|
||||
if(!onclick())
|
||||
return false;
|
||||
}
|
||||
else if (!this.options.onclick())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Submit the form
|
||||
|
@ -861,8 +861,8 @@ var et2_link_list = et2_link_string.extend({
|
||||
$j(document.createElement("td"))
|
||||
.appendTo(row)
|
||||
.addClass(columns[i])
|
||||
.text(_link_data[columns[i]])
|
||||
.click( function(){egw.open(_link_data.id, _link_data.app, "edit", _link_data.extra);});
|
||||
.click( function(){egw.open(_link_data.id, _link_data.app, "edit", _link_data.extra);})
|
||||
.text(_link_data[columns[i]]);
|
||||
}
|
||||
|
||||
// Date
|
||||
|
Loading…
Reference in New Issue
Block a user