BUGFIX: Buttons in the cms that didnt have .ss-ui-button werent becoming buttons because we changed buttons to trigger on onadd, but the ss-ui-button class was being added dynamically

This commit is contained in:
Hamish Friedlander 2012-06-15 10:05:41 +12:00 committed by Ingo Schommer
parent 8ae4597a85
commit acee026875

View File

@ -444,26 +444,11 @@ jQuery.noConflict();
} }
}); });
/** /** Make all buttons "hoverable" with jQuery theming. */
* Make all buttons "hoverable" with jQuery theming. $('.cms input[type="submit"], .cms button, .cms input[type="reset"], .cms .ss-ui-button').entwine({
* Also sets the clicked button on a form submission, making it available through
* a new 'clickedButton' property on the form DOM element.
*/
$('.cms input[type="submit"], .cms button, .cms input[type="reset"]').entwine({
onmatch: function() {
if(!this.hasClass('ss-ui-button')) this.addClass('ss-ui-button');
this._super();
},
onunmatch: function() {
this._super();
}
});
$('.cms .ss-ui-button').entwine({
onadd: function() { onadd: function() {
this.addClass('ss-ui-button');
if(!this.data('button')) this.button(); if(!this.data('button')) this.button();
this._super(); this._super();
}, },
onremove: function() { onremove: function() {