|
|
|
@ -5,8 +5,9 @@ define('admin/manage/category', [
|
|
|
|
|
'uploader',
|
|
|
|
|
'iconSelect',
|
|
|
|
|
'admin/modules/colorpicker',
|
|
|
|
|
'autocomplete'
|
|
|
|
|
], function (uploader, iconSelect, colorpicker, autocomplete) {
|
|
|
|
|
'autocomplete',
|
|
|
|
|
'translator'
|
|
|
|
|
], function (uploader, iconSelect, colorpicker, autocomplete, translator) {
|
|
|
|
|
var Category = {};
|
|
|
|
|
var modified_categories = {};
|
|
|
|
|
|
|
|
|
@ -232,10 +233,12 @@ define('admin/manage/category', [
|
|
|
|
|
templates.parse('admin/partials/categories/privileges', {
|
|
|
|
|
privileges: privileges
|
|
|
|
|
}, function (html) {
|
|
|
|
|
translator.translate(html, function (html) {
|
|
|
|
|
$('.privilege-table-container').html(html);
|
|
|
|
|
Category.exposeAssumedPrivileges();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Category.exposeAssumedPrivileges = function () {
|
|
|
|
@ -289,6 +292,7 @@ define('admin/manage/category', [
|
|
|
|
|
templates.parse('partials/category_list', {
|
|
|
|
|
categories: categories
|
|
|
|
|
}, function (html) {
|
|
|
|
|
translator.translate(html, function (html) {
|
|
|
|
|
var modal = bootbox.dialog({
|
|
|
|
|
message: html,
|
|
|
|
|
title: 'Set Parent Category'
|
|
|
|
@ -320,6 +324,7 @@ define('admin/manage/category', [
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Category.addUserToPrivilegeTable = function () {
|
|
|
|
@ -407,6 +412,7 @@ define('admin/manage/category', [
|
|
|
|
|
templates.parse('admin/partials/categories/select-category', {
|
|
|
|
|
categories: categories
|
|
|
|
|
}, function (html) {
|
|
|
|
|
translator.translate(html, function (html) {
|
|
|
|
|
function submit() {
|
|
|
|
|
var formData = modal.find('form').serializeObject();
|
|
|
|
|
callback(formData['select-cid']);
|
|
|
|
@ -429,6 +435,7 @@ define('admin/manage/category', [
|
|
|
|
|
modal.find('form').on('submit', submit);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|