Update Desktop.js (#352)

This commit is contained in:
maxkadushkin 2020-02-26 16:14:04 +03:00 committed by GitHub
parent 8d8dfea95e
commit 650b0c0f82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -197,9 +197,6 @@ define([
if ( !!header.btnSave ) {
titlebuttons['save'] = {btn: header.btnSave, disabled:false};
header.btnSave.options.signals.push('icon:changed');
header.btnSave.on('icon:changed', _onSaveIconChanged.bind(this));
var iconname = /\s?([^\s]+)$/.exec(titlebuttons.save.btn.$icon.attr('class'));
!!iconname && iconname.length && (titlebuttons.save.icon = btnsave_icons[iconname]);
}
@ -218,6 +215,11 @@ define([
titlebuttons[i].btn.on('disabled', _onTitleButtonDisabled.bind(this, i));
}
if (!!titlebuttons.save) {
titlebuttons.save.btn.options.signals.push('icon:changed');
titlebuttons.save.btn.on('icon:changed', _onSaveIconChanged.bind(this));
}
if ( !!config.callback_editorconfig ) {
config.callback_editorconfig();
delete config.callback_editorconfig;