*
* @param string dialogID
* @param string className
- * @param object options
+ * @param string title
+ * @param object parameters
+ * @param object callback
*/
WCF.ACP.Worker = Class.extend({
+ /**
+ * callback invoked after worker completed
+ * @var object
+ */
+ _callback: null,
+
/**
* dialog id
* @var string
* @param string className
* @param string title
* @param object parameters
+ * @param object callback
*/
- init: function(dialogID, className, title, parameters) {
+ init: function(dialogID, className, title, parameters, callback) {
+ this._callback = callback || null;
this._dialogID = dialogID + 'Worker';
this._dialog = null;
this._proxy = new WCF.Action.Proxy({
});
this._proxy.sendRequest();
}
+ else if (this._callback !== null) {
+ this._callback(this, data);
+ }
else {
// display continue button
var $formSubmit = $('<div class="formSubmit" />').appendTo(this._dialog);