This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
2013-10-20 22:34:55 +00:00
|
|
|
$(function() {
|
|
|
|
$.pageslide.closeCallback(function(pageslide, item) {
|
|
|
|
$("tr").removeClass("active");
|
|
|
|
});
|
|
|
|
$.pageslide.loadComplete(function(pageslide, item) {
|
|
|
|
$("tr").removeClass("active");
|
|
|
|
item.closest('tr').addClass('active');
|
|
|
|
if(item.data('id') == 'new') {
|
|
|
|
resetForm();
|
|
|
|
pageslide.find('form').attr('action', '/admin/module_apps/' + item.data('module') + '/categories/');
|
|
|
|
pageslide.find('form').attr('method', 'post');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
setForm(item.data('form'));
|
2013-11-04 06:44:20 +00:00
|
|
|
if( $( ".color-picker" ).length ) $(".color-picker").miniColors("value",item.data("form").color);
|
2013-10-20 22:34:55 +00:00
|
|
|
pageslide.find('form').attr('action', '/admin/module_apps/' + item.data('module') + '/categories/' + item.data('id'));
|
|
|
|
pageslide.find('form').attr('method', 'put');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|