Commit c377fb54 authored by Sergey Luzyanin's avatar Sergey Luzyanin

Merge branch 'develop' of https://github.com/ONLYOFFICE/web-apps into develop

parents 45ed0809 5f631382
...@@ -25,8 +25,8 @@ require.config({ ...@@ -25,8 +25,8 @@ require.config({
jszip : '../vendor/jszip/jszip.min', jszip : '../vendor/jszip/jszip.min',
jsziputils : '../vendor/jszip-utils/jszip-utils.min', jsziputils : '../vendor/jszip-utils/jszip-utils.min',
jsrsasign : '../vendor/jsrsasign/jsrsasign-latest-all-min', jsrsasign : '../vendor/jsrsasign/jsrsasign-latest-all-min',
allfonts : '../sdkjs/common/AllFonts', allfonts : '../../sdkjs/common/AllFonts',
sdk : '../sdkjs/word/sdk-all', sdk : '../../sdkjs/word/sdk-all',
api : 'api/documents/api', api : 'api/documents/api',
core : 'common/main/lib/core/application', core : 'common/main/lib/core/application',
notification : 'common/main/lib/core/NotificationCenter', notification : 'common/main/lib/core/NotificationCenter',
......
...@@ -72,7 +72,7 @@ define([ ...@@ -72,7 +72,7 @@ define([
this.rightmenu.fireEvent('editcomplete', this.rightmenu); this.rightmenu.fireEvent('editcomplete', this.rightmenu);
}, },
onFocusObject: function(SelectedObjects) { onFocusObject: function(SelectedObjects, open) {
if (!this.editMode) if (!this.editMode)
return; return;
...@@ -158,7 +158,7 @@ define([ ...@@ -158,7 +158,7 @@ define([
if (!this._settings[Common.Utils.documentSettingsType.MailMerge].hidden) if (!this._settings[Common.Utils.documentSettingsType.MailMerge].hidden)
this._settings[Common.Utils.documentSettingsType.MailMerge].panel.setLocked(this._settings[Common.Utils.documentSettingsType.MailMerge].locked); this._settings[Common.Utils.documentSettingsType.MailMerge].panel.setLocked(this._settings[Common.Utils.documentSettingsType.MailMerge].locked);
if (!this.rightmenu.minimizedMode) { if (!this.rightmenu.minimizedMode || open) {
var active; var active;
if (priorityactive>-1) active = priorityactive; if (priorityactive>-1) active = priorityactive;
...@@ -166,8 +166,11 @@ define([ ...@@ -166,8 +166,11 @@ define([
else if (currentactive>=0) active = currentactive; else if (currentactive>=0) active = currentactive;
else if (!this._settings[Common.Utils.documentSettingsType.MailMerge].hidden) active = Common.Utils.documentSettingsType.MailMerge; else if (!this._settings[Common.Utils.documentSettingsType.MailMerge].hidden) active = Common.Utils.documentSettingsType.MailMerge;
if (active == undefined && open && lastactive>=0)
active = lastactive;
if (active !== undefined) { if (active !== undefined) {
this.rightmenu.SetActivePane(active); this.rightmenu.SetActivePane(active, open);
if (active!=Common.Utils.documentSettingsType.MailMerge) if (active!=Common.Utils.documentSettingsType.MailMerge)
this._settings[active].panel.ChangeSettings.call(this._settings[active].panel, this._settings[active].props); this._settings[active].panel.ChangeSettings.call(this._settings[active].panel, this._settings[active].props);
else else
...@@ -237,8 +240,12 @@ define([ ...@@ -237,8 +240,12 @@ define([
if (this.editMode && this.api) { if (this.editMode && this.api) {
var selectedElements = this.api.getSelectedElements(); var selectedElements = this.api.getSelectedElements();
if (selectedElements.length>0) if (selectedElements.length>0) {
this.onFocusObject(selectedElements); var open = Common.localStorage.getItem("de-hide-right-settings");
open = (open===null || parseInt(open) == 0);
this.onFocusObject(selectedElements, open);
}
} }
}, },
......
...@@ -194,7 +194,7 @@ define([ ...@@ -194,7 +194,7 @@ define([
$(this.el).width(MENU_SCALE_PART); $(this.el).width(MENU_SCALE_PART);
target_pane_parent.css("display", "inline-block" ); target_pane_parent.css("display", "inline-block" );
this.minimizedMode = false; this.minimizedMode = false;
Common.localStorage.setItem("de-hidden-right-settings", 0); Common.localStorage.setItem("de-hide-right-settings", 0);
} }
target_pane_parent.find('> .active').removeClass('active'); target_pane_parent.find('> .active').removeClass('active');
target_pane.addClass("active"); target_pane.addClass("active");
...@@ -206,7 +206,7 @@ define([ ...@@ -206,7 +206,7 @@ define([
target_pane_parent.css("display", "none" ); target_pane_parent.css("display", "none" );
$(this.el).width(SCALE_MIN); $(this.el).width(SCALE_MIN);
this.minimizedMode = true; this.minimizedMode = true;
Common.localStorage.setItem("de-hidden-right-settings", 1); Common.localStorage.setItem("de-hide-right-settings", 1);
} }
this.fireEvent('rightmenuclick', [this, btn.options.asctype, this.minimizedMode]); this.fireEvent('rightmenuclick', [this, btn.options.asctype, this.minimizedMode]);
...@@ -248,7 +248,6 @@ define([ ...@@ -248,7 +248,6 @@ define([
target_pane.css("display", "none" ); target_pane.css("display", "none" );
$(this.el).width(SCALE_MIN); $(this.el).width(SCALE_MIN);
this.minimizedMode = true; this.minimizedMode = true;
Common.localStorage.setItem("de-hidden-right-settings", 1);
Common.NotificationCenter.trigger('layout:changed', 'rightmenu'); Common.NotificationCenter.trigger('layout:changed', 'rightmenu');
}, },
......
...@@ -24,8 +24,8 @@ require.config({ ...@@ -24,8 +24,8 @@ require.config({
sockjs : '../vendor/sockjs/sockjs.min', sockjs : '../vendor/sockjs/sockjs.min',
jsziputils : '../vendor/jszip-utils/jszip-utils.min', jsziputils : '../vendor/jszip-utils/jszip-utils.min',
jsrsasign : '../vendor/jsrsasign/jsrsasign-latest-all-min', jsrsasign : '../vendor/jsrsasign/jsrsasign-latest-all-min',
allfonts : '../sdkjs/common/AllFonts', allfonts : '../../sdkjs/common/AllFonts',
sdk : '../sdkjs/slide/sdk-all', sdk : '../../sdkjs/slide/sdk-all',
api : 'api/documents/api', api : 'api/documents/api',
core : 'common/main/lib/core/application', core : 'common/main/lib/core/application',
notification : 'common/main/lib/core/NotificationCenter', notification : 'common/main/lib/core/NotificationCenter',
......
...@@ -71,7 +71,7 @@ define([ ...@@ -71,7 +71,7 @@ define([
this.rightmenu.fireEvent('editcomplete', this.rightmenu); this.rightmenu.fireEvent('editcomplete', this.rightmenu);
}, },
onFocusObject: function(SelectedObjects) { onFocusObject: function(SelectedObjects, open) {
if (!this.editMode) if (!this.editMode)
return; return;
...@@ -147,7 +147,7 @@ define([ ...@@ -147,7 +147,7 @@ define([
} }
} }
if (!this.rightmenu.minimizedMode) { if (!this.rightmenu.minimizedMode || open) {
var active; var active;
if (priorityactive>-1) active = priorityactive; if (priorityactive>-1) active = priorityactive;
...@@ -156,7 +156,7 @@ define([ ...@@ -156,7 +156,7 @@ define([
else active = Common.Utils.documentSettingsType.Slide; else active = Common.Utils.documentSettingsType.Slide;
if (active !== undefined) { if (active !== undefined) {
this.rightmenu.SetActivePane(active); this.rightmenu.SetActivePane(active, open);
this._settings[active].panel.ChangeSettings.call(this._settings[active].panel, this._settings[active].props); this._settings[active].panel.ChangeSettings.call(this._settings[active].panel, this._settings[active].props);
} }
} }
...@@ -214,8 +214,12 @@ define([ ...@@ -214,8 +214,12 @@ define([
this.api.asc_registerCallback('asc_doubleClickOnObject', _.bind(this.onDoubleClickOnObject, this)); this.api.asc_registerCallback('asc_doubleClickOnObject', _.bind(this.onDoubleClickOnObject, this));
var selectedElements = this.api.getSelectedElements(); var selectedElements = this.api.getSelectedElements();
if (selectedElements.length>0) if (selectedElements.length>0) {
this.onFocusObject(selectedElements); var open = Common.localStorage.getItem("pe-hide-right-settings");
open = (open===null || parseInt(open) == 0);
this.onFocusObject(selectedElements, open);
}
} }
}, },
......
...@@ -176,7 +176,7 @@ define([ ...@@ -176,7 +176,7 @@ define([
$(this.el).width(MENU_SCALE_PART); $(this.el).width(MENU_SCALE_PART);
target_pane_parent.css("display", "inline-block" ); target_pane_parent.css("display", "inline-block" );
this.minimizedMode = false; this.minimizedMode = false;
Common.localStorage.setItem("pe-hidden-right-settings", 0); Common.localStorage.setItem("pe-hide-right-settings", 0);
} }
target_pane_parent.find('> .active').removeClass('active'); target_pane_parent.find('> .active').removeClass('active');
target_pane.addClass("active"); target_pane.addClass("active");
...@@ -189,7 +189,7 @@ define([ ...@@ -189,7 +189,7 @@ define([
target_pane_parent.css("display", "none" ); target_pane_parent.css("display", "none" );
$(this.el).width(SCALE_MIN); $(this.el).width(SCALE_MIN);
this.minimizedMode = true; this.minimizedMode = true;
Common.localStorage.setItem("pe-hidden-right-settings", 1); Common.localStorage.setItem("pe-hide-right-settings", 1);
} }
this.fireEvent('rightmenuclick', [this, btn.options.asctype, this.minimizedMode]); this.fireEvent('rightmenuclick', [this, btn.options.asctype, this.minimizedMode]);
...@@ -245,7 +245,6 @@ define([ ...@@ -245,7 +245,6 @@ define([
target_pane.css("display", "none" ); target_pane.css("display", "none" );
$(this.el).width(SCALE_MIN); $(this.el).width(SCALE_MIN);
this.minimizedMode = true; this.minimizedMode = true;
Common.localStorage.setItem("pe-hidden-right-settings", 1);
Common.NotificationCenter.trigger('layout:changed', 'rightmenu'); Common.NotificationCenter.trigger('layout:changed', 'rightmenu');
}, },
......
...@@ -24,8 +24,8 @@ require.config({ ...@@ -24,8 +24,8 @@ require.config({
sockjs : '../vendor/sockjs/sockjs.min', sockjs : '../vendor/sockjs/sockjs.min',
jsziputils : '../vendor/jszip-utils/jszip-utils.min', jsziputils : '../vendor/jszip-utils/jszip-utils.min',
jsrsasign : '../vendor/jsrsasign/jsrsasign-latest-all-min', jsrsasign : '../vendor/jsrsasign/jsrsasign-latest-all-min',
allfonts : '../sdkjs/common/AllFonts', allfonts : '../../sdkjs/common/AllFonts',
sdk : '../sdkjs/cell/sdk-all', sdk : '../../sdkjs/cell/sdk-all',
api : 'api/documents/api', api : 'api/documents/api',
core : 'common/main/lib/core/application', core : 'common/main/lib/core/application',
notification : 'common/main/lib/core/NotificationCenter', notification : 'common/main/lib/core/NotificationCenter',
......
...@@ -156,16 +156,20 @@ define([ ...@@ -156,16 +156,20 @@ define([
} }
} }
if (!this.rightmenu.minimizedMode) { if (!this.rightmenu.minimizedMode || this._openRightMenu) {
var active; var active;
if (priorityactive>-1) active = priorityactive; if (priorityactive>-1) active = priorityactive;
else if (lastactive>=0 && currentactive<0) active = lastactive; else if (lastactive>=0 && currentactive<0) active = lastactive;
else if (currentactive>=0) active = currentactive; else if (currentactive>=0) active = currentactive;
if (active == undefined && this._openRightMenu && lastactive>=0)
active = lastactive;
if (active !== undefined) { if (active !== undefined) {
this.rightmenu.SetActivePane(active); this.rightmenu.SetActivePane(active, this._openRightMenu);
this._settings[active].panel.ChangeSettings.call(this._settings[active].panel, this._settings[active].props); this._settings[active].panel.ChangeSettings.call(this._settings[active].panel, this._settings[active].props);
this._openRightMenu = false;
} }
} }
...@@ -213,6 +217,9 @@ define([ ...@@ -213,6 +217,9 @@ define([
createDelayedElements: function() { createDelayedElements: function() {
var me = this; var me = this;
if (this.api) { if (this.api) {
var open = Common.localStorage.getItem("sse-hide-right-settings");
this._openRightMenu = (open===null || parseInt(open) == 0);
this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onFocusObject, this)); this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onFocusObject, this));
this.api.asc_registerCallback('asc_onSelectionChanged', _.bind(this.onSelectionChanged, this)); this.api.asc_registerCallback('asc_onSelectionChanged', _.bind(this.onSelectionChanged, this));
this.api.asc_registerCallback('asc_doubleClickOnObject', _.bind(this.onDoubleClickOnObject, this)); this.api.asc_registerCallback('asc_doubleClickOnObject', _.bind(this.onDoubleClickOnObject, this));
......
...@@ -150,7 +150,7 @@ define([ ...@@ -150,7 +150,7 @@ define([
$(this.el).width(MENU_SCALE_PART); $(this.el).width(MENU_SCALE_PART);
target_pane_parent.css("display", "inline-block" ); target_pane_parent.css("display", "inline-block" );
this.minimizedMode = false; this.minimizedMode = false;
Common.localStorage.setItem("sse-hidden-right-settings", 0); Common.localStorage.setItem("sse-hide-right-settings", 0);
} }
target_pane_parent.find('> .active').removeClass('active'); target_pane_parent.find('> .active').removeClass('active');
target_pane.addClass("active"); target_pane.addClass("active");
...@@ -162,7 +162,7 @@ define([ ...@@ -162,7 +162,7 @@ define([
target_pane_parent.css("display", "none" ); target_pane_parent.css("display", "none" );
$(this.el).width(SCALE_MIN); $(this.el).width(SCALE_MIN);
this.minimizedMode = true; this.minimizedMode = true;
Common.localStorage.setItem("sse-hidden-right-settings", 1); Common.localStorage.setItem("sse-hide-right-settings", 1);
} }
this.fireEvent('rightmenuclick', [this, btn.options.asctype, this.minimizedMode]); this.fireEvent('rightmenuclick', [this, btn.options.asctype, this.minimizedMode]);
...@@ -216,7 +216,6 @@ define([ ...@@ -216,7 +216,6 @@ define([
target_pane.css("display", "none" ); target_pane.css("display", "none" );
$(this.el).width(SCALE_MIN); $(this.el).width(SCALE_MIN);
this.minimizedMode = true; this.minimizedMode = true;
Common.localStorage.setItem("sse-hidden-right-settings", 1);
Common.NotificationCenter.trigger('layout:changed', 'rightmenu'); Common.NotificationCenter.trigger('layout:changed', 'rightmenu');
}, },
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<meta name="keywords" content="" /> <meta name="keywords" content="" />
<link rel="icon" href="resources/img/favicon.ico" type="image/x-icon" /> <link rel="icon" href="resources/img/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="../../../sdkjs/cell/css/main.css"/> <link rel="stylesheet" type="text/css" href="../../../../sdkjs/cell/css/main.css"/>
<link rel="stylesheet" type="text/css" href="../../../apps/spreadsheeteditor/main/resources/css/app.css"> <link rel="stylesheet" type="text/css" href="../../../apps/spreadsheeteditor/main/resources/css/app.css">
<!-- splash --> <!-- splash -->
......
This diff is collapsed.
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"homepage": "http://www.onlyoffice.com", "homepage": "http://www.onlyoffice.com",
"private": true, "private": true,
"dependencies": { "dependencies": {
"lodash": "3.0.0", "lodash": "^4.0.0",
"grunt": "0.4.5", "grunt": "0.4.5",
"grunt-exec": "0.4.5", "grunt-exec": "0.4.5",
"grunt-replace": "0.7.3", "grunt-replace": "0.7.3",
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment