From 282b96ddd9a84b740788c2358ec0f5fedafb7cc6 Mon Sep 17 00:00:00 2001 From: Noah Slater Date: Mon, 6 Jul 2009 00:33:50 +0000 Subject: trimmed trailing whitespace git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@791350 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/jquery.form.js | 52 ++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'share/www/script/jquery.form.js') diff --git a/share/www/script/jquery.form.js b/share/www/script/jquery.form.js index 91eb688d..e35ef0ef 100644 --- a/share/www/script/jquery.form.js +++ b/share/www/script/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) { @@ -73,8 +73,8 @@ $.fn.ajaxSubmit = function(options) { if (options.beforeSerialize && options.beforeSerialize(this, options) === false) { log('ajaxSubmit: submit aborted via beforeSerialize callback'); return this; - } - + } + var a = this.formToArray(options.semantic); if (options.data) { options.extraData = options.data; @@ -82,7 +82,7 @@ $.fn.ajaxSubmit = function(options) { if(options.data[n] instanceof Array) { for (var k in options.data[n]) a.push( { name: n, value: options.data[n][k] } ) - } + } else a.push( { name: n, value: options.data[n] } ); } @@ -92,14 +92,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); @@ -137,7 +137,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) @@ -156,12 +156,12 @@ $.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 s = jQuery.extend(true, {}, $.extend(true, {}, $.ajaxSettings), opts); @@ -169,7 +169,7 @@ $.fn.ajaxSubmit = function(options) { var $io = $('