[DE][SSE] Show running inside-plugin in the left panel after hiding comment, chat, about panels.
This commit is contained in:
parent
a394ef749a
commit
3fb4d7abcb
|
@ -234,7 +234,7 @@ define([
|
||||||
this.iframePlugin = null;
|
this.iframePlugin = null;
|
||||||
}
|
}
|
||||||
this.currentPluginPanel.toggleClass('hidden', true);
|
this.currentPluginPanel.toggleClass('hidden', true);
|
||||||
this.pluginsPanel.toggleClass('hidden', false);
|
// this.pluginsPanel.toggleClass('hidden', false);
|
||||||
|
|
||||||
this.fireEvent('plugin:open', [this, 'onboard', 'close']);
|
this.fireEvent('plugin:open', [this, 'onboard', 'close']);
|
||||||
},
|
},
|
||||||
|
|
|
@ -539,6 +539,13 @@ define([
|
||||||
if (this.api)
|
if (this.api)
|
||||||
this.api.asc_enableKeyEvents(value);
|
this.api.asc_enableKeyEvents(value);
|
||||||
if (value) $(this.leftMenu.btnAbout.el).blur();
|
if (value) $(this.leftMenu.btnAbout.el).blur();
|
||||||
|
if (value && this.leftMenu._state.pluginIsRunning) {
|
||||||
|
this.leftMenu.panelPlugins.show();
|
||||||
|
if (this.mode.canCoAuthoring) {
|
||||||
|
this.mode.canComments && this.leftMenu.panelComments['hide']();
|
||||||
|
this.mode.canChat && this.leftMenu.panelChat['hide']();
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
menuFilesShowHide: function(state) {
|
menuFilesShowHide: function(state) {
|
||||||
|
@ -645,7 +652,9 @@ define([
|
||||||
this.leftMenu.close();
|
this.leftMenu.close();
|
||||||
this.leftMenu.panelPlugins.show();
|
this.leftMenu.panelPlugins.show();
|
||||||
this.leftMenu.onBtnMenuClick({pressed:true, options: {action: 'plugins'}});
|
this.leftMenu.onBtnMenuClick({pressed:true, options: {action: 'plugins'}});
|
||||||
|
this.leftMenu._state.pluginIsRunning = true;
|
||||||
} else {
|
} else {
|
||||||
|
this.leftMenu._state.pluginIsRunning = false;
|
||||||
this.leftMenu.close();
|
this.leftMenu.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,7 @@ define([
|
||||||
|
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
this.minimizedMode = true;
|
this.minimizedMode = true;
|
||||||
|
this._state = {};
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
|
@ -163,6 +164,7 @@ define([
|
||||||
onBtnMenuToggle: function(btn, state) {
|
onBtnMenuToggle: function(btn, state) {
|
||||||
if (state) {
|
if (state) {
|
||||||
btn.panel['show']();
|
btn.panel['show']();
|
||||||
|
if (!this._state.pluginIsRunning)
|
||||||
this.$el.width(SCALE_MIN);
|
this.$el.width(SCALE_MIN);
|
||||||
|
|
||||||
if (this.btnSearch.isActive())
|
if (this.btnSearch.isActive())
|
||||||
|
@ -190,7 +192,7 @@ define([
|
||||||
if (!(this.$el.width() > SCALE_MIN)) {
|
if (!(this.$el.width() > SCALE_MIN)) {
|
||||||
this.$el.width(parseInt(Common.localStorage.getItem('de-mainmenu-width')) || MENU_SCALE_PART);
|
this.$el.width(parseInt(Common.localStorage.getItem('de-mainmenu-width')) || MENU_SCALE_PART);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!this._state.pluginIsRunning) {
|
||||||
Common.localStorage.setItem('de-mainmenu-width',this.$el.width());
|
Common.localStorage.setItem('de-mainmenu-width',this.$el.width());
|
||||||
this.$el.width(SCALE_MIN);
|
this.$el.width(SCALE_MIN);
|
||||||
}
|
}
|
||||||
|
@ -221,12 +223,12 @@ define([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
if (this.mode.canPlugins && this.panelPlugins) {
|
// if (this.mode.canPlugins && this.panelPlugins) {
|
||||||
if (this.btnPlugins.pressed) {
|
// if (this.btnPlugins.pressed) {
|
||||||
this.panelPlugins.show();
|
// this.panelPlugins.show();
|
||||||
} else
|
// } else
|
||||||
this.panelPlugins['hide']();
|
// this.panelPlugins['hide']();
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
|
|
||||||
setOptionsPanel: function(name, panel) {
|
setOptionsPanel: function(name, panel) {
|
||||||
|
@ -262,6 +264,7 @@ define([
|
||||||
this.menuFile.hide();
|
this.menuFile.hide();
|
||||||
} else {
|
} else {
|
||||||
this.btnAbout.toggle(false);
|
this.btnAbout.toggle(false);
|
||||||
|
if (!this._state.pluginIsRunning)
|
||||||
this.$el.width(SCALE_MIN);
|
this.$el.width(SCALE_MIN);
|
||||||
/** coauthoring begin **/
|
/** coauthoring begin **/
|
||||||
if (this.mode.canCoAuthoring) {
|
if (this.mode.canCoAuthoring) {
|
||||||
|
@ -277,7 +280,7 @@ define([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
if (this.mode.canPlugins && this.panelPlugins) {
|
if (this.mode.canPlugins && this.panelPlugins && !this._state.pluginIsRunning) {
|
||||||
this.panelPlugins['hide']();
|
this.panelPlugins['hide']();
|
||||||
this.btnPlugins.toggle(false, true);
|
this.btnPlugins.toggle(false, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -607,6 +607,13 @@ define([
|
||||||
this.api.asc_enableKeyEvents(!state);
|
this.api.asc_enableKeyEvents(!state);
|
||||||
|
|
||||||
if (!state) $(this.leftMenu.btnAbout.el).blur();
|
if (!state) $(this.leftMenu.btnAbout.el).blur();
|
||||||
|
if (!state && this.leftMenu._state.pluginIsRunning) {
|
||||||
|
this.leftMenu.panelPlugins.show();
|
||||||
|
if (this.mode.canCoAuthoring) {
|
||||||
|
this.mode.canComments && this.leftMenu.panelComments['hide']();
|
||||||
|
this.mode.canChat && this.leftMenu.panelChat['hide']();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -739,7 +746,9 @@ define([
|
||||||
this.leftMenu.close();
|
this.leftMenu.close();
|
||||||
this.leftMenu.panelPlugins.show();
|
this.leftMenu.panelPlugins.show();
|
||||||
this.leftMenu.onBtnMenuClick({pressed:true, options: {action: 'plugins'}});
|
this.leftMenu.onBtnMenuClick({pressed:true, options: {action: 'plugins'}});
|
||||||
|
this.leftMenu._state.pluginIsRunning = true;
|
||||||
} else {
|
} else {
|
||||||
|
this.leftMenu._state.pluginIsRunning = false;
|
||||||
this.leftMenu.close();
|
this.leftMenu.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,7 @@ define([
|
||||||
|
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
this.minimizedMode = true;
|
this.minimizedMode = true;
|
||||||
|
this._state = {};
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
|
@ -153,6 +154,7 @@ define([
|
||||||
onBtnMenuToggle: function(btn, state) {
|
onBtnMenuToggle: function(btn, state) {
|
||||||
if (state) {
|
if (state) {
|
||||||
btn.panel['show']();
|
btn.panel['show']();
|
||||||
|
if (!this._state.pluginIsRunning)
|
||||||
this.$el.width(SCALE_MIN);
|
this.$el.width(SCALE_MIN);
|
||||||
|
|
||||||
if (this.btnSearch.isActive())
|
if (this.btnSearch.isActive())
|
||||||
|
@ -178,7 +180,7 @@ define([
|
||||||
if (!(this.$el.width() > SCALE_MIN)) {
|
if (!(this.$el.width() > SCALE_MIN)) {
|
||||||
this.$el.width(Common.localStorage.getItem('sse-mainmenu-width') || MENU_SCALE_PART);
|
this.$el.width(Common.localStorage.getItem('sse-mainmenu-width') || MENU_SCALE_PART);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!this._state.pluginIsRunning){
|
||||||
Common.localStorage.setItem('sse-mainmenu-width',this.$el.width());
|
Common.localStorage.setItem('sse-mainmenu-width',this.$el.width());
|
||||||
this.$el.width(SCALE_MIN);
|
this.$el.width(SCALE_MIN);
|
||||||
}
|
}
|
||||||
|
@ -208,12 +210,12 @@ define([
|
||||||
this.panelChat['hide']();
|
this.panelChat['hide']();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.mode.canPlugins && this.panelPlugins) {
|
// if (this.mode.canPlugins && this.panelPlugins) {
|
||||||
if (this.btnPlugins.pressed) {
|
// if (this.btnPlugins.pressed) {
|
||||||
this.panelPlugins.show();
|
// this.panelPlugins.show();
|
||||||
} else
|
// } else
|
||||||
this.panelPlugins['hide']();
|
// this.panelPlugins['hide']();
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
|
|
||||||
setOptionsPanel: function(name, panel) {
|
setOptionsPanel: function(name, panel) {
|
||||||
|
@ -241,6 +243,7 @@ define([
|
||||||
|
|
||||||
close: function(menu) {
|
close: function(menu) {
|
||||||
this.btnAbout.toggle(false);
|
this.btnAbout.toggle(false);
|
||||||
|
if (!this._state.pluginIsRunning)
|
||||||
this.$el.width(SCALE_MIN);
|
this.$el.width(SCALE_MIN);
|
||||||
/** coauthoring begin **/
|
/** coauthoring begin **/
|
||||||
if (this.mode.canCoAuthoring) {
|
if (this.mode.canCoAuthoring) {
|
||||||
|
@ -256,7 +259,7 @@ define([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/** coauthoring end **/
|
/** coauthoring end **/
|
||||||
if (this.mode.canPlugins && this.panelPlugins) {
|
if (this.mode.canPlugins && this.panelPlugins && !this._state.pluginIsRunning) {
|
||||||
this.panelPlugins['hide']();
|
this.panelPlugins['hide']();
|
||||||
this.btnPlugins.toggle(false, true);
|
this.btnPlugins.toggle(false, true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue