Commit f8402c07 authored by Julia Radzhabova's avatar Julia Radzhabova

Merge branch 'develop' into feature/sse-table-settings

parents 653d6db3 c377fb54
...@@ -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',
......
...@@ -141,7 +141,7 @@ define([ ...@@ -141,7 +141,7 @@ define([
/* /*
* TODO: Workaround bug #25004. Clipboard feature processing in sdk. * TODO: Workaround bug #25004. Clipboard feature processing in sdk.
*/ */
if (!(Common.Utils.isSafari && Common.Utils.isMac)) { if (!(Common.Utils.isSafari && Common.Utils.isMac) && !/area_id/.test(e.target.id)) {
me.api.asc_enableKeyEvents(true); me.api.asc_enableKeyEvents(true);
if (/msg-reply/.test(e.target.className)) if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = false; me.dontCloseDummyComment = false;
......
...@@ -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);
}
} }
}, },
......
...@@ -78,6 +78,9 @@ define([ ...@@ -78,6 +78,9 @@ define([
menu.alignPosition(); menu.alignPosition();
} }
_.delay(function() { _.delay(function() {
var value = Common.localStorage.getItem("de-settings-inputmode"); // only for hieroglyphs mode
if (value!==null && parseInt(value) == 1)
me.api.asc_enableKeyEvents(false);
menu.cmpEl.focus(); menu.cmpEl.focus();
}, 10); }, 10);
......
...@@ -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');
}, },
......
...@@ -354,7 +354,7 @@ ...@@ -354,7 +354,7 @@
<script type="text/javascript" src="../../../../sdkjs/word/Drawing/ArcTo.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/Drawing/ArcTo.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/Drawing/Hit.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/Drawing/Hit.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/Drawing/ColorArray.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/Drawing/ColorArray.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/Drawing/Overlay.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/Overlay.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/Drawing/ShapeDrawer.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/Drawing/ShapeDrawer.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/Drawing/DrawingDocument.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/Drawing/DrawingDocument.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/Drawing/GraphicsEvents.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/Drawing/GraphicsEvents.js"></script>
......
...@@ -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',
......
...@@ -124,7 +124,7 @@ define([ ...@@ -124,7 +124,7 @@ define([
/* /*
* TODO: Workaround bug #25004. Clipboard feature processing in sdk. * TODO: Workaround bug #25004. Clipboard feature processing in sdk.
*/ */
if (!(Common.Utils.isSafari && Common.Utils.isMac)) { if (!(Common.Utils.isSafari && Common.Utils.isMac) && !/area_id/.test(e.target.id)) {
me.api.asc_enableKeyEvents(true); me.api.asc_enableKeyEvents(true);
if (/msg-reply/.test(e.target.className)) if (/msg-reply/.test(e.target.className))
me.dontCloseDummyComment = false; me.dontCloseDummyComment = false;
......
...@@ -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);
}
} }
}, },
......
...@@ -69,6 +69,9 @@ define([ ...@@ -69,6 +69,9 @@ define([
menu.alignPosition(); menu.alignPosition();
} }
_.delay(function() { _.delay(function() {
var value = Common.localStorage.getItem("pe-settings-inputmode"); // only for hieroglyphs mode
if (value!==null && parseInt(value) == 1)
me.api.asc_enableKeyEvents(false);
menu.cmpEl.focus(); menu.cmpEl.focus();
}, 10); }, 10);
......
...@@ -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');
}, },
......
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
<script type="text/javascript" src="../../../../sdkjs/word/Drawing/HatchPattern.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/Drawing/HatchPattern.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/Drawing/Graphics.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/Drawing/Graphics.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/Drawing/Overlay.js"></script> <script type="text/javascript" src="../../../../sdkjs/common/Overlay.js"></script>
<script type="text/javascript" src="../../../../sdkjs/word/Drawing/ShapeDrawer.js"></script> <script type="text/javascript" src="../../../../sdkjs/word/Drawing/ShapeDrawer.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/Drawing/Transitions.js"></script> <script type="text/javascript" src="../../../../sdkjs/slide/Drawing/Transitions.js"></script>
<script type="text/javascript" src="../../../../sdkjs/slide/Drawing/DrawingDocument.js"></script> <script type="text/javascript" src="../../../../sdkjs/slide/Drawing/DrawingDocument.js"></script>
......
...@@ -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',
......
...@@ -164,16 +164,20 @@ define([ ...@@ -164,16 +164,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;
} }
} }
...@@ -221,6 +225,9 @@ define([ ...@@ -221,6 +225,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));
......
...@@ -164,7 +164,7 @@ define([ ...@@ -164,7 +164,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");
...@@ -176,7 +176,7 @@ define([ ...@@ -176,7 +176,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]);
...@@ -231,7 +231,6 @@ define([ ...@@ -231,7 +231,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');
}, },
......
...@@ -368,7 +368,7 @@ ...@@ -368,7 +368,7 @@
<script src="../../../../sdkjs/cell/view/DrawingObjectsController.js"></script> <script src="../../../../sdkjs/cell/view/DrawingObjectsController.js"></script>
<script src="../../../../sdkjs/cell/model/DrawingObjects/Graphics.js"></script> <script src="../../../../sdkjs/cell/model/DrawingObjects/Graphics.js"></script>
<script src="../../../../sdkjs/cell/model/DrawingObjects/Overlay.js"></script> <script src="../../../../sdkjs/common/Overlay.js"></script>
<script src="../../../../sdkjs/cell/model/DrawingObjects/ShapeDrawer.js"></script> <script src="../../../../sdkjs/cell/model/DrawingObjects/ShapeDrawer.js"></script>
<script src="../../../../sdkjs/cell/model/DrawingObjects/DrawingDocument.js"></script> <script src="../../../../sdkjs/cell/model/DrawingObjects/DrawingDocument.js"></script>
......
...@@ -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