Fix alt hints in view mode

This commit is contained in:
JuliaSvinareva 2021-10-08 20:00:17 +03:00
parent c8dfaf3f48
commit 35319df3f6
2 changed files with 14 additions and 7 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

@ -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);
}
if (this.mode.isEdit) {
this.tabbar.addDataHint(index);
}
this.fireEvent('sheet:changed', [this, tab.sheetindex]);
this.fireEvent('sheet:updateColors', [true]);