Merge branch 'release/v7.1.0' into develop

This commit is contained in:
Julia Radzhabova 2022-05-15 11:25:31 +03:00
commit 40061edafa
12 changed files with 95 additions and 71 deletions

View file

@ -287,6 +287,9 @@ define([
this.popover = Common.Views.ReviewPopover.prototype.getPopover({ this.popover = Common.Views.ReviewPopover.prototype.getPopover({
reviewStore : this.popoverChanges, reviewStore : this.popoverChanges,
renderTo : this.sdkViewName, renderTo : this.sdkViewName,
canRequestUsers: (this.appConfig) ? this.appConfig.canRequestUsers : undefined,
canRequestSendNotify: (this.appConfig) ? this.appConfig.canRequestSendNotify : undefined,
mentionShare: (this.appConfig) ? this.appConfig.mentionShare : true,
api: this.api api: this.api
}); });
this.popover.setReviewStore(this.popoverChanges); this.popover.setReviewStore(this.popoverChanges);

View file

@ -82,7 +82,6 @@ define([
mode: mode, mode: mode,
compactToolbar: this.toolbar.toolbar.isCompactView compactToolbar: this.toolbar.toolbar.isCompactView
}); });
this.addListeners({ this.addListeners({
'ViewTab': { 'ViewTab': {
'zoom:topage': _.bind(this.onBtnZoomTo, this, 'topage'), 'zoom:topage': _.bind(this.onBtnZoomTo, this, 'topage'),
@ -128,6 +127,10 @@ define([
})).then(function(){ })).then(function(){
me.view.setEvents(); me.view.setEvents();
if (!Common.UI.Themes.available()) {
me.view.btnInterfaceTheme.$el.closest('.group').remove();
me.view.$el.find('.separator-theme').remove();
}
if (config.canBrandingExt && config.customization && config.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar')) { if (config.canBrandingExt && config.customization && config.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar')) {
me.view.chStatusbar.$el.remove(); me.view.chStatusbar.$el.remove();
var slotChkRulers = me.view.chRulers.$el, var slotChkRulers = me.view.chRulers.$el,
@ -153,6 +156,7 @@ define([
me.view.turnNavigation(state); me.view.turnNavigation(state);
}); });
if (Common.UI.Themes.available()) {
var menuItems = [], var menuItems = [],
currentTheme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(); currentTheme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId();
for (var t in Common.UI.Themes.map()) { for (var t in Common.UI.Themes.map()) {
@ -178,6 +182,7 @@ define([
Common.Utils.lockControls(Common.enumLock.inLightTheme, !Common.UI.Themes.isDarkTheme(), {array: [me.view.btnDarkDocument]}); Common.Utils.lockControls(Common.enumLock.inLightTheme, !Common.UI.Themes.isDarkTheme(), {array: [me.view.btnDarkDocument]});
}, 0); }, 0);
} }
}
}); });
} }
}, },
@ -255,7 +260,7 @@ define([
}, },
onThemeChanged: function () { onThemeChanged: function () {
if (this.view) { if (this.view && Common.UI.Themes.available()) {
var current_theme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(), var current_theme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(),
menu_item = _.findWhere(this.view.btnInterfaceTheme.menu.items, {value: current_theme}); menu_item = _.findWhere(this.view.btnInterfaceTheme.menu.items, {value: current_theme});
if ( menu_item ) { if ( menu_item ) {

View file

@ -73,7 +73,7 @@ define([
'<span class="btn-slot text x-huge" id="slot-btn-interface-theme"></span>' + '<span class="btn-slot text x-huge" id="slot-btn-interface-theme"></span>' +
'<span class="btn-slot text x-huge" id="slot-btn-dark-document"></span>' + '<span class="btn-slot text x-huge" id="slot-btn-dark-document"></span>' +
'</div>' + '</div>' +
'<div class="separator long"></div>' + '<div class="separator long separator-theme"></div>' +
'<div class="group small">' + '<div class="group small">' +
'<div class="elset">' + '<div class="elset">' +
'<span class="btn-slot text" id="slot-chk-toolbar"></span>' + '<span class="btn-slot text" id="slot-chk-toolbar"></span>' +

View file

@ -255,8 +255,10 @@
window.frameEditorId = params["frameEditorId"]; window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"]; window.parentOrigin = params["parentOrigin"];
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
document.write('<script src="../../common/main/lib/util/fix-ie-compat.js"><\/script>'); document.write('<script src="../../common/main/lib/util/fix-ie-compat.js"><\/script>');
document.write('<script src="../../../../sdkjs/vendor/string.js"><\/script>');
}
</script> </script>
<script src="../../common/main/lib/util/themeinit.js"></script> <script src="../../common/main/lib/util/themeinit.js"></script>

View file

@ -85,7 +85,6 @@ define([
mode: mode, mode: mode,
compactToolbar: this.toolbar.toolbar.isCompactView compactToolbar: this.toolbar.toolbar.isCompactView
}); });
this.addListeners({ this.addListeners({
'ViewTab': { 'ViewTab': {
'zoom:toslide': _.bind(this.onBtnZoomTo, this, 'toslide'), 'zoom:toslide': _.bind(this.onBtnZoomTo, this, 'toslide'),
@ -152,6 +151,10 @@ define([
})).then(function () { })).then(function () {
me.view.setEvents(); me.view.setEvents();
if (!Common.UI.Themes.available()) {
me.view.btnInterfaceTheme.$el.closest('.group').remove();
me.view.$el.find('.separator-theme').remove();
}
if (config.canBrandingExt && config.customization && config.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar')) { if (config.canBrandingExt && config.customization && config.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar')) {
me.view.chStatusbar.$el.remove(); me.view.chStatusbar.$el.remove();
@ -173,6 +176,7 @@ define([
.on('combo:blur', _.bind(me.onComboBlur, me, false)); .on('combo:blur', _.bind(me.onComboBlur, me, false));
}); });
if (Common.UI.Themes.available()) {
var menuItems = [], var menuItems = [],
currentTheme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(); currentTheme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId();
for (var t in Common.UI.Themes.map()) { for (var t in Common.UI.Themes.map()) {
@ -193,6 +197,7 @@ define([
}, this)); }, this));
} }
} }
}
}, },
onBtnZoomTo: function (type, btn) { onBtnZoomTo: function (type, btn) {
@ -220,7 +225,7 @@ define([
}, },
onThemeChanged: function () { onThemeChanged: function () {
if (this.view) { if (this.view && Common.UI.Themes.available()) {
var current_theme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(), var current_theme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(),
menu_item = _.findWhere(this.view.btnInterfaceTheme.menu.items, {value: current_theme}); menu_item = _.findWhere(this.view.btnInterfaceTheme.menu.items, {value: current_theme});
if ( !!menu_item ) { if ( !!menu_item ) {

View file

@ -68,7 +68,7 @@ define([
'<div class="group">' + '<div class="group">' +
'<span class="btn-slot text x-huge" id="slot-btn-interface-theme"></span>' + '<span class="btn-slot text x-huge" id="slot-btn-interface-theme"></span>' +
'</div>' + '</div>' +
'<div class="separator long"></div>' + '<div class="separator long separator-theme"></div>' +
'<div class="group small">' + '<div class="group small">' +
'<div class="elset">' + '<div class="elset">' +
'<span class="btn-slot text" id="slot-chk-notes"></span>' + '<span class="btn-slot text" id="slot-chk-notes"></span>' +

View file

@ -270,8 +270,10 @@
window.frameEditorId = params["frameEditorId"]; window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"]; window.parentOrigin = params["parentOrigin"];
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
document.write('<script src="../../common/main/lib/util/fix-ie-compat.js"><\/script>'); document.write('<script src="../../common/main/lib/util/fix-ie-compat.js"><\/script>');
document.write('<script src="../../../../sdkjs/vendor/string.js"><\/script>');
}
</script> </script>
<!-- debug begin --> <!-- debug begin -->

View file

@ -123,6 +123,7 @@
background-color: @highlight-button-pressed; background-color: @highlight-button-pressed;
> a { > a {
color: @text-normal-pressed-ie;
color: @text-normal-pressed; color: @text-normal-pressed;
} }
} }

View file

@ -84,7 +84,6 @@ define([
mode: mode, mode: mode,
compactToolbar: this.toolbar.toolbar.isCompactView compactToolbar: this.toolbar.toolbar.isCompactView
}); });
this.addListeners({ this.addListeners({
'ViewTab': { 'ViewTab': {
'zoom:selected': _.bind(this.onSelectedZoomValue, this), 'zoom:selected': _.bind(this.onSelectedZoomValue, this),
@ -276,7 +275,7 @@ define([
}, },
onThemeChanged: function () { onThemeChanged: function () {
if (this.view) { if (this.view && Common.UI.Themes.available()) {
var current_theme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(), var current_theme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(),
menu_item = _.findWhere(this.view.btnInterfaceTheme.menu.items, {value: current_theme}); menu_item = _.findWhere(this.view.btnInterfaceTheme.menu.items, {value: current_theme});
if ( !!menu_item ) { if ( !!menu_item ) {

View file

@ -71,7 +71,7 @@ define([
'<div class="group">' + '<div class="group">' +
'<span class="btn-slot text x-huge" id="slot-btn-interface-theme"></span>' + '<span class="btn-slot text x-huge" id="slot-btn-interface-theme"></span>' +
'</div>' + '</div>' +
'<div class="separator long"></div>' + '<div class="separator long separator-theme"></div>' +
'<div class="group sheet-freeze">' + '<div class="group sheet-freeze">' +
'<span class="btn-slot text x-huge" id="slot-btn-freeze"></span>' + '<span class="btn-slot text x-huge" id="slot-btn-freeze"></span>' +
'</div>' + '</div>' +
@ -307,7 +307,6 @@ define([
dataHintOffset: 'small' dataHintOffset: 'small'
}); });
this.lockedControls.push(this.chToolbar); this.lockedControls.push(this.chToolbar);
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this)); Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
}, },
@ -385,6 +384,11 @@ define([
me.toolbar && me.toolbar.$el.find('.group.sheet-gridlines').hide(); me.toolbar && me.toolbar.$el.find('.group.sheet-gridlines').hide();
} }
if (!Common.UI.Themes.available()) {
me.btnInterfaceTheme.$el.closest('.group').remove();
me.$el.find('.separator-theme').remove();
}
if (config.canBrandingExt && config.customization && config.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar')) { if (config.canBrandingExt && config.customization && config.customization.statusBar === false || !Common.UI.LayoutManager.isElementVisible('statusBar')) {
me.chStatusbar.$el.remove(); me.chStatusbar.$el.remove();
if (!config.isEdit) { if (!config.isEdit) {
@ -396,6 +400,7 @@ define([
me.$el.find('.separator-formula').remove(); me.$el.find('.separator-formula').remove();
} }
} }
if (Common.UI.Themes.available()) {
var menuItems = [], var menuItems = [],
currentTheme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId(); currentTheme = Common.UI.Themes.currentThemeId() || Common.UI.Themes.defaultThemeId();
for (var t in Common.UI.Themes.map()) { for (var t in Common.UI.Themes.map()) {
@ -407,7 +412,6 @@ define([
toggleGroup: 'interface-theme' toggleGroup: 'interface-theme'
}); });
} }
if (menuItems.length) { if (menuItems.length) {
me.btnInterfaceTheme.setMenu(new Common.UI.Menu({items: menuItems})); me.btnInterfaceTheme.setMenu(new Common.UI.Menu({items: menuItems}));
me.btnInterfaceTheme.menu.on('item:click', _.bind(function (menu, item) { me.btnInterfaceTheme.menu.on('item:click', _.bind(function (menu, item) {
@ -415,7 +419,7 @@ define([
Common.UI.Themes.setTheme(value); Common.UI.Themes.setTheme(value);
}, me)); }, me));
} }
}
setEvents.call(me); setEvents.call(me);
}); });
}, },

View file

@ -278,8 +278,10 @@
window.frameEditorId = params["frameEditorId"]; window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"]; window.parentOrigin = params["parentOrigin"];
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) {
document.write('<script src="../../common/main/lib/util/fix-ie-compat.js"><\/script>'); document.write('<script src="../../common/main/lib/util/fix-ie-compat.js"><\/script>');
document.write('<script src="../../../../sdkjs/vendor/string.js"><\/script>');
}
</script> </script>
<link rel="stylesheet" type="text/css" href="../../../../sdkjs/cell/css/main.css"/> <link rel="stylesheet" type="text/css" href="../../../../sdkjs/cell/css/main.css"/>

View file

@ -117,6 +117,7 @@
background-color: @highlight-button-pressed; background-color: @highlight-button-pressed;
> a { > a {
color: @text-normal-pressed-ie;
color: @text-normal-pressed; color: @text-normal-pressed;
} }
} }