mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
8ae4597a85
commit
acee026875
@ -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() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user