[Bps-public-commit] rt-extension-formtools branch, queue-and-global-cfs, updated. 0.07_06-1-ge2a4362
Kevin Falcone
falcone at bestpractical.com
Thu Jul 14 15:38:46 EDT 2011
The branch, queue-and-global-cfs has been updated
via e2a43620cf93d89ae91e9585cc086879e8bb34d8 (commit)
from bdd2aef1e0f36b3ef10672a7cc63cbbfeec51a86 (commit)
Summary of changes:
html/NoAuth/js/form_tools.js | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit e2a43620cf93d89ae91e9585cc086879e8bb34d8
Author: Kevin Falcone <kevin at jibsheet.com>
Date: Thu Jul 14 15:37:54 2011 -0400
IE7 doesn't support input:enabled matching on hidden inputs
That selector fails and we hide everything
Instead, work the disabled logic into the filter function.
IE8/9, Chrome and Firefox all allow enabled searching on hidden inputs
diff --git a/html/NoAuth/js/form_tools.js b/html/NoAuth/js/form_tools.js
index 5eb8106..6fdc3f8 100644
--- a/html/NoAuth/js/form_tools.js
+++ b/html/NoAuth/js/form_tools.js
@@ -13,12 +13,15 @@ function disable_form_field(disable, selector) {
function should_disable_form_field( fields, values ) {
for ( var i = 0; i<fields.length; i++ ) {
var field = fields[i];
- var selector = 'input:enabled[name="'+ field +'"]'
- +', input:enabled[name="'+ field +'s"]'
+ var selector = 'input[name="'+ field +'"]'
+ +', input[name="'+ field +'s"]'
+', span.readonly[name="'+ field +'"]'
+', li.readonly[name="'+ field +'"]'
;
var active = jQuery( selector ).filter(function() {
+ if ( jQuery(this).attr('disabled') ) {
+ return 0;
+ }
var value;
if ( this.tagName == 'SPAN' || this.tagName == 'LI' ) {
value = jQuery(this).text();
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list