redefine 'save' button for desktop app
This commit is contained in:
parent
6cf3ee7fb9
commit
8a9c221eb3
|
@ -163,6 +163,9 @@ define([
|
||||||
_intvars.set('toolbar-height-normal', _tabs_new_height + _intvars.get('toolbar-height-controls'));
|
_intvars.set('toolbar-height-normal', _tabs_new_height + _intvars.get('toolbar-height-controls'));
|
||||||
|
|
||||||
$filemenu.css('top', _tabs_new_height + _intvars.get('document-title-height'));
|
$filemenu.css('top', _tabs_new_height + _intvars.get('document-title-height'));
|
||||||
|
|
||||||
|
toolbar = me.getApplication().getController('Toolbar').getView();
|
||||||
|
toolbar.btnCollabChanges = me.header.btnSave;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,6 @@ define([
|
||||||
'save:disabled' : function (state) {
|
'save:disabled' : function (state) {
|
||||||
if ( me.header.btnSave )
|
if ( me.header.btnSave )
|
||||||
me.header.btnSave.setDisabled(state);
|
me.header.btnSave.setDisabled(state);
|
||||||
console.log('header save: ' + state);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Events generated by main view
|
// Events generated by main view
|
||||||
|
@ -167,6 +166,9 @@ define([
|
||||||
_intvars.set('toolbar-height-normal', _tabs_new_height + _intvars.get('toolbar-height-controls'));
|
_intvars.set('toolbar-height-normal', _tabs_new_height + _intvars.get('toolbar-height-controls'));
|
||||||
|
|
||||||
$filemenu.css('top', _tabs_new_height + _intvars.get('document-title-height'));
|
$filemenu.css('top', _tabs_new_height + _intvars.get('document-title-height'));
|
||||||
|
|
||||||
|
toolbar = me.getApplication().getController('Toolbar').getView('Toolbar');
|
||||||
|
toolbar.btnCollabChanges = me.header.btnSave;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,11 @@ define([
|
||||||
var config = SSE.getController('Main').appOptions;
|
var config = SSE.getController('Main').appOptions;
|
||||||
toolbar.setExtra('right', me.header.getPanel('right', config));
|
toolbar.setExtra('right', me.header.getPanel('right', config));
|
||||||
toolbar.setExtra('left', me.header.getPanel('left', config));
|
toolbar.setExtra('left', me.header.getPanel('left', config));
|
||||||
|
|
||||||
|
if ( me.appConfig && me.appConfig.isDesktopApp &&
|
||||||
|
me.appConfig.isEdit && toolbar.btnCollabChanges )
|
||||||
|
toolbar.btnCollabChanges = me.header.btnSave;
|
||||||
|
|
||||||
},
|
},
|
||||||
'view:compact' : function (toolbar, state) {
|
'view:compact' : function (toolbar, state) {
|
||||||
me.viewport.vlayout.getItem('toolbar').height = state ?
|
me.viewport.vlayout.getItem('toolbar').height = state ?
|
||||||
|
|
Loading…
Reference in a new issue