* Handles erroneous AJAX requests.
*/
_failure: function() {
+ this._setIcon('remove');
+
if (!this._allowRollback) {
return;
}
* @param object event
*/
_rollback: function(event) {
+ this._setIcon('spinner');
+
if (event) {
$(event.currentTarget).disable();
}
});
}
+ this._setIcon('spinner');
+
if (data.step == 'rollback') {
this._dialog.wcfDialog('close');
this._dialog.remove();
// handle success
if (data.step === 'success') {
+ this._setIcon('ok');
+
this._purgeTemplateContent($.proxy(function() {
var $form = $('<div class="formSubmit" />').appendTo($('#packageInstallationInnerContent'));
$('<button class="buttonPrimary">' + WCF.Language.get('wcf.global.button.next') + '</button>').appendTo($form).click(function() {
// create button to handle next step
if (data.step && data.node) {
+ this._setIcon('question');
+
var $form = $('<div class="formSubmit" />').appendTo($('#packageInstallationInnerContent'));
$('<button class="buttonPrimary">' + WCF.Language.get('wcf.global.button.next') + '</button>').appendTo($form).click($.proxy(function(event) {
$(event.currentTarget).disable();
* @param object data
*/
_submit: function(data) {
+ this._setIcon('spinner');
+
// collect form values
var $additionalData = {};
$('#packageInstallationInnerContent input').each(function(index, inputElement) {
this._proxy.setOption('data', $data);
this._proxy.sendRequest();
+ },
+
+ _setIcon: function(iconName) {
+ this._dialog.find('.jsPackageInstallationStatus').removeClass('icon-ok icon-question icon-remove icon-spinner').addClass('icon-' + iconName);
}
});