Merge pull request #1239 from ONLYOFFICE/fix/fix-bugs

Fix/fix bugs
This commit is contained in:
Julia Radzhabova 2021-10-08 20:08:43 +03:00 committed by GitHub
commit 47788053da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 8 deletions

View file

@ -536,13 +536,13 @@ define([
if ( !config.isEdit ) {
if ( (config.canDownload || config.canDownloadOrigin) && !config.isOffline )
this.btnDownload = createTitleButton('toolbar__icon icon--inverse btn-download', $html.findById('#slot-hbtn-download'));
this.btnDownload = createTitleButton('toolbar__icon icon--inverse btn-download', $html.findById('#slot-hbtn-download'), undefined, 'bottom', 'big');
if ( config.canPrint )
this.btnPrint = createTitleButton('toolbar__icon icon--inverse btn-print', $html.findById('#slot-hbtn-print'));
this.btnPrint = createTitleButton('toolbar__icon icon--inverse btn-print', $html.findById('#slot-hbtn-print'), undefined, 'bottom', 'big');
if ( config.canEdit && config.canRequestEditRights )
this.btnEdit = createTitleButton('toolbar__icon icon--inverse btn-edit', $html.findById('#slot-hbtn-edit'));
this.btnEdit = createTitleButton('toolbar__icon icon--inverse btn-edit', $html.findById('#slot-hbtn-edit'), undefined, 'bottom', 'big');
}
me.btnOptions.render($html.find('#slot-btn-options'));
@ -759,7 +759,7 @@ define([
if ( alias == 'users' ) {
if ( lock )
$btnUsers.addClass('disabled').attr('disabled', 'disabled'); else
$btnUsers.removeClass('disabled').attr('disabled', '');
$btnUsers.removeClass('disabled').removeAttr('disabled');
} else if ( alias == 'rename-user' ) {
if (me.labelUserName) {
if ( lock ) {

View file

@ -306,7 +306,7 @@ define([
me.header.mnuitemHideHeadings.hide();
me.header.mnuitemHideGridlines.hide();
me.header.mnuitemFreezePanes.hide();
menu.items[5].hide();
menu.items[6].hide();
if (!config.canViewComments) { // show advanced settings for editing and commenting mode
// mnuitemAdvSettings.hide();
// menu.items[9].hide();

View file

@ -513,7 +513,8 @@ define([
setMode: function(mode) {
this.mode = _.extend({}, this.mode, mode);
// this.$el.find('.el-edit')[mode.isEdit?'show':'hide']();
this.btnAddWorksheet.setVisible(this.mode.isEdit);
//this.btnAddWorksheet.setVisible(this.mode.isEdit);
$('#status-addtabs-box')[this.mode.isEdit ? 'show' : 'hide']();
this.btnAddWorksheet.setDisabled(this.mode.isDisconnected || this.api && (this.api.asc_isWorkbookLocked() || this.api.isCellEdited) || this.rangeSelectionMode!=Asc.c_oAscSelectionDialogType.None);
this.updateTabbarBorders();
},
@ -600,7 +601,11 @@ define([
this.tabbar.setTabVisible(sindex);
this.btnAddWorksheet.setDisabled(me.mode.isDisconnected || me.api.asc_isWorkbookLocked() || me.api.asc_isProtectedWorkbook() || me.api.isCellEdited);
this.tabbar.addDataHint(_.findIndex(items, function (item) { return item.sheetindex === sindex; }));
if (this.mode.isEdit) {
this.tabbar.addDataHint(_.findIndex(items, function (item) {
return item.sheetindex === sindex;
}));
}
$('#status-label-zoom').text(Common.Utils.String.format(this.zoomText, Math.floor((this.api.asc_getZoom() +.005)*100)));
@ -687,7 +692,9 @@ define([
this.tabbar.setTabVisible(index);
}
this.tabbar.addDataHint(index);
if (this.mode.isEdit) {
this.tabbar.addDataHint(index);
}
this.fireEvent('sheet:changed', [this, tab.sheetindex]);
this.fireEvent('sheet:updateColors', [true]);