From ceb0cd4b5e2b85a9b2f64300a59165d90b4beb71 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 28 Nov 2017 15:29:14 +0300 Subject: [PATCH] [DE] Refactoring signature settings in the right and left panels. --- apps/common/main/lib/controller/Protection.js | 2 + apps/common/main/lib/view/Protection.js | 6 +- .../main/app/controller/LeftMenu.js | 41 +----- .../main/app/controller/RightMenu.js | 18 ++- .../app/template/SignatureSettings.template | 7 +- apps/documenteditor/main/app/view/FileMenu.js | 4 +- .../main/app/view/FileMenuPanels.js | 136 +++++++++--------- .../main/app/view/SignatureSettings.js | 132 +++++------------ apps/documenteditor/main/locale/en.json | 20 ++- .../main/resources/less/filemenu.less | 21 +++ .../main/resources/less/leftmenu.less | 28 ---- 11 files changed, 163 insertions(+), 252 deletions(-) diff --git a/apps/common/main/lib/controller/Protection.js b/apps/common/main/lib/controller/Protection.js index 9248f7aa9..351ba98a2 100644 --- a/apps/common/main/lib/controller/Protection.js +++ b/apps/common/main/lib/controller/Protection.js @@ -91,6 +91,7 @@ define([ this.api.asc_registerCallback('asc_onDocumentPassword', _.bind(this.onDocumentPassword, this)); if (this.appConfig.canProtect) { this.api.asc_registerCallback('asc_onSignatureClick', _.bind(this.onApiSignatureClick, this)); + Common.NotificationCenter.on('protect:sign', _.bind(this.onApiSignatureClick, this)); this.api.asc_registerCallback('asc_onUpdateSignatures', _.bind(this.onApiUpdateSignatures, this)); } } @@ -145,6 +146,7 @@ define([ onAppReady: function (config) { var me = this; + // this.onApiUpdateSignatures([{name: 'Hammish Mitchell', guid: '123', date: '18/05/2017'}, {name: 'Someone Somewhere', guid: '345', date: '18/05/2017'}]); }, addPassword: function() { diff --git a/apps/common/main/lib/view/Protection.js b/apps/common/main/lib/view/Protection.js index 5283cdc53..a3cd222da 100644 --- a/apps/common/main/lib/view/Protection.js +++ b/apps/common/main/lib/view/Protection.js @@ -202,7 +202,11 @@ define([ getButton: function(type, parent) { if ( type == 'signature' ) { - var button = new Common.UI.Button({}); + var button = new Common.UI.Button({ + cls: 'btn-text-default', + style: 'width: 100%;', + caption: this.txtInvisibleSignature + }); this.btnsInvisibleSignature.push(button); return button; diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 884c3baad..a05ae62e0 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -43,8 +43,6 @@ define([ 'core', 'common/main/lib/util/Shortcuts', - 'common/main/lib/view/SignSettingsDialog', - 'common/main/lib/view/SignDialog', 'documenteditor/main/app/view/LeftMenu', 'documenteditor/main/app/view/FileMenu' ], function () { @@ -87,9 +85,7 @@ define([ 'saveas:format': _.bind(this.clickSaveAsFormat, this), 'settings:apply': _.bind(this.applySettings, this), 'create:new': _.bind(this.onCreateNew, this), - 'recent:open': _.bind(this.onOpenRecent, this), - 'signature:visible': _.bind(this.addVisibleSign, this), - 'signature:invisible': _.bind(this.addInvisibleSign, this) + 'recent:open': _.bind(this.onOpenRecent, this) }, 'Toolbar': { 'file:settings': _.bind(this.clickToolbarSettings,this), @@ -680,41 +676,6 @@ define([ Common.Gateway.requestHistory(); }, - addVisibleSign: function(menu) { - var me = this, - win = new Common.Views.SignSettingsDialog({ - handler: function(dlg, result) { - if (result == 'ok') { - me.api.asc_AddSignatureLine2(dlg.getSettings()); - } - Common.NotificationCenter.trigger('edit:complete', me); - } - }); - - win.show(); - - menu.hide(); - }, - - addInvisibleSign: function(menu) { - var me = this, - win = new Common.Views.SignDialog({ - api: me.api, - signType: 'invisible', - handler: function(dlg, result) { - if (result == 'ok') { - var props = dlg.getSettings(); - me.api.asc_Sign(props.certificateId); - } - Common.NotificationCenter.trigger('edit:complete', me); - } - }); - - win.show(); - - menu.hide(); - }, - textNoTextFound : 'Text not found', newDocumentTitle : 'Unnamed document', requestEditRightsText : 'Requesting editing rights...', diff --git a/apps/documenteditor/main/app/controller/RightMenu.js b/apps/documenteditor/main/app/controller/RightMenu.js index 7126bab2e..006e88424 100644 --- a/apps/documenteditor/main/app/controller/RightMenu.js +++ b/apps/documenteditor/main/app/controller/RightMenu.js @@ -79,7 +79,7 @@ define([ this._settings[Common.Utils.documentSettingsType.TextArt] = {panelId: "id-textart-settings", panel: rightMenu.textartSettings, btn: rightMenu.btnTextArt, hidden: 1, locked: false}; this._settings[Common.Utils.documentSettingsType.Chart] = {panelId: "id-chart-settings", panel: rightMenu.chartSettings, btn: rightMenu.btnChart, hidden: 1, locked: false}; this._settings[Common.Utils.documentSettingsType.MailMerge] = {panelId: "id-mail-merge-settings", panel: rightMenu.mergeSettings, btn: rightMenu.btnMailMerge, hidden: 1, props: {}, locked: false}; - this._settings[Common.Utils.documentSettingsType.Signature] = {panelId: "id-signature-settings", panel: rightMenu.signatureSettings, btn: rightMenu.btnSignature, hidden: (rightMenu.signatureSettings) ? 0 : 1, props: {}, locked: false}; + this._settings[Common.Utils.documentSettingsType.Signature] = {panelId: "id-signature-settings", panel: rightMenu.signatureSettings, btn: rightMenu.btnSignature, hidden: 1, props: {}, locked: false}; }, setApi: function(api) { @@ -270,6 +270,11 @@ define([ this.rightmenu.mergeSettings.setDocumentName(this.getApplication().getController('Viewport').getView('Common.Views.Header').getDocumentCaption()); this.api.asc_registerCallback('asc_onStartMailMerge', _.bind(this.onStartMailMerge, this)); } + + if (this.rightmenu.signatureSettings) { + this.api.asc_registerCallback('asc_onUpdateSignatures', _.bind(this.onApiUpdateSignatures, this)); + } + this.api.asc_registerCallback('asc_onError', _.bind(this.onError, this)); } @@ -280,6 +285,9 @@ define([ this.onFocusObject(selectedElements, !Common.localStorage.getBool("de-hide-right-settings")); } } + + //remove after sdk send event + // this.onApiUpdateSignatures([{name: 'Hammish Mitchell', guid: '123', date: '18/05/2017'}, {name: 'Someone Somewhere', guid: '345', date: '18/05/2017'}]); }, onDoubleClickOnObject: function(obj) { @@ -325,6 +333,14 @@ define([ } }, + onApiUpdateSignatures: function(valid, requested){ + var disabled = (!valid || valid.length<1) && (!requested || requested.length<1), + type = Common.Utils.documentSettingsType.Signature; + this._settings[type].hidden = disabled ? 1 : 0; + this._settings[type].btn.setDisabled(disabled); + this._settings[type].panel.setLocked(this._settings[type].locked); + }, + SetDisabled: function(disabled, allowMerge, allowSignature) { this.setMode({isEdit: !disabled}); if (this.rightmenu) { diff --git a/apps/documenteditor/main/app/template/SignatureSettings.template b/apps/documenteditor/main/app/template/SignatureSettings.template index 5a4fa0157..dc38301ad 100644 --- a/apps/documenteditor/main/app/template/SignatureSettings.template +++ b/apps/documenteditor/main/app/template/SignatureSettings.template @@ -4,14 +4,9 @@ - - - - - - +
diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index 9be53947c..ae01b716f 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -240,7 +240,7 @@ define([ applyMode: function() { this.miPrint[this.mode.canPrint?'show':'hide'](); this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide'](); - this.items[7][(this.mode.canProtect) ?'show':'hide'](); + this.items[7][(this.mode.isEdit && this.mode.isDesktopApp && this.mode.isOffline) ?'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'](); @@ -277,7 +277,7 @@ define([ } } - if (this.mode.canProtect) { + if (this.mode.isDesktopApp && this.mode.isOffline) { // this.$el.find('#fm-btn-back').hide(); this.panels['protect'] = (new DE.Views.FileMenuPanels.ProtectDoc({menu:this})).render(); this.panels['protect'].setMode(this.mode); diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 14b0852b3..dd2fd4961 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -1103,12 +1103,12 @@ define([ menu: undefined, template: _.template([ - '', - '', - '', - '
', - '
', - '
' + '', + '
', + '', + '
', + '
', + '
' ].join('')), initialize: function(options) { @@ -1116,26 +1116,16 @@ define([ this.menu = options.menu; - this.templateRequested = _.template([ - '', - '', - '<% _.each(signatures, function(item) { %>', + var me = this; + this.templateSignature = _.template([ + '
', '', - '', + '', '', - '<% }); %>', - '
<%= Common.Utils.String.htmlEncode(item) %><%= tipText %>
' - ].join('')); - - this.templateValid = _.template([ - '', - '', - '<% _.each(signatures, function(item) { %>', '', - '', - '', + '', + '', '', - '<% }); %>', '
<%= Common.Utils.String.htmlEncode(item.name) %><%= Common.Utils.String.htmlEncode(item.date) %>
' ].join('')); }, @@ -1143,22 +1133,13 @@ define([ render: function() { $(this.el).html(this.template({scope: this})); - this.btnAddInvisibleSign = new Common.UI.Button({ - el: '#fms-btn-invisible-sign' - }); - this.btnAddInvisibleSign.on('click', _.bind(this.addInvisibleSign, this)); - - this.btnAddVisibleSign = new Common.UI.Button({ - el: '#fms-btn-visible-sign' - }); - 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'); + var protection = DE.getController('Common.Controllers.Protection').getView(); + this.btnAddInvisibleSign = protection.getButton('signature'); + this.btnAddInvisibleSign.render(this.$el.find('#fms-btn-invisible-sign')); + this.btnAddInvisibleSign.on('click', _.bind(this.closeMenu, this)); + this.cntSignature = $('#id-fms-signature'); + this.cntSignatureView = $('#id-fms-signature-view'); if (_.isUndefined(this.scroller)) { this.scroller = new Common.UI.Scroller({ el: $(this.el), @@ -1166,6 +1147,9 @@ define([ }); } + this.$el.on('click', '.signature-edit-link', _.bind(this.onEdit, this)); + this.$el.on('click', '.signature-view-link', _.bind(this.onView, this)); + return this; }, @@ -1176,11 +1160,7 @@ define([ setMode: function(mode) { this.mode = mode; - if (!this.mode.isEdit) { - this.btnAddInvisibleSign.setVisible(false); - this.btnAddVisibleSign.setVisible(false); - this.lblSignHeader.html(this.strSignature); - } + this.cntSignature.toggleClass('hidden', !this.mode.canProtect); }, setApi: function(o) { @@ -1188,49 +1168,67 @@ define([ return this; }, - addInvisibleSign: function() { - if (this.menu) - this.menu.fireEvent('signature:invisible', [this.menu]); + closeMenu: function() { + this.menu && this.menu.hide(); }, - addVisibleSign: function() { - if (this.menu) - this.menu.fireEvent('signature:visible', [this.menu]); + onEdit: function() { + this.menu && this.menu.hide(); + + var me = this; + Common.UI.warning({ + title: this.notcriticalErrorTitle, + msg: this.txtEditWarning, + buttons: ['ok', 'cancel'], + primary: 'ok', + callback: function(btn) { + if (btn == 'ok') { + // me.api.editSignedDoc(); + } + } + }); + + }, + + onView: function() { + + this.menu && this.menu.hide(); }, updateSignatures: function(){ var requested = this.api.asc_getRequestSignatures(), - requested_arr = [], valid = this.api.asc_getSignatures(), - valid_arr = [], invalid_arr = []; + hasRequested = requested && requested.length>0, + hasValid = false, + hasInvalid = false; - _.each(requested, function(item, index){ - requested_arr.push(item.asc_getSigner1()); - }); _.each(valid, function(item, index){ - var sign = {name: item.asc_getSigner1(), date: '18/05/2017'}; - (item.asc_getValid()==0) ? valid_arr.push(sign) : invalid_arr.push(sign); + if (item.asc_getValid()==0) + hasValid = true; + else + hasInvalid = true; }); - // requested_arr = ['Hammish Mitchell', 'Someone Somewhere', 'Mary White', 'John Black']; - // valid_arr = [{name: 'Hammish Mitchell', guid: '123', date: '18/05/2017'}, {name: 'Someone Somewhere', guid: '345', date: '18/05/2017'}]; - // invalid_arr = [{name: 'Mary White', guid: '111', date: '18/05/2017'}, {name: 'John Black', guid: '456', date: '18/05/2017'}]; + // hasRequested = true; + // hasValid = true; + // hasInvalid = true; - this.cntRequestedSign.html(this.templateRequested({signatures: requested_arr, header: this.strRequested})); - this.cntValidSign.html(this.templateValid({signatures: valid_arr, header: this.strValid})); - this.cntInvalidSign.html(this.templateValid({signatures: invalid_arr, header: this.strInvalid})); + var tipText = (hasInvalid) ? this.txtSignedInvalid : (hasValid ? this.txtSigned : ""); + if (hasRequested) + tipText = this.txtRequestedSignatures + (tipText!="" ? "

" : "")+ tipText; - this.btnAddInvisibleSign.setDisabled(valid_arr.length>0 || invalid_arr.length>0); - this.btnAddVisibleSign.setDisabled(valid_arr.length>0 || invalid_arr.length>0); + this.cntSignatureView.html(this.templateSignature({tipText: tipText, hasSigned: (hasValid || hasInvalid), hasRequested: hasRequested})); }, strProtect: 'Protect Document', - strInvisibleSign: 'Add invisible digital signature', - strVisibleSign: 'Add visible signature', - strRequested: 'Requested signatures', - strValid: 'Valid signatures', - strInvalid: 'Invalid signatures', - strSignature: 'Signature' + strSignature: 'Signature', + txtView: 'View signatures', + txtEdit: 'Edit document', + txtSigned: 'Valid signatures has been added to the document. The document is protected from editing.', + txtSignedInvalid: 'Some of the digital signatures in document are invalid or could not be verified. The document is protected from editing.', + txtRequestedSignatures: 'This document needs to be signed.', + notcriticalErrorTitle: 'Warning', + txtEditWarning: 'Editing will remove the signatures from the document.
Are you sure you want to continue?' }, DE.Views.FileMenuPanels.ProtectDoc || {})); diff --git a/apps/documenteditor/main/app/view/SignatureSettings.js b/apps/documenteditor/main/app/view/SignatureSettings.js index 818b1c99d..15aef75cb 100644 --- a/apps/documenteditor/main/app/view/SignatureSettings.js +++ b/apps/documenteditor/main/app/view/SignatureSettings.js @@ -76,8 +76,6 @@ define([ ready: false }; this._locked = false; - this.lockedControls = []; - this._noApply = false; this._originalProps = null; @@ -118,17 +116,9 @@ define([ scope: this })); - this.btnAddInvisibleSign = new Common.UI.Button({ - el: this.$el.find('#signature-invisible-sign') - }); - this.btnAddInvisibleSign.on('click', _.bind(this.addInvisibleSign, this)); - this.lockedControls.push(this.btnAddInvisibleSign); - - this.btnAddVisibleSign = new Common.UI.Button({ - el: this.$el.find('#signature-visible-sign') - }); - this.btnAddVisibleSign.on('click', _.bind(this.addVisibleSign, this)); - this.lockedControls.push(this.btnAddVisibleSign); + var protection = DE.getController('Common.Controllers.Protection').getView(); + this.btnAddInvisibleSign = protection.getButton('signature'); + this.btnAddInvisibleSign.render(this.$el.find('#signature-invisible-sign')); this.cntRequestedSign = $('#signature-requested-sign'); this.cntValidSign = $('#signature-valid-sign'); @@ -164,16 +154,6 @@ define([ this.$linksSign && this.$linksSign.toggleClass('disabled', disable); this.$linksView && this.$linksView.toggleClass('disabled', disable); } - this.disableInsertControls(disable); - }, - - disableInsertControls: function(disable) { - if (this._state.DisabledInsertControls!==disable) { - this._state.DisabledInsertControls = disable; - _.each(this.lockedControls, function(item) { - item.setDisabled(disable); - }); - } }, setMode: function(mode) { @@ -184,7 +164,7 @@ define([ if (!this._state.ready) return; this.updateSignatures(valid, requested); - this.showSignatureTooltip(this._state.validSignatures.length>0 || this._state.invalidSignatures.length>0); + this.showSignatureTooltip(this._state.validSignatures.length>0, this._state.invalidSignatures.length>0); }, updateSignatures: function(valid, requested){ @@ -221,68 +201,11 @@ define([ me.disableEditing(me._state.validSignatures.length>0 || me._state.invalidSignatures.length>0); }, - addVisibleSign: function(btn) { - var me = this, - win = new Common.Views.SignSettingsDialog({ - handler: function(dlg, result) { - if (result == 'ok') { - me.api.asc_AddSignatureLine2(dlg.getSettings()); - } - me.fireEvent('editcomplete', me); - } - }); - - win.show(); - }, - - addInvisibleSign: function(btn) { - var me = this, - win = new Common.Views.SignDialog({ - api: me.api, - signType: 'invisible', - handler: function(dlg, result) { - if (result == 'ok') { - var props = dlg.getSettings(); - me.api.asc_Sign(props.certificateId); - } - me.fireEvent('editcomplete', me); - } - }); - - win.show(); - }, - onSign: function(event) { - var me = this, - target = $(event.currentTarget); - + var target = $(event.currentTarget); if (target.hasClass('disabled')) return; - if (_.isUndefined(me.fontStore)) { - me.fontStore = new Common.Collections.Fonts(); - var fonts = DE.getController('Toolbar').getView('Toolbar').cmbFontName.store.toJSON(); - var arr = []; - _.each(fonts, function(font, index){ - if (!font.cloneid) { - arr.push(_.clone(font)); - } - }); - me.fontStore.add(arr); - } - - var win = new Common.Views.SignDialog({ - api: me.api, - signType: 'visible', - fontStore: me.fontStore, - handler: function(dlg, result) { - if (result == 'ok') { - var props = dlg.getSettings(); - me.api.asc_Sign(props.certificateId, target.attr('data-value'), props.images[0], props.images[1]); - } - me.fireEvent('editcomplete', me); - } - }); - win.show(); + Common.NotificationCenter.trigger('protect:sign', target.attr('data-value')); }, onViewSignature: function(event) { @@ -296,25 +219,39 @@ define([ this._state.ready = true; this.updateSignatures(this.api.asc_getSignatures(), this.api.asc_getRequestSignatures()); - this.showSignatureTooltip(this._state.validSignatures.length>0 || this._state.invalidSignatures.length>0, this._state.requestedSignatures.length>0); + this.showSignatureTooltip(this._state.validSignatures.length>0, this._state.invalidSignatures.length>0, this._state.requestedSignatures.length>0); }, - showSignatureTooltip: function(hasSigned, hasRequested) { - if (!hasSigned && !hasRequested) return; + showSignatureTooltip: function(hasValid, hasInvalid, hasRequested) { + if (!hasValid && !hasInvalid && !hasRequested) return; + + var tipText = (hasInvalid) ? this.txtSignedInvalid : (hasValid ? this.txtSigned : ""); + if (hasRequested) + tipText = this.txtRequestedSignatures + "

" + tipText; var me = this, tip = new Common.UI.SynchronizeTip({ target : DE.getController('RightMenu').getView('RightMenu').btnSignature.btnEl, - text : (hasSigned) ? this.txtSignedDocument : this.txtRequestedSignatures, - showLink: hasSigned, + text : tipText, + showLink: hasValid || hasInvalid, textLink: this.txtContinueEditing, placement: 'left' }); tip.on({ 'dontshowclick': function() { - tip.close(); - // me.api.editSingedDoc(); - // me.disableEditing(false); // call in the asc_onUpdateSignatures event callback. + Common.UI.warning({ + title: me.notcriticalErrorTitle, + msg: me.txtEditWarning, + buttons: ['ok', 'cancel'], + primary: 'ok', + callback: function(btn) { + if (btn == 'ok') { + tip.close(); + // me.api.editSignedDoc(); + // me.disableEditing(false); // call in the asc_onUpdateSignatures event callback. + } + } + }); }, 'closeclick': function() { tip.close(); @@ -341,22 +278,21 @@ define([ var comments = DE.getController('Common.Controllers.Comments'); if (comments) comments.setPreviewMode(disable); - - this.disableInsertControls(disable); } }, strSignature: 'Signature', - strInvisibleSign: 'Add invisible digital signature', - strVisibleSign: 'Add visible signature', strRequested: 'Requested signatures', strValid: 'Valid signatures', strInvalid: 'Invalid signatures', strSign: 'Sign', strView: 'View', - txtSignedDocument: 'This document has been signed. It should not be edited.', - txtRequestedSignatures: 'This document has requested signatures.', - txtContinueEditing: 'Edit anyway' + txtSigned: 'Valid signatures has been added to the document. The document is protected from editing.', + txtSignedInvalid: 'Some of the digital signatures in document are invalid or could not be verified. The document is protected from editing.', + txtRequestedSignatures: 'This document needs to be signed.', + txtContinueEditing: 'Edit anyway', + notcriticalErrorTitle: 'Warning', + txtEditWarning: 'Editing will remove the signatures from the document.
Are you sure you want to continue?' }, DE.Views.SignatureSettings || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index d88b57203..101d64fe5 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1073,12 +1073,14 @@ "DE.Views.HeaderFooterSettings.textBottomLeft": "Bottom left", "DE.Views.HeaderFooterSettings.textBottomRight": "Bottom right", "DE.Views.FileMenuPanels.ProtectDoc.strProtect": "Protect Document", - "DE.Views.FileMenuPanels.ProtectDoc.strInvisibleSign": "Add invisible digital signature", - "DE.Views.FileMenuPanels.ProtectDoc.strVisibleSign": "Add visible signature", - "DE.Views.FileMenuPanels.ProtectDoc.strRequested": "Requested signatures", - "DE.Views.FileMenuPanels.ProtectDoc.strValid": "Valid signatures", - "DE.Views.FileMenuPanels.ProtectDoc.strInvalid": "Invalid signatures", "DE.Views.FileMenuPanels.ProtectDoc.strSignature": "Signature", + "DE.Views.FileMenuPanels.ProtectDoc.txtView": "View signatures", + "DE.Views.FileMenuPanels.ProtectDoc.txtEdit": "Edit document", + "DE.Views.FileMenuPanels.ProtectDoc.txtSigned": "Valid signatures has been added to the document. The document is protected from editing.", + "DE.Views.FileMenuPanels.ProtectDoc.txtSignedInvalid": "Some of the digital signatures in document are invalid or could not be verified. The document is protected from editing.", + "DE.Views.FileMenuPanels.ProtectDoc.txtRequestedSignatures": "This document needs to be signed.", + "DE.Views.FileMenuPanels.ProtectDoc.notcriticalErrorTitle": "Warning", + "DE.Views.FileMenuPanels.ProtectDoc.txtEditWarning": "Editing will remove the signatures from the document.
Are you sure you want to continue?", "DE.Views.HeaderFooterSettings.textDiffFirst": "Different first page", "DE.Views.HeaderFooterSettings.textDiffOdd": "Different odd and even pages", "DE.Views.HeaderFooterSettings.textHeaderFromBottom": "Footer from Bottom", @@ -1409,13 +1411,17 @@ "DE.Views.ShapeSettings.txtTopAndBottom": "Top and bottom", "DE.Views.ShapeSettings.txtWood": "Wood", "DE.Views.SignatureSettings.strSignature": "Signature", - "DE.Views.SignatureSettings.strInvisibleSign": "Add invisible digital signature", - "DE.Views.SignatureSettings.strVisibleSign": "Add visible signature", "DE.Views.SignatureSettings.strRequested": "Requested signatures", "DE.Views.SignatureSettings.strValid": "Valid signatures", "DE.Views.SignatureSettings.strInvalid": "Invalid signatures", "DE.Views.SignatureSettings.strSign": "Sign", "DE.Views.SignatureSettings.strView": "View", + "DE.Views.SignatureSettings.txtSigned": "Valid signatures has been added to the document. The document is protected from editing.", + "DE.Views.SignatureSettings.txtSignedInvalid": "Some of the digital signatures in document are invalid or could not be verified. The document is protected from editing.", + "DE.Views.SignatureSettings.txtRequestedSignatures": "This document needs to be signed.", + "DE.Views.SignatureSettings.txtContinueEditing": "Edit anyway", + "DE.Views.SignatureSettings.notcriticalErrorTitle": "Warning", + "DE.Views.SignatureSettings.txtEditWarning": "Editing will remove the signatures from the document.
Are you sure you want to continue?", "DE.Views.Statusbar.goToPageText": "Go to Page", "DE.Views.Statusbar.pageIndexText": "Page {0} of {1}", "DE.Views.Statusbar.tipFitPage": "Fit to page", diff --git a/apps/documenteditor/main/resources/less/filemenu.less b/apps/documenteditor/main/resources/less/filemenu.less index 09a61ca02..e9c1a2a85 100644 --- a/apps/documenteditor/main/resources/less/filemenu.less +++ b/apps/documenteditor/main/resources/less/filemenu.less @@ -370,3 +370,24 @@ font: 12px tahoma, arial, verdana, sans-serif; } } + +#panel-protect { + label, span { + font-size: 12px; + } + + #file-menu-panel & { + padding: 30px 30px; + } + + .header { + font-weight: bold; + margin: 30px 0 10px; + } + + table { + td { + padding: 5px 0; + } + } +} \ No newline at end of file diff --git a/apps/documenteditor/main/resources/less/leftmenu.less b/apps/documenteditor/main/resources/less/leftmenu.less index faf5a8bc4..1a58d8c97 100644 --- a/apps/documenteditor/main/resources/less/leftmenu.less +++ b/apps/documenteditor/main/resources/less/leftmenu.less @@ -78,31 +78,3 @@ button.notify .btn-menu-comments {background-position: -0*@toolbar-icon-size -60 -o-transform: rotate(180deg); transform: rotate(180deg); } - -#panel-protect { - #file-menu-panel & { - padding: 30px 30px; - } - - - button { - display: block; - width: auto; - margin-top: 20px; - } - - label { - font: 12px tahoma, arial, verdana, sans-serif; - } - - .header { - font-weight: bold; - margin: 30px 0 10px; - } - - table { - td { - padding: 5px 5px; - } - } -} \ No newline at end of file