copy from seminar
This commit is contained in:
1 parent
aba01c8239
commit
63b5e77b92
429 files changed
+4974
-4974
No files matched your search
@@ -0,0 +1,29 @@
|
||||
$(function() {
|
||||
|
||||
$('a[data-toggle="tab"]').click(function (e) {
|
||||
e.preventDefault();
|
||||
$(this).tab('show');
|
||||
});
|
||||
|
||||
$.pageslide.closeCallback(function(pageslide, item) {
|
||||
$('.filter-item').removeClass("active");
|
||||
});
|
||||
|
||||
$.pageslide.loadComplete(function(pageslide, item) {
|
||||
|
||||
$('.filter-item').removeClass("active");
|
||||
|
||||
item.closest('li').addClass('active');
|
||||
|
||||
if(item.data('id') == 'new') {
|
||||
resetForm();
|
||||
pageslide.find('form:eq(0)').attr('action', window.location.pathname);
|
||||
pageslide.find('form:eq(0)').attr('method', 'post');
|
||||
}else {
|
||||
setForm(item.data('form'));
|
||||
pageslide.find('form:eq(0)').attr('action', window.location.pathname + '/' + item.data('id'));
|
||||
pageslide.find('form:eq(0)').attr('method', 'put');
|
||||
}
|
||||
|
||||
});
|
||||
})
|
||||
Reference in new issue
Block a user