From 01f96a456ec1a4e78aca89091deb8c52deca6ded Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Wed, 1 Dec 2021 00:49:44 +0300 Subject: [PATCH] [desktop] changed controller --- .../forms/app/controller/ApplicationController.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/documenteditor/forms/app/controller/ApplicationController.js b/apps/documenteditor/forms/app/controller/ApplicationController.js index 43b62b389..4ac541bbb 100644 --- a/apps/documenteditor/forms/app/controller/ApplicationController.js +++ b/apps/documenteditor/forms/app/controller/ApplicationController.js @@ -1815,9 +1815,23 @@ define([ window.on_native_message = function (cmd, param) { if (/theme:changed/.test(cmd)) { Common.UI.Themes.setTheme(param); + } else + if (/window:features/.test(cmd)) { + var obj = JSON.parse(param); + if (_.isNumber(obj.skiptoparea)) { + $('.toolbar.top').css('top', obj.skiptoparea); + $('.viewer.top').css('top', 40 + obj.skiptoparea); + $('#title-doc-name')[obj.skiptoparea > 0 ? 'hide' : 'show'](); + } } }; + if ( !!window.native_message_cmd ) { + for ( var c in window.native_message_cmd ) { + window.on_native_message(c, window.native_message_cmd[c]); + } + } + Common.NotificationCenter.on({ 'uitheme:changed' : function (name) { var theme = Common.UI.Themes.get(name);