diff --git a/apps/documenteditor/main/app/template/FileMenu.template b/apps/documenteditor/main/app/template/FileMenu.template index d1ed92b31..8ec3a1927 100644 --- a/apps/documenteditor/main/app/template/FileMenu.template +++ b/apps/documenteditor/main/app/template/FileMenu.template @@ -8,6 +8,7 @@
+ @@ -30,4 +31,5 @@ + \ No newline at end of file diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index 542e822a5..9e3deabe8 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -168,6 +168,12 @@ define([ this.miSaveAs, this.miPrint, this.miRename, + new Common.UI.MenuItem({ + el : $('#fm-btn-protect',this.el), + action : 'protect', + caption : this.btnProtectCaption, + canFocused: false + }), this.miRecent, this.miNew, new Common.UI.MenuItem({ @@ -235,6 +241,8 @@ define([ this.miPrint[this.mode.canPrint?'show':'hide'](); this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide'](); this.miRename.$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide'](); + this.items[7][(this.mode.isDesktopApp) ?'show':'hide'](); + this.items[7].$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide'](); this.miRecent[this.mode.canOpenRecent?'show':'hide'](); this.miNew[this.mode.canCreateNew?'show':'hide'](); this.miNew.$el.find('+.devider')[this.mode.canCreateNew?'show':'hide'](); @@ -272,6 +280,7 @@ define([ if (this.mode.isDesktopApp) { // this.$el.find('#fm-btn-back').hide(); + this.panels['protect'] = (new DE.Views.FileMenuPanels.ProtectDoc({menu:this})).render(); } if (this.mode.canDownload) { @@ -360,6 +369,7 @@ define([ btnSaveAsCaption : 'Save as', textDownload : 'Download', btnRenameCaption : 'Rename...', - btnCloseMenuCaption : 'Close Menu' + btnCloseMenuCaption : 'Close Menu', + btnProtectCaption: 'Protect\\Sign' }, DE.Views.FileMenu || {})); }); diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index a2953db42..774bdd903 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -1083,4 +1083,83 @@ define([ } } }); + + DE.Views.FileMenuPanels.ProtectDoc = Common.UI.BaseView.extend(_.extend({ + el: '#panel-protect', + menu: undefined, + + template: _.template([ + '', + '', + ' |
', + ' |
', + ' |