Add Suggest a Feature to File menu
@ -274,7 +274,8 @@
|
||||
showHorizontalScroll: true/false, // show/hide scroll in the spreadsheet editor by default
|
||||
startFillingForm: {
|
||||
text: 'Share & collect' // caption of the start filling button, used for pdf-forms
|
||||
}
|
||||
},
|
||||
suggestFeature: true/false
|
||||
},
|
||||
coEditing: {
|
||||
mode: 'fast', // <coauthoring mode>, 'fast' or 'strict'. if 'fast' and 'customization.autosave'=false -> set 'customization.autosave'=true. 'fast' - default for editor
|
||||
|
||||
|
After Width: | Height: | Size: 613 B |
|
After Width: | Height: | Size: 668 B |
|
After Width: | Height: | Size: 807 B |
|
After Width: | Height: | Size: 527 B |
@ -0,0 +1,3 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.5 17.5H7.5V18C7.5 18.2761 7.72386 18.5 8 18.5H12C12.2761 18.5 12.5 18.2761 12.5 18V17.5ZM7.5 16.5H12.5V15.5H7.5V16.5ZM15.5 8C15.5 4.96243 13.0376 2.5 10 2.5C6.96243 2.5 4.5 4.96243 4.5 8C4.5 9.65629 5.23136 11.1413 6.39062 12.1504C6.99689 12.678 7.49989 13.4451 7.5 14.3506V14.5H9.5V10.207L7.64648 8.35352L7.58203 8.27539C7.45387 8.08131 7.47562 7.81735 7.64648 7.64648C7.81735 7.47562 8.08131 7.45387 8.27539 7.58203L8.35352 7.64648L10 9.29297L11.6465 7.64648C11.8417 7.45122 12.1583 7.45122 12.3535 7.64648C12.5488 7.84175 12.5488 8.15825 12.3535 8.35352L10.5 10.207V14.5H12.5V14.3506C12.5001 13.4451 13.0031 12.678 13.6094 12.1504C14.7686 11.1413 15.5 9.65629 15.5 8ZM16.5 8C16.5 9.9578 15.634 11.7143 14.2656 12.9053C13.7951 13.3149 13.5001 13.8284 13.5 14.3506V18C13.5 18.8284 12.8284 19.5 12 19.5H8C7.17157 19.5 6.5 18.8284 6.5 18V14.3506C6.49989 13.8284 6.20494 13.3149 5.73438 12.9053C4.36602 11.7143 3.5 9.9578 3.5 8C3.5 4.41015 6.41015 1.5 10 1.5C13.5899 1.5 16.5 4.41015 16.5 8Z" fill="black"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 959 B |
|
After Width: | Height: | Size: 946 B |
|
After Width: | Height: | Size: 981 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 777 B |
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.5 3.5C15.0899 3.5 18 6.41015 18 10C18 11.9578 17.134 13.7143 15.7656 14.9053C15.2951 15.3149 15.0001 15.8284 15 16.3506V19.5C15 20.3284 14.3284 21 13.5 21H9.5C8.67157 21 8 20.3284 8 19.5V16.3506C7.99989 15.8284 7.70494 15.3149 7.23438 14.9053C5.86602 13.7143 5 11.9578 5 10C5 6.41015 7.91015 3.5 11.5 3.5ZM9 19.5C9 19.7761 9.22386 20 9.5 20H13.5C13.7761 20 14 19.7761 14 19.5V19H9V19.5ZM9 18H14V17H9V18ZM11.5 4.5C8.46243 4.5 6 6.96243 6 10C6 11.6563 6.73136 13.1413 7.89062 14.1504C8.41697 14.6085 8.86553 15.2471 8.97461 16H11V11.707L9.14648 9.85352L9.08203 9.77539C8.95387 9.58131 8.97562 9.31735 9.14648 9.14648C9.31735 8.97562 9.58131 8.95387 9.77539 9.08203L9.85352 9.14648L11.5 10.793L13.1465 9.14648C13.3417 8.95122 13.6583 8.95122 13.8535 9.14648C14.0488 9.34175 14.0488 9.65825 13.8535 9.85352L12 11.707V16H14.0254C14.1345 15.2471 14.583 14.6085 15.1094 14.1504C16.2686 13.1413 17 11.6563 17 10C17 6.96243 14.5376 4.5 11.5 4.5Z" fill="#383838"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
@ -307,6 +307,7 @@ define([
|
||||
case 'switch:mobile':
|
||||
Common.Gateway.switchEditorType('mobile', true);
|
||||
break;
|
||||
case 'suggest': Common.NotificationCenter.trigger('suggest'); break;
|
||||
default: close_menu = false;
|
||||
}
|
||||
|
||||
|
||||
@ -243,6 +243,7 @@ define([
|
||||
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
||||
Common.NotificationCenter.on('suggest', _.bind(this.onSuggest, this));
|
||||
Common.NotificationCenter.on('close', _.bind(this.closeEditor, this));
|
||||
Common.NotificationCenter.on('markfavorite', _.bind(this.markFavorite, this));
|
||||
Common.NotificationCenter.on('download:advanced', _.bind(this.onAdvancedOptions, this));
|
||||
@ -1016,6 +1017,10 @@ define([
|
||||
}
|
||||
},
|
||||
|
||||
onSuggest: function() {
|
||||
window.open('{{SUGGEST_URL}}', "_blank");
|
||||
},
|
||||
|
||||
closeEditor: function() {
|
||||
this.appOptions.canRequestClose && this.onRequestClose();
|
||||
},
|
||||
@ -1745,6 +1750,9 @@ define([
|
||||
this.appOptions.canDownload = this.permissions.download !== false;
|
||||
this.appOptions.showSaveButton = this.appOptions.isEdit || !this.appOptions.isRestrictedEdit && this.appOptions.isPDFForm && this.appOptions.canDownload; // save to file or save to file copy (for pdf-form viewer)
|
||||
|
||||
var suggestUrl = '{{SUGGEST_URL}}';
|
||||
this.appOptions.canSuggest = suggestUrl && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.suggestFeature===false);
|
||||
|
||||
if (this.appOptions.isPDFForm && !this.appOptions.isEdit && !this.appOptions.isRestrictedEdit) {
|
||||
if (!this.appOptions.isRestrictedEdit && !this.appOptions.canEdit)
|
||||
this.appOptions.canRequestEditRights = false; // if open form in viewer - check permissions.edit option
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
<li class="devider"></li>
|
||||
<li id="fm-btn-settings" class="fm-btn" data-layout-name="toolbar-file-settings"></li>
|
||||
<li id="fm-btn-help" class="fm-btn"></li>
|
||||
<li id="fm-btn-suggest" class="fm-btn"></li>
|
||||
</div>
|
||||
<div class="panel-context">
|
||||
<div id="panel-saveas" class="content-box"></div>
|
||||
|
||||
@ -312,6 +312,17 @@ define([
|
||||
iconCls: 'menu__icon btn-goback'
|
||||
});
|
||||
|
||||
this.miSuggest = new Common.UI.MenuItem({
|
||||
el : $markup.elementById('#fm-btn-suggest'),
|
||||
action : 'suggest',
|
||||
caption : this.btnSuggestCaption,
|
||||
canFocused: false,
|
||||
dataHint: 1,
|
||||
dataHintDirection: 'left-top',
|
||||
dataHintOffset: [-2, 22],
|
||||
iconCls: 'menu__icon btn-suggest-feature'
|
||||
});
|
||||
|
||||
this.items = [];
|
||||
this.items.push(
|
||||
this.miClose,
|
||||
@ -331,7 +342,8 @@ define([
|
||||
this.miHistory,
|
||||
this.miSettings,
|
||||
this.miHelp,
|
||||
this.miBack
|
||||
this.miBack,
|
||||
this.miSuggest
|
||||
);
|
||||
|
||||
this.rendered = true;
|
||||
@ -441,6 +453,8 @@ define([
|
||||
this.miSettings[isVisible?'show':'hide']();
|
||||
isVisible = this.mode.canHelp;
|
||||
this.miHelp[isVisible ?'show':'hide']();
|
||||
isVisible = this.mode.canSuggest;
|
||||
this.miSuggest[isVisible ?'show':'hide']();
|
||||
|
||||
// 5: Close button
|
||||
isVisible = this.mode.canBack;
|
||||
|
||||
@ -2193,6 +2193,7 @@
|
||||
"DE.Views.EditListItemDialog.textValueError": "An item with the same value already exists.",
|
||||
"DE.Views.FileMenu.ariaFileMenu": "File menu",
|
||||
"DE.Views.FileMenu.btnBackCaption": "Open File Location",
|
||||
"DE.Views.FileMenu.btnSuggestCaption": "Suggest a Feature",
|
||||
"DE.Views.FileMenu.btnCloseEditor": "Close File",
|
||||
"DE.Views.FileMenu.btnCloseMenuCaption": "Back",
|
||||
"DE.Views.FileMenu.btnCreateNewCaption": "Create New",
|
||||
|
||||
@ -261,6 +261,7 @@ define([
|
||||
break;
|
||||
case 'close-editor': Common.NotificationCenter.trigger('close'); break;
|
||||
case 'switch:mobile': Common.Gateway.switchEditorType('mobile', true); break;
|
||||
case 'suggest': Common.NotificationCenter.trigger('suggest'); break;
|
||||
default: close_menu = false;
|
||||
}
|
||||
|
||||
|
||||
@ -187,6 +187,7 @@ define([
|
||||
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
||||
Common.NotificationCenter.on('suggest', _.bind(this.onSuggest, this));
|
||||
Common.NotificationCenter.on('close', _.bind(this.closeEditor, this));
|
||||
Common.NotificationCenter.on('markfavorite', _.bind(this.markFavorite, this));
|
||||
Common.NotificationCenter.on('download:advanced', _.bind(this.onAdvancedOptions, this));
|
||||
@ -746,6 +747,10 @@ define([
|
||||
}
|
||||
},
|
||||
|
||||
onSuggest: function() {
|
||||
window.open('{{SUGGEST_URL}}', "_blank");
|
||||
},
|
||||
|
||||
closeEditor: function() {
|
||||
this.appOptions.canRequestClose && this.onRequestClose();
|
||||
},
|
||||
@ -1372,6 +1377,9 @@ define([
|
||||
this.appOptions.canDownload = this.permissions.download !== false;
|
||||
this.appOptions.showSaveButton = this.appOptions.isEdit && !this.appOptions.isPDFFill && (this.appOptions.canSaveToFile || this.appOptions.canDownload);
|
||||
|
||||
var suggestUrl = '{{SUGGEST_URL}}';
|
||||
this.appOptions.canSuggest = suggestUrl && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.suggestFeature===false);
|
||||
|
||||
this.appOptions.compactHeader = this.appOptions.customization && (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compactHeader;
|
||||
this.appOptions.twoLevelHeader = this.appOptions.isEdit || this.appOptions.isRestrictedEdit; // when compactHeader=true some buttons move to toolbar
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
<li class="devider"></li>
|
||||
<li id="fm-btn-settings" class="fm-btn" data-layout-name="toolbar-file-settings"></li>
|
||||
<li id="fm-btn-help" class="fm-btn"></li>
|
||||
<li id="fm-btn-suggest" class="fm-btn"></li>
|
||||
</div>
|
||||
<div class="panel-context">
|
||||
<div id="panel-saveas" class="content-box"></div>
|
||||
|
||||
@ -299,6 +299,17 @@ define([
|
||||
iconCls: 'menu__icon btn-goback'
|
||||
});
|
||||
|
||||
this.miSuggest = new Common.UI.MenuItem({
|
||||
el : $markup.elementById('#fm-btn-suggest'),
|
||||
action : 'suggest',
|
||||
caption : this.btnSuggestCaption,
|
||||
canFocused: false,
|
||||
dataHint: 1,
|
||||
dataHintDirection: 'left-top',
|
||||
dataHintOffset: [-2, 22],
|
||||
iconCls: 'menu__icon btn-suggest-feature'
|
||||
});
|
||||
|
||||
this.items = [];
|
||||
this.items.push(
|
||||
this.miClose,
|
||||
@ -317,7 +328,8 @@ define([
|
||||
this.miAccess,
|
||||
this.miSettings,
|
||||
this.miHelp,
|
||||
this.miBack
|
||||
this.miBack,
|
||||
this.miSuggest
|
||||
);
|
||||
|
||||
this.rendered = true;
|
||||
@ -421,6 +433,9 @@ define([
|
||||
isVisible = this.mode.canBack;
|
||||
this.miBack[isVisible ?'show':'hide']();
|
||||
|
||||
isVisible = this.mode.canSuggest;
|
||||
this.miSuggest[isVisible ?'show':'hide']();
|
||||
|
||||
if (!this.customizationDone) {
|
||||
this.customizationDone = true;
|
||||
this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text);
|
||||
|
||||
@ -1260,6 +1260,7 @@
|
||||
"PDFE.Views.DocumentHolder.vertAlignText": "Vertical alignment",
|
||||
"PDFE.Views.FileMenu.ariaFileMenu": "File menu",
|
||||
"PDFE.Views.FileMenu.btnBackCaption": "Open File Location",
|
||||
"PDFE.Views.FileMenu.btnSuggestCaption": "Suggest a Feature",
|
||||
"PDFE.Views.FileMenu.btnCloseEditor": "Close File",
|
||||
"PDFE.Views.FileMenu.btnCloseMenuCaption": "Back",
|
||||
"PDFE.Views.FileMenu.btnCreateNewCaption": "Create New",
|
||||
|
||||
@ -279,6 +279,7 @@ define([
|
||||
case 'external-help': close_menu = true; break;
|
||||
case 'close-editor': Common.NotificationCenter.trigger('close'); break;
|
||||
case 'switch:mobile': Common.Gateway.switchEditorType('mobile', true); break;
|
||||
case 'suggest': Common.NotificationCenter.trigger('suggest'); break;
|
||||
default: close_menu = false;
|
||||
}
|
||||
|
||||
|
||||
@ -233,6 +233,7 @@ define([
|
||||
this.api.asc_registerCallback('asc_onEndDemonstration', _.bind(this.onEndDemonstration, this));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
||||
Common.NotificationCenter.on('suggest', _.bind(this.onSuggest, this));
|
||||
Common.NotificationCenter.on('close', _.bind(this.closeEditor, this));
|
||||
Common.NotificationCenter.on('showmessage', _.bind(this.onExternalMessage, this));
|
||||
Common.NotificationCenter.on('showerror', _.bind(this.onError, this));
|
||||
@ -657,6 +658,10 @@ define([
|
||||
}
|
||||
},
|
||||
|
||||
onSuggest: function() {
|
||||
window.open('{{SUGGEST_URL}}', "_blank");
|
||||
},
|
||||
|
||||
closeEditor: function() {
|
||||
this.appOptions.canRequestClose && this.onRequestClose();
|
||||
},
|
||||
@ -1379,6 +1384,9 @@ define([
|
||||
this.appOptions.canSaveToFile = this.appOptions.isEdit || this.appOptions.isRestrictedEdit;
|
||||
this.appOptions.showSaveButton = this.appOptions.isEdit;
|
||||
|
||||
var suggestUrl = '{{SUGGEST_URL}}';
|
||||
this.appOptions.canSuggest = suggestUrl && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.suggestFeature===false);
|
||||
|
||||
this.appOptions.compactHeader = this.appOptions.customization && (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compactHeader;
|
||||
this.appOptions.twoLevelHeader = this.appOptions.isEdit; // when compactHeader=true some buttons move to toolbar
|
||||
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
<li class="devider"></li>
|
||||
<li id="fm-btn-settings" class="fm-btn" data-layout-name="toolbar-file-settings"></li>
|
||||
<li id="fm-btn-help" class="fm-btn"></li>
|
||||
<li id="fm-btn-suggest" class="fm-btn"></li>
|
||||
</div>
|
||||
<div class="panel-context">
|
||||
<div id="panel-saveas" class="content-box"></div>
|
||||
|
||||
@ -311,6 +311,17 @@ define([
|
||||
iconCls: 'menu__icon btn-goback'
|
||||
});
|
||||
|
||||
this.miSuggest = new Common.UI.MenuItem({
|
||||
el : $markup.elementById('#fm-btn-suggest'),
|
||||
action : 'suggest',
|
||||
caption : this.btnSuggestCaption,
|
||||
canFocused: false,
|
||||
dataHint: 1,
|
||||
dataHintDirection: 'left-top',
|
||||
dataHintOffset: [-2, 22],
|
||||
iconCls: 'menu__icon btn-suggest-feature'
|
||||
});
|
||||
|
||||
this.items = [];
|
||||
this.items.push(
|
||||
this.miClose,
|
||||
@ -330,7 +341,8 @@ define([
|
||||
this.miHistory,
|
||||
this.miSettings,
|
||||
this.miHelp,
|
||||
this.miBack
|
||||
this.miBack,
|
||||
this.miSuggest
|
||||
);
|
||||
|
||||
this.rendered = true;
|
||||
@ -435,6 +447,9 @@ define([
|
||||
isVisible = this.mode.canBack;
|
||||
this.miBack[isVisible ?'show':'hide']();
|
||||
|
||||
isVisible = this.mode.canSuggest;
|
||||
this.miSuggest[isVisible ?'show':'hide']();
|
||||
|
||||
if (!this.customizationDone) {
|
||||
this.customizationDone = true;
|
||||
this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text);
|
||||
|
||||
@ -2076,6 +2076,7 @@
|
||||
"PE.Views.FileMenu.ariaFileMenu": "File menu",
|
||||
"PE.Views.FileMenu.btnAboutCaption": "About",
|
||||
"PE.Views.FileMenu.btnBackCaption": "Open File Location",
|
||||
"PE.Views.FileMenu.btnSuggestCaption": "Suggest a Feature",
|
||||
"PE.Views.FileMenu.btnCloseEditor": "Close File",
|
||||
"PE.Views.FileMenu.btnCloseMenuCaption": "Back",
|
||||
"PE.Views.FileMenu.btnCreateNewCaption": "Create New",
|
||||
|
||||
@ -332,6 +332,7 @@ define([
|
||||
case 'external-help': close_menu = true; break;
|
||||
case 'close-editor': Common.NotificationCenter.trigger('close'); break;
|
||||
case 'switch:mobile': Common.Gateway.switchEditorType('mobile', true); break;
|
||||
case 'suggest': Common.NotificationCenter.trigger('suggest'); break;
|
||||
default: close_menu = false;
|
||||
}
|
||||
|
||||
|
||||
@ -243,6 +243,7 @@ define([
|
||||
this.api.asc_registerCallback('asc_onOleEditorReady', _.bind(this.onOleEditorReady, this));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
||||
Common.NotificationCenter.on('suggest', _.bind(this.onSuggest, this));
|
||||
Common.NotificationCenter.on('close', _.bind(this.closeEditor, this));
|
||||
Common.NotificationCenter.on('namedrange:locked', _.bind(this.onNamedRangeLocked, this));
|
||||
Common.NotificationCenter.on('protectedrange:locked', _.bind(this.onProtectedRangeLocked, this));
|
||||
@ -740,6 +741,10 @@ define([
|
||||
}
|
||||
},
|
||||
|
||||
onSuggest: function() {
|
||||
window.open('{{SUGGEST_URL}}', "_blank");
|
||||
},
|
||||
|
||||
closeEditor: function() {
|
||||
this.appOptions.canRequestClose && this.onRequestClose();
|
||||
},
|
||||
@ -1502,6 +1507,9 @@ define([
|
||||
this.appOptions.canSaveToFile = this.appOptions.isEdit || this.appOptions.isRestrictedEdit;
|
||||
this.appOptions.showSaveButton = this.appOptions.isEdit;
|
||||
|
||||
var suggestUrl = '{{SUGGEST_URL}}';
|
||||
this.appOptions.canSuggest = suggestUrl && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.suggestFeature===false);
|
||||
|
||||
this.appOptions.compactHeader = this.appOptions.customization && (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compactHeader;
|
||||
this.appOptions.twoLevelHeader = this.appOptions.isEdit; // when compactHeader=true some buttons move to toolbar
|
||||
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
<li class="devider"></li>
|
||||
<li id="fm-btn-settings" class="fm-btn" data-layout-name="toolbar-file-settings"></li>
|
||||
<li id="fm-btn-help" class="fm-btn"></li>
|
||||
<li id="fm-btn-suggest" class="fm-btn"></li>
|
||||
</div>
|
||||
<div class="panel-context">
|
||||
<div id="panel-saveas" class="content-box"></div>
|
||||
|
||||
@ -292,6 +292,17 @@ define([
|
||||
iconCls: 'menu__icon btn-goback'
|
||||
});
|
||||
|
||||
this.miSuggest = new Common.UI.MenuItem({
|
||||
el : $markup.elementById('#fm-btn-suggest'),
|
||||
action : 'suggest',
|
||||
caption : this.btnSuggestCaption,
|
||||
canFocused: false,
|
||||
dataHint: 1,
|
||||
dataHintDirection: 'left-top',
|
||||
dataHintOffset: [-2, 22],
|
||||
iconCls: 'menu__icon btn-suggest-feature'
|
||||
});
|
||||
|
||||
this.items = [];
|
||||
this.items.push(
|
||||
this.miClose,
|
||||
@ -311,7 +322,8 @@ define([
|
||||
this.miHistory,
|
||||
this.miSettings,
|
||||
this.miHelp,
|
||||
this.miBack
|
||||
this.miBack,
|
||||
this.miSuggest
|
||||
);
|
||||
|
||||
this.rendered = true;
|
||||
@ -417,6 +429,9 @@ define([
|
||||
isVisible = this.mode.canBack;
|
||||
this.miBack[isVisible ?'show':'hide']();
|
||||
|
||||
isVisible = this.mode.canSuggest;
|
||||
this.miSuggest[isVisible ?'show':'hide']();
|
||||
|
||||
if (!this.customizationDone) {
|
||||
this.customizationDone = true;
|
||||
this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text);
|
||||
|
||||
@ -2686,6 +2686,7 @@
|
||||
"SSE.Views.FieldSettingsDialog.txtVarp": "Varp",
|
||||
"SSE.Views.FileMenu.ariaFileMenu": "File menu",
|
||||
"SSE.Views.FileMenu.btnBackCaption": "Open File Location",
|
||||
"SSE.Views.FileMenu.btnSuggestCaption": "Suggest a Feature",
|
||||
"SSE.Views.FileMenu.btnCloseEditor": "Close File",
|
||||
"SSE.Views.FileMenu.btnCloseMenuCaption": "Back",
|
||||
"SSE.Views.FileMenu.btnCreateNewCaption": "Create New",
|
||||
|
||||
@ -222,6 +222,7 @@ define([
|
||||
break;
|
||||
case 'close-editor': Common.NotificationCenter.trigger('close'); break;
|
||||
case 'switch:mobile': Common.Gateway.switchEditorType('mobile', true); break;
|
||||
case 'suggest': Common.NotificationCenter.trigger('suggest'); break;
|
||||
default: close_menu = false;
|
||||
}
|
||||
|
||||
|
||||
@ -171,6 +171,7 @@ define([
|
||||
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
||||
Common.NotificationCenter.on('suggest', _.bind(this.onSuggest, this));
|
||||
Common.NotificationCenter.on('close', _.bind(this.closeEditor, this));
|
||||
Common.NotificationCenter.on('markfavorite', _.bind(this.markFavorite, this));
|
||||
Common.NotificationCenter.on('download:advanced', _.bind(this.onAdvancedOptions, this));
|
||||
@ -649,6 +650,10 @@ define([
|
||||
}
|
||||
},
|
||||
|
||||
onSuggest: function() {
|
||||
window.open('{{SUGGEST_URL}}', "_blank");
|
||||
},
|
||||
|
||||
closeEditor: function() {
|
||||
this.appOptions.canRequestClose && this.onRequestClose();
|
||||
},
|
||||
@ -1176,6 +1181,9 @@ define([
|
||||
this.appOptions.canSaveToFile = this.appOptions.isEdit || this.appOptions.isRestrictedEdit;
|
||||
this.appOptions.showSaveButton = this.appOptions.isEdit;
|
||||
|
||||
var suggestUrl = '{{SUGGEST_URL}}';
|
||||
this.appOptions.canSuggest = suggestUrl && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.suggestFeature===false);
|
||||
|
||||
this.appOptions.compactHeader = this.appOptions.customization && (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compactHeader;
|
||||
this.appOptions.twoLevelHeader = this.appOptions.isEdit; // when compactHeader=true some buttons move to toolbar
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
<li class="devider"></li>
|
||||
<li id="fm-btn-settings" class="fm-btn" data-layout-name="toolbar-file-settings"></li>
|
||||
<li id="fm-btn-help" class="fm-btn"></li>
|
||||
<li id="fm-btn-suggest" class="fm-btn"></li>
|
||||
</div>
|
||||
<div class="panel-context">
|
||||
<div id="panel-saveas" class="content-box"></div>
|
||||
|
||||
@ -240,6 +240,17 @@ define([
|
||||
iconCls: 'menu__icon btn-goback'
|
||||
});
|
||||
|
||||
this.miSuggest = new Common.UI.MenuItem({
|
||||
el : $markup.elementById('#fm-btn-suggest'),
|
||||
action : 'suggest',
|
||||
caption : this.btnSuggestCaption,
|
||||
canFocused: false,
|
||||
dataHint: 1,
|
||||
dataHintDirection: 'left-top',
|
||||
dataHintOffset: [-2, 22],
|
||||
iconCls: 'menu__icon btn-suggest-feature'
|
||||
});
|
||||
|
||||
this.items = [];
|
||||
this.items.push(
|
||||
this.miClose,
|
||||
@ -254,7 +265,8 @@ define([
|
||||
this.miAccess,
|
||||
this.miSettings,
|
||||
this.miHelp,
|
||||
this.miBack
|
||||
this.miBack,
|
||||
this.miSuggest
|
||||
);
|
||||
|
||||
this.rendered = true;
|
||||
@ -352,6 +364,9 @@ define([
|
||||
isVisible = this.mode.canBack;
|
||||
this.miBack[isVisible ?'show':'hide']();
|
||||
|
||||
isVisible = this.mode.canSuggest;
|
||||
this.miSuggest[isVisible ?'show':'hide']();
|
||||
|
||||
if (!this.customizationDone) {
|
||||
this.customizationDone = true;
|
||||
this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text);
|
||||
|
||||
@ -318,6 +318,7 @@
|
||||
"VE.Views.DocumentHolder.txtWarnUrl": "Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?",
|
||||
"VE.Views.FileMenu.ariaFileMenu": "File menu",
|
||||
"VE.Views.FileMenu.btnBackCaption": "Open File Location",
|
||||
"VE.Views.FileMenu.btnSuggestCaption": "Suggest a Feature",
|
||||
"VE.Views.FileMenu.btnCloseEditor": "Close File",
|
||||
"VE.Views.FileMenu.btnCloseMenuCaption": "Back",
|
||||
"VE.Views.FileMenu.btnCreateNewCaption": "Create New",
|
||||
|
||||
@ -110,6 +110,9 @@ module.exports = function(grunt) {
|
||||
}, {
|
||||
from: /\{\{DEFAULT_LANG\}\}/g,
|
||||
to: _encode(process.env.DEFAULT_LANG) || 'en'
|
||||
}, {
|
||||
from: /\{\{SUGGEST_URL\}\}/g,
|
||||
to: _encode(process.env.DEFAULT_LANG) || 'https://feedback.onlyoffice.com/forums/966080-your-voice-matters?category_id=519084'
|
||||
}];
|
||||
|
||||
var helpreplacements = [
|
||||
|
||||