19 lines
697 B
JavaScript
19 lines
697 B
JavaScript
$(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'));
|
|
pageslide.find('form').attr('action', '/admin/module_apps/' + item.data('module') + '/categories/' + item.data('id'));
|
|
pageslide.find('form').attr('method', 'put');
|
|
}
|
|
});
|
|
}) |