Page slide does not reload from server for ad_banner

This commit is contained in:
chris committed 2013-10-19 19:17:24 +08:00
1 parent 92d2af13f2
commit fea86ba3a9
26 files changed
+254 -3007

No files matched your search

+21 -1
View File
@@ -1 +1,21 @@
//= require lib/arrow-on-list-edit
//= require lib/arrow-on-list-edit
$(function() {
$.pageslide.closeCallback(function(pageslide, item) {
$("tr").removeClass("active");
pageslide.find('.preview').cycle('destroy')
});
$.pageslide.loadComplete(function(pageslide, item) {
$("tr").removeClass("active");
item.closest('tr').addClass('active');
setSlideshow(pageslide.find('.preview'), item.data());
if(item.data('id') == 'new') {
pageslide.find('form').attr('action', '/admin/ad_banners/');
pageslide.find('form').attr('method', 'post');
}
else {
pageslide.find('form').attr('action', '/admin/ad_banners/' + item.data('id'));
pageslide.find('form').attr('method', 'put');
}
});
})