From 75ee04008bb121f932338917635f946eb0668f9a Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 24 May 2017 17:37:39 +0300 Subject: [PATCH] [DE] View mode: view list of signatures, disable adding signatures. --- apps/documenteditor/main/app/view/FileMenu.js | 1 + apps/documenteditor/main/app/view/FileMenuPanels.js | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index a4663b7a0..7c58c7ade 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -281,6 +281,7 @@ define([ if (this.mode.isDesktopApp) { // this.$el.find('#fm-btn-back').hide(); this.panels['protect'] = (new DE.Views.FileMenuPanels.ProtectDoc({menu:this})).render(); + this.panels['protect'].setMode(this.mode); } if (this.mode.canDownload) { diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 34c85083a..aa6b09ed3 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -1089,7 +1089,7 @@ define([ menu: undefined, template: _.template([ - '', + '', '', '', '
', @@ -1139,6 +1139,8 @@ define([ }); this.btnAddVisibleSign.on('click', _.bind(this.addVisibleSign, this)); + this.lblSignHeader = $('#id-fms-lbl-sign-header', this.$el); + this.cntRequestedSign = $('#id-fms-requested-sign'); this.cntValidSign = $('#id-fms-valid-sign'); this.cntInvalidSign = $('#id-fms-invalid-sign'); @@ -1160,6 +1162,11 @@ define([ setMode: function(mode) { this.mode = mode; + if (!this.mode.isEdit) { + this.btnAddInvisibleSign.setVisible(false); + this.btnAddVisibleSign.setVisible(false); + this.lblSignHeader.html(this.strSignature); + } }, setApi: function(o) { @@ -1203,8 +1210,8 @@ define([ strVisibleSign: 'Add visible signature', strRequested: 'Requested signatures', strValid: 'Valid signatures', - strInvalid: 'Invalid signatures' - + strInvalid: 'Invalid signatures', + strSignature: 'Signature' }, DE.Views.FileMenuPanels.ProtectDoc || {}));