X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/362ea2e7f8ac4254398791139cc060090199f400..d91638bdfd7642eebec0147997f834952707dd92:/wolnelektury/static/js/jquery.form.js diff --git a/wolnelektury/static/js/jquery.form.js b/wolnelektury/static/js/jquery.form.js index 659baa989..36af6b199 100644 --- a/wolnelektury/static/js/jquery.form.js +++ b/wolnelektury/static/js/jquery.form.js @@ -13,7 +13,7 @@ (function($) { /* - Usage Note: + Usage Note: ----------- Do not use both ajaxSubmit and ajaxForm on the same form. These functions are intended to be exclusive. Use ajaxSubmit if you want @@ -36,13 +36,13 @@ target: '#output' }); }); - + When using ajaxForm, the ajaxSubmit function will be invoked for you - at the appropriate time. + at the appropriate time. */ /** - * ajaxSubmit() provides a mechanism for immediately submitting + * ajaxSubmit() provides a mechanism for immediately submitting * an HTML form using AJAX. */ $.fn.ajaxSubmit = function(options) { @@ -80,14 +80,14 @@ $.fn.ajaxSubmit = function(options) { if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { log('ajaxSubmit: submit aborted via beforeSubmit callback'); return this; - } + } // fire vetoable 'validate' event this.trigger('form-submit-validate', [a, this, options, veto]); if (veto.veto) { log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); return this; - } + } var q = $.param(a); @@ -125,7 +125,7 @@ $.fn.ajaxSubmit = function(options) { found = true; // options.iframe allows user to force iframe mode - if (options.iframe || found) { + if (options.iframe || found) { // hack to fix Safari hang (thanks to Tim Molendijk for this) // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d if ($.browser.safari && options.closeKeepAlive) @@ -144,19 +144,19 @@ $.fn.ajaxSubmit = function(options) { // private function for handling file uploads (hat tip to YAHOO!) function fileUpload() { var form = $form[0]; - + if ($(':input[@name=submit]', form).length) { alert('Error: Form elements must not be named "submit".'); return; } - + var opts = $.extend({}, $.ajaxSettings, options); var id = 'jqFormIO' + (new Date().getTime()); var $io = $('