mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Remove "changed" style from buttons if fields are reset
This commit is contained in:
parent
8dd9bf3a1e
commit
6cb77108f5
@ -314,14 +314,15 @@
|
|||||||
* Enable save buttons upon detecting changes to content.
|
* Enable save buttons upon detecting changes to content.
|
||||||
* "changed" class is added by jQuery.changetracker.
|
* "changed" class is added by jQuery.changetracker.
|
||||||
*/
|
*/
|
||||||
$('.cms-edit-form .changed').entwine({
|
$('.cms-edit-form.changed').entwine({
|
||||||
onmatch: function(e) {
|
onmatch: function(e) {
|
||||||
var form = this.closest('.cms-edit-form');
|
this.find('button[name=action_save]').button('option', 'showingAlternate', true);
|
||||||
form.find('button[name=action_save]').button('option', 'showingAlternate', true);
|
this.find('button[name=action_publish]').button('option', 'showingAlternate', true);
|
||||||
form.find('button[name=action_publish]').button('option', 'showingAlternate', true);
|
|
||||||
this._super(e);
|
this._super(e);
|
||||||
},
|
},
|
||||||
onunmatch: function(e) {
|
onunmatch: function(e) {
|
||||||
|
this.find('button[name=action_save]').button('option', 'showingAlternate', false);
|
||||||
|
this.find('button[name=action_publish]').button('option', 'showingAlternate', false);
|
||||||
this._super(e);
|
this._super(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user