Skip to content

Commit

Permalink
BUGFIX: Buttons in the cms that didnt have .ss-ui-button werent becom…
Browse files Browse the repository at this point in the history
…ing buttons because we changed buttons to trigger on onadd, but the ss-ui-button class was being added dynamically
  • Loading branch information
Hamish Friedlander authored and chillu committed Jun 14, 2012
1 parent 8ae4597 commit acee026
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions admin/javascript/LeftAndMain.js
Expand Up @@ -444,26 +444,11 @@ jQuery.noConflict();
}
});

/**
* Make all buttons "hoverable" with jQuery theming.
* 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({
/** Make all buttons "hoverable" with jQuery theming. */
$('.cms input[type="submit"], .cms button, .cms input[type="reset"], .cms .ss-ui-button').entwine({
onadd: function() {
this.addClass('ss-ui-button');
if(!this.data('button')) this.button();

this._super();
},
onremove: function() {
Expand Down

0 comments on commit acee026

Please sign in to comment.