diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 6c388baf1..52106061d 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -1624,6 +1624,8 @@ define([ this._state.fontsize = str_size; } + toolbar.lockToolbar(SSE.enumLock.cantHyperlink, (selectionType == Asc.c_oAscSelectionType.RangeShapeText) && (this.api.asc_canAddShapeHyperlink()===false), { array: [toolbar.btnInsertHyperlink]}); + if (editOptionsDisabled) return; /* read font params */ diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index 4897ded99..12af500b9 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -76,7 +76,8 @@ define([ ruleDelFilter: 'rule-clear-filter', menuFileOpen: 'menu-file-open', cantPrint: 'cant-print', - multiselect: 'is-multiselect' + multiselect: 'is-multiselect', + cantHyperlink: 'cant-hyperlink' }; SSE.Views.Toolbar = Backbone.View.extend(_.extend({ @@ -496,7 +497,7 @@ define([ id : 'id-toolbar-btn-inserthyperlink', cls : 'btn-toolbar', iconCls : 'btn-inserthyperlink', - lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.selShape, _set.multiselect, _set.lostConnect, _set.coAuth] + lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selImage, _set.selShape, _set.cantHyperlink, _set.multiselect, _set.lostConnect, _set.coAuth] }); me.btnInsertChart = new Common.UI.Button({