[PE] Move saving status from header to status bar.

This commit is contained in:
Julia Radzhabova 2017-08-10 15:25:46 +03:00
parent e4a79a46ea
commit fba5c61fb3
2 changed files with 13 additions and 13 deletions

View file

@ -413,17 +413,16 @@ define([
if (action) { if (action) {
this.setLongActionView(action) this.setLongActionView(action)
} else { } else {
var me = this;
if ((id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) && !this.appOptions.isOffline) { if ((id==Asc.c_oAscAsyncAction['Save'] || id==Asc.c_oAscAsyncAction['ForceSaveButton']) && !this.appOptions.isOffline) {
if (this._state.fastCoauth && this._state.usersCount>1) { if (this._state.fastCoauth && this._state.usersCount>1) {
var me = this;
me._state.timerSave = setTimeout(function () { me._state.timerSave = setTimeout(function () {
appHeader.setSaveStatus('end'); me.getApplication().getController('Statusbar').setStatusCaption(me.textChangesSaved, false, 3000);
delete me._state.timerSave;
}, 500); }, 500);
} else } else
appHeader.setSaveStatus('end'); me.getApplication().getController('Statusbar').setStatusCaption(me.textChangesSaved, false, 3000);
} else } else
this.getApplication().getController('Statusbar').setStatusCaption(''); me.getApplication().getController('Statusbar').setStatusCaption('');
} }
action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.BlockInteraction}); action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.BlockInteraction});
@ -451,8 +450,8 @@ define([
case Asc.c_oAscAsyncAction['ForceSaveButton']: case Asc.c_oAscAsyncAction['ForceSaveButton']:
clearTimeout(this._state.timerSave); clearTimeout(this._state.timerSave);
force = true; force = true;
// title = (!this.appOptions.isOffline) ? this.saveTitleText : ''; title = (!this.appOptions.isOffline) ? this.saveTitleText : '';
// text = (!this.appOptions.isOffline) ? this.saveTextText : ''; text = (!this.appOptions.isOffline) ? this.saveTextText : '';
break; break;
case Asc.c_oAscAsyncAction['ForceSaveTimeout']: case Asc.c_oAscAsyncAction['ForceSaveTimeout']:
@ -527,9 +526,6 @@ define([
if (!this.isShowOpenDialog) if (!this.isShowOpenDialog)
this.loadMask.show(); this.loadMask.show();
} else
if ( action.id == Asc.c_oAscAsyncAction.Save || action.id == Asc.c_oAscAsyncAction.ForceSaveButton ) {
appHeader.setSaveStatus('begin');
} else { } else {
this.getApplication().getController('Statusbar').setStatusCaption(text, force); this.getApplication().getController('Statusbar').setStatusCaption(text, force);
} }
@ -1156,8 +1152,6 @@ define([
this.updateWindowTitle(); this.updateWindowTitle();
this.api.isDocumentModified() && appHeader.setSaveStatus('changed');
var toolbarView = this.getApplication().getController('Toolbar').getView('Toolbar'); var toolbarView = this.getApplication().getController('Toolbar').getView('Toolbar');
if (toolbarView) { if (toolbarView) {
var isSyncButton = $('.icon', toolbarView.btnSave.cmpEl).hasClass('btn-synch'), var isSyncButton = $('.icon', toolbarView.btnSave.cmpEl).hasClass('btn-synch'),
@ -1943,7 +1937,10 @@ define([
txtImage: 'Image', txtImage: 'Image',
txtSlideNumber: 'Slide number', txtSlideNumber: 'Slide number',
txtSlideSubtitle: 'Slide subtitle', txtSlideSubtitle: 'Slide subtitle',
txtSlideTitle: 'Slide title' txtSlideTitle: 'Slide title',
textChangesSaved: 'All changes saved',
saveTitleText: 'Saving Document',
saveTextText: 'Saving document...'
} }
})(), PE.Controllers.Main || {})) })(), PE.Controllers.Main || {}))
}); });

View file

@ -182,11 +182,14 @@
"PE.Controllers.Main.saveErrorText": "An error has occurred while saving the file", "PE.Controllers.Main.saveErrorText": "An error has occurred while saving the file",
"PE.Controllers.Main.savePreparingText": "Preparing to save", "PE.Controllers.Main.savePreparingText": "Preparing to save",
"PE.Controllers.Main.savePreparingTitle": "Preparing to save. Please wait...", "PE.Controllers.Main.savePreparingTitle": "Preparing to save. Please wait...",
"PE.Controllers.Main.saveTextText": "Saving presentation...",
"PE.Controllers.Main.saveTitleText": "Saving Presentation",
"PE.Controllers.Main.splitDividerErrorText": "The number of rows must be a divisor of %1.", "PE.Controllers.Main.splitDividerErrorText": "The number of rows must be a divisor of %1.",
"PE.Controllers.Main.splitMaxColsErrorText": "The number of columns must be less than %1.", "PE.Controllers.Main.splitMaxColsErrorText": "The number of columns must be less than %1.",
"PE.Controllers.Main.splitMaxRowsErrorText": "The number of rows must be less than %1.", "PE.Controllers.Main.splitMaxRowsErrorText": "The number of rows must be less than %1.",
"PE.Controllers.Main.textAnonymous": "Anonymous", "PE.Controllers.Main.textAnonymous": "Anonymous",
"PE.Controllers.Main.textBuyNow": "Visit website", "PE.Controllers.Main.textBuyNow": "Visit website",
"PE.Controllers.Main.textChangesSaved": "All changes saved",
"PE.Controllers.Main.textCloseTip": "Click to close the tip", "PE.Controllers.Main.textCloseTip": "Click to close the tip",
"PE.Controllers.Main.textContactUs": "Contact sales", "PE.Controllers.Main.textContactUs": "Contact sales",
"PE.Controllers.Main.textLoadingDocument": "Loading presentation", "PE.Controllers.Main.textLoadingDocument": "Loading presentation",