diff --git a/ajax_list.js b/ajax_list.js index 61c33b4..8ebb678 100644 --- a/ajax_list.js +++ b/ajax_list.js @@ -210,7 +210,7 @@ $=jQuery; after_list=options.after_list; - after_list(data.rows); + after_list(); } diff --git a/posting2.js b/posting2.js index f612a2c..9a7e624 100644 --- a/posting2.js +++ b/posting2.js @@ -1,4 +1,4 @@ -$=jQuery; + (function( $ ){ @@ -58,16 +58,6 @@ $=jQuery; } } - beforeSend=false; - - if(options.hasOwnProperty("before_send")) { - - beforeSend=options.before_send; - console.log('Send before...'); - - } - - $(this).on('submit', function (e) { //Get data of form @@ -118,7 +108,6 @@ $=jQuery; cache:false, contentType:false, processData: false, - beforeSend: beforeSend, success: function (data) { $(options.loading).hide(); @@ -127,12 +116,6 @@ $=jQuery; if(!data.hasOwnProperty("error_csrf")) { - - if(options.hasOwnProperty("error")) { - - options.error(data); - - } if(data.hasOwnProperty("csrf_token")) @@ -146,11 +129,9 @@ $=jQuery; console.log('Error'); if(data.hasOwnProperty('error_form')) - { - console.log('Showing errors in form...'); - + { for(i in data.error_form) { - + $(i).html(data.error_form[i]); $(i).show();