BUG Only use $.button in onunmatch if init'ed (fixes #8181)

This commit is contained in:
Kirk Mayo 2013-01-21 12:56:02 +13:00 committed by Ingo Schommer
parent 8a9acaa5ba
commit 1571d3542d

View File

@ -321,8 +321,10 @@
this._super(e);
},
onunmatch: function(e) {
this.find('button[name=action_save]').button('option', 'showingAlternate', false);
this.find('button[name=action_publish]').button('option', 'showingAlternate', false);
var saveButton = this.find('button[name=action_save]');
if(saveButton.data('button')) saveButton('option', 'showingAlternate', false);
var publishButton = this.find('button[name=action_publish]');
if(publishButton.data('button')) publishButton('option', 'showingAlternate', false);
this._super(e);
}
});