Plugins: add isDisplayedInViewer parameter for display/hide plugin in the viewer interface
This commit is contained in:
parent
262387a139
commit
4db246e4a6
|
@ -56,6 +56,7 @@ define([
|
|||
index: 0,
|
||||
icons: undefined,
|
||||
isViewer: false,
|
||||
isDisplayedInViewer: true,
|
||||
EditorsSupport: ["word", "cell", "slide"],
|
||||
isVisual: false,
|
||||
isCustomWindow: false,
|
||||
|
|
|
@ -2099,7 +2099,7 @@ define([
|
|||
var variationsArr = [],
|
||||
pluginVisible = false;
|
||||
item.variations.forEach(function(itemVar){
|
||||
var visible = (isEdit || itemVar.isViewer) && _.contains(itemVar.EditorsSupport, 'word');
|
||||
var visible = (isEdit || itemVar.isViewer && (itemVar.isDisplayedInViewer!==false)) && _.contains(itemVar.EditorsSupport, 'word');
|
||||
if ( visible ) pluginVisible = true;
|
||||
|
||||
if (item.isUICustomizer ) {
|
||||
|
|
|
@ -1845,7 +1845,7 @@ define([
|
|||
var variationsArr = [],
|
||||
pluginVisible = false;
|
||||
item.variations.forEach(function(itemVar){
|
||||
var visible = (isEdit || itemVar.isViewer) && _.contains(itemVar.EditorsSupport, 'slide');
|
||||
var visible = (isEdit || itemVar.isViewer && (itemVar.isDisplayedInViewer!==false)) && _.contains(itemVar.EditorsSupport, 'slide');
|
||||
if ( visible ) pluginVisible = true;
|
||||
|
||||
if ( item.isUICustomizer ) {
|
||||
|
|
|
@ -2042,7 +2042,7 @@ define([
|
|||
var variationsArr = [],
|
||||
pluginVisible = false;
|
||||
item.variations.forEach(function(itemVar){
|
||||
var visible = (isEdit || itemVar.isViewer) && _.contains(itemVar.EditorsSupport, 'cell');
|
||||
var visible = (isEdit || itemVar.isViewer && (itemVar.isDisplayedInViewer!==false)) && _.contains(itemVar.EditorsSupport, 'cell');
|
||||
if ( visible ) pluginVisible = true;
|
||||
|
||||
if ( item.isUICustomizer ) {
|
||||
|
|
Loading…
Reference in a new issue