all admin plugins have the same response options
This commit is contained in:
parent
83f0cb7f6b
commit
91fcedd2e4
1 changed files with 5 additions and 5 deletions
|
|
@ -531,7 +531,7 @@ WebGUI.Admin.prototype.requestHelper
|
||||||
var callback = {
|
var callback = {
|
||||||
success : function (o) {
|
success : function (o) {
|
||||||
var resp = YAHOO.lang.JSON.parse( o.responseText );
|
var resp = YAHOO.lang.JSON.parse( o.responseText );
|
||||||
this.processHelper( resp );
|
this.processPlugin( resp );
|
||||||
},
|
},
|
||||||
failure : function (o) {
|
failure : function (o) {
|
||||||
|
|
||||||
|
|
@ -544,8 +544,8 @@ WebGUI.Admin.prototype.requestHelper
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* processHelper( response )
|
* processPlugin( response )
|
||||||
* Process the helper response. Possible responses include:
|
* Process the plugin response. Possible responses include:
|
||||||
* message : A message to the user
|
* message : A message to the user
|
||||||
* error : An error message
|
* error : An error message
|
||||||
* openDialog : Open a dialog with the given URL
|
* openDialog : Open a dialog with the given URL
|
||||||
|
|
@ -554,7 +554,7 @@ WebGUI.Admin.prototype.requestHelper
|
||||||
* scriptFunc : Run a JS function. Used with scriptFile
|
* scriptFunc : Run a JS function. Used with scriptFile
|
||||||
* scriptArgs : Arguments to scriptFunc. Used with scriptFile
|
* scriptArgs : Arguments to scriptFunc. Used with scriptFile
|
||||||
*/
|
*/
|
||||||
WebGUI.Admin.prototype.processHelper
|
WebGUI.Admin.prototype.processPlugin
|
||||||
= function ( resp ) {
|
= function ( resp ) {
|
||||||
if ( resp.openTab ) {
|
if ( resp.openTab ) {
|
||||||
this.openTab( resp.openTab );
|
this.openTab( resp.openTab );
|
||||||
|
|
@ -572,7 +572,7 @@ WebGUI.Admin.prototype.processHelper
|
||||||
this.showInfoMessage( resp.error );
|
this.showInfoMessage( resp.error );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
alert( "Unknown helper response: " + YAHOO.lang.JSON.stringify(resp) );
|
alert( "Unknown plugin response: " + YAHOO.lang.JSON.stringify(resp) );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue