feat: add back error handling for a number of api calls

This commit is contained in:
Julian Lam
2020-11-04 14:11:45 -05:00
parent b44c7e9658
commit 1afd215050
13 changed files with 26 additions and 26 deletions

View File

@@ -58,7 +58,7 @@ define('admin/manage/category', [
timeout: 5000,
});
updateHash = {};
});
}).catch(app.alertError);
return false;
});
@@ -103,7 +103,7 @@ define('admin/manage/category', [
modal.modal('hide');
app.alertSuccess('[[admin/manage/categories:alert.purge-success]]');
ajaxify.go('admin/manage/categories');
});
}).catch(app.alertError);
return false;
},
@@ -215,7 +215,7 @@ define('admin/manage/category', [
$('button[data-action="removeParent"]').parent().addClass('hide');
$('button[data-action="changeParent"]').parent().addClass('hide');
$('button[data-action="setParent"]').removeClass('hide');
});
}).catch(app.alertError);
});
$('button[data-action="toggle"]').on('click', function () {
var $this = $(this);
@@ -226,7 +226,7 @@ define('admin/manage/category', [
$this.translateText(!disabled ? '[[admin/manage/categories:enable]]' : '[[admin/manage/categories:disable]]');
$this.toggleClass('btn-primary', !disabled).toggleClass('btn-danger', disabled);
$this.attr('data-disabled', disabled ? 0 : 1);
});
}).catch(app.alertError);
});
};
@@ -287,7 +287,7 @@ define('admin/manage/category', [
$('button[data-action="setParent"]').addClass('hide');
var buttonHtml = '<i class="fa ' + parent.icon + '"></i> ' + parent.name;
$('button[data-action="changeParent"]').html(buttonHtml).parent().removeClass('hide');
});
}).catch(app.alertError);
});
});
};