[Jifty-commit] r1199 - in jifty: trunk/share/web/static/js
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Jun 7 22:34:26 EDT 2006
Author: nelhage
Date: Wed Jun 7 22:34:24 2006
New Revision: 1199
Modified:
jifty/ (props changed)
jifty/trunk/share/web/static/js/jifty.js
Log:
r12371 at phanatique: nelhage | 2006-06-07 22:34:21 -0400
Making Array.buttons() both saner and more right
Modified: jifty/trunk/share/web/static/js/jifty.js
==============================================================================
--- jifty/trunk/share/web/static/js/jifty.js (original)
+++ jifty/trunk/share/web/static/js/jifty.js Wed Jun 7 22:34:24 2006
@@ -55,9 +55,15 @@
var elements = new Array();
var possible = Form.getElements(this.form);
for(var i = 0; i < possible.length; i++) {
- actions = Form.Element.buttonActions(possible[i]);
- if(!actions || actions.indexOf(this.moniker) >= 0) {
- elements.push(possible[i]);
+ if(possible[i].nodeName == 'INPUT' && possible[i].getAttribute("type") == 'submit') {
+ actions = Form.Element.buttonActions(possible[i]);
+ //If the button has no actions explicitly associated
+ //with it, it's associated with all the actions in the
+ //form
+ if( actions.length == 0
+ || actions.indexOf(this.moniker) >= 0) {
+ elements.push(possible[i]);
+ }
}
}
return elements;
More information about the Jifty-commit
mailing list