[DE PE SSE] Change layout of Protect panel
This commit is contained in:
parent
33b358f931
commit
ca0a2609c9
|
@ -239,8 +239,7 @@ define([
|
|||
var me = this;
|
||||
if ( type == 'signature' ) {
|
||||
var button = new Common.UI.Button({
|
||||
cls: 'btn-text-default',
|
||||
style: 'width: 100%;',
|
||||
cls: 'btn-text-default auto',
|
||||
caption: this.txtInvisibleSignature,
|
||||
disabled: this._state.invisibleSignDisabled,
|
||||
dataHint: '2',
|
||||
|
@ -256,8 +255,7 @@ define([
|
|||
return button;
|
||||
} else if ( type == 'add-password' ) {
|
||||
var button = new Common.UI.Button({
|
||||
cls: 'btn-text-default',
|
||||
style: 'width: 100%;',
|
||||
cls: 'btn-text-default auto',
|
||||
caption: this.txtAddPwd,
|
||||
disabled: this._state.disabled || this._state.disabledPassword,
|
||||
visible: !this._state.hasPassword,
|
||||
|
@ -274,8 +272,7 @@ define([
|
|||
return button;
|
||||
} else if ( type == 'del-password' ) {
|
||||
var button = new Common.UI.Button({
|
||||
cls: 'btn-text-default',
|
||||
style: 'width: 100%;',
|
||||
cls: 'btn-text-default auto',
|
||||
caption: this.txtDeletePwd,
|
||||
disabled: this._state.disabled || this._state.disabledPassword,
|
||||
visible: this._state.hasPassword,
|
||||
|
@ -292,8 +289,7 @@ define([
|
|||
return button;
|
||||
} else if ( type == 'change-password' ) {
|
||||
var button = new Common.UI.Button({
|
||||
cls: 'btn-text-default',
|
||||
style: 'width: 100%;',
|
||||
cls: 'btn-text-default auto',
|
||||
caption: this.txtChangePwd,
|
||||
disabled: this._state.disabled || this._state.disabledPassword,
|
||||
visible: this._state.hasPassword,
|
||||
|
|
|
@ -2272,20 +2272,27 @@ define([
|
|||
'<label id="id-fms-lbl-protect-header"><%= scope.strProtect %></label>',
|
||||
'<div id="id-fms-password">',
|
||||
'<label class="header"><%= scope.strEncrypt %></label>',
|
||||
'<div id="fms-btn-add-pwd" style="width:190px;"></div>',
|
||||
'<table id="id-fms-view-pwd" cols="2" width="300">',
|
||||
'<tr>',
|
||||
'<td colspan="2"><label style="cursor: default;"><%= scope.txtEncrypted %></label></td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td><div id="fms-btn-change-pwd" style="width:190px;"></div></td>',
|
||||
'<td align="right"><div id="fms-btn-delete-pwd" style="width:190px; margin-left:20px;"></div></td>',
|
||||
'</tr>',
|
||||
'</table>',
|
||||
'<div class="encrypt-block">',
|
||||
'<div class="description"><%= scope.txtProtectDocument %></div>',
|
||||
'<div id="fms-btn-add-pwd"></div>',
|
||||
'</div>',
|
||||
'<div class="encrypted-block">',
|
||||
'<div class="description"><%= scope.txtEncrypted %></div>',
|
||||
'<div class="buttons">',
|
||||
'<div id="fms-btn-change-pwd"></div>',
|
||||
'<div id="fms-btn-delete-pwd"></div>',
|
||||
'</div>',
|
||||
'</div>',
|
||||
'</div>',
|
||||
'<div id="id-fms-signature">',
|
||||
'<label class="header"><%= scope.strSignature %></label>',
|
||||
'<div id="fms-btn-invisible-sign" style="width:190px; margin-bottom: 20px;"></div>',
|
||||
'<div class="add-signature-block">',
|
||||
'<div class="description"><%= scope.txtAddSignature %></div>',
|
||||
'<div id="fms-btn-invisible-sign"></div>',
|
||||
'</div>',
|
||||
'<div class="added-signature-block">',
|
||||
'<div class="description"><%= scope.txtAddedSignature %></div>',
|
||||
'</div>',
|
||||
'<div id="id-fms-signature-view"></div>',
|
||||
'</div>'
|
||||
].join('')),
|
||||
|
@ -2297,15 +2304,13 @@ define([
|
|||
|
||||
var me = this;
|
||||
this.templateSignature = _.template([
|
||||
'<table cols="2" width="300" class="<% if (!hasRequested && !hasSigned) { %>hidden<% } %>"">',
|
||||
'<tr>',
|
||||
'<td colspan="2"><label style="cursor: default;"><%= tipText %></label></td>',
|
||||
'<div class="<% if (!hasRequested && !hasSigned) { %>hidden<% } %>"">',
|
||||
'<div class="signature-tip"><%= tipText %></div>',
|
||||
'<div class="buttons">',
|
||||
'<label class="link signature-view-link" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium">' + me.txtView + '</label>',
|
||||
'<label class="link signature-edit-link <% if (!hasSigned) { %>hidden<% } %>" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium">' + me.txtEdit + '</label>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td><label class="link signature-view-link" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium">' + me.txtView + '</label></td>',
|
||||
'<td align="right"><label class="link signature-edit-link <% if (!hasSigned) { %>hidden<% } %>" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium">' + me.txtEdit + '</label></td>',
|
||||
'</tr>',
|
||||
'</table>'
|
||||
'</div>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
|
@ -2327,7 +2332,8 @@ define([
|
|||
this.btnDeletePwd.on('click', _.bind(this.closeMenu, this));
|
||||
|
||||
this.cntPassword = $('#id-fms-password');
|
||||
this.cntPasswordView = $('#id-fms-view-pwd');
|
||||
this.cntEncryptBlock = this.$el.find('.encrypt-block');
|
||||
this.cntEncryptedBlock = this.$el.find('.encrypted-block');
|
||||
|
||||
this.btnAddInvisibleSign = protection.getButton('signature');
|
||||
this.btnAddInvisibleSign.render(this.$el.find('#fms-btn-invisible-sign'));
|
||||
|
@ -2335,6 +2341,10 @@ define([
|
|||
|
||||
this.cntSignature = $('#id-fms-signature');
|
||||
this.cntSignatureView = $('#id-fms-signature-view');
|
||||
|
||||
this.cntAddSignature = this.$el.find('.add-signature-block');
|
||||
this.cntAddedSignature = this.$el.find('.added-signature-block');
|
||||
|
||||
if (_.isUndefined(this.scroller)) {
|
||||
this.scroller = new Common.UI.Scroller({
|
||||
el: this.$el,
|
||||
|
@ -2417,10 +2427,16 @@ define([
|
|||
tipText = this.txtRequestedSignatures + (tipText!="" ? "<br><br>" : "")+ tipText;
|
||||
|
||||
this.cntSignatureView.html(this.templateSignature({tipText: tipText, hasSigned: (hasValid || hasInvalid), hasRequested: hasRequested}));
|
||||
|
||||
var isAddedSignature = this.btnAddInvisibleSign.$el.find('button').hasClass('hidden');
|
||||
this.cntAddSignature.toggleClass('hidden', isAddedSignature);
|
||||
this.cntAddedSignature.toggleClass('hidden', !isAddedSignature);
|
||||
},
|
||||
|
||||
updateEncrypt: function() {
|
||||
this.cntPasswordView.toggleClass('hidden', this.btnAddPwd.isVisible());
|
||||
var isProtected = this.btnAddPwd.$el.find('button').hasClass('hidden');
|
||||
this.cntEncryptBlock.toggleClass('hidden', isProtected);
|
||||
this.cntEncryptedBlock.toggleClass('hidden', !isProtected);
|
||||
},
|
||||
|
||||
strProtect: 'Protect Document',
|
||||
|
@ -2433,7 +2449,10 @@ define([
|
|||
notcriticalErrorTitle: 'Warning',
|
||||
txtEditWarning: 'Editing will remove the signatures from the document.<br>Are you sure you want to continue?',
|
||||
strEncrypt: 'With Password',
|
||||
txtEncrypted: 'This document has been protected by password'
|
||||
txtProtectDocument: 'Protect this document with a password',
|
||||
txtEncrypted: 'A password is required to open this document',
|
||||
txtAddSignature: 'Ensure the integrity of the document by adding an<br>invisible digital signature',
|
||||
txtAddedSignature: 'Valid signatures have been added to the document.<br>The document is protected from editing.'
|
||||
|
||||
}, DE.Views.FileMenuPanels.ProtectDoc || {}));
|
||||
|
||||
|
|
|
@ -1965,11 +1965,14 @@
|
|||
"DE.Views.FileMenuPanels.ProtectDoc.strSignature": "With signature",
|
||||
"DE.Views.FileMenuPanels.ProtectDoc.txtEdit": "Edit document",
|
||||
"DE.Views.FileMenuPanels.ProtectDoc.txtEditWarning": "Editing will remove signatures from the document.<br>Continue?",
|
||||
"DE.Views.FileMenuPanels.ProtectDoc.txtEncrypted": "This document has been protected with password",
|
||||
"DE.Views.FileMenuPanels.ProtectDoc.txtEncrypted": "A password is required to open this document",
|
||||
"DE.Views.FileMenuPanels.ProtectDoc.txtRequestedSignatures": "This document needs to be signed.",
|
||||
"DE.Views.FileMenuPanels.ProtectDoc.txtSigned": "Valid signatures have been added to the document. The document is protected from editing.",
|
||||
"DE.Views.FileMenuPanels.ProtectDoc.txtSignedInvalid": "Some of the digital signatures in the document are invalid or could not be verified. The document is protected from editing.",
|
||||
"DE.Views.FileMenuPanels.ProtectDoc.txtView": "View signatures",
|
||||
"DE.Views.FileMenuPanels.ProtectDoc.txtProtectDocument": "Protect this document with a password",
|
||||
"DE.Views.FileMenuPanels.ProtectDoc.txtAddSignature": "Ensure the integrity of the document by adding an<br>invisible digital signature",
|
||||
"DE.Views.FileMenuPanels.ProtectDoc.txtAddedSignature": "Valid signatures have been added to the document.<br>The document is protected from editing.",
|
||||
"DE.Views.FileMenuPanels.Settings.okButtonText": "Apply",
|
||||
"DE.Views.FileMenuPanels.Settings.strCoAuthMode": "Co-editing Mode",
|
||||
"DE.Views.FileMenuPanels.Settings.strFast": "Fast",
|
||||
|
|
|
@ -564,16 +564,41 @@
|
|||
|
||||
.header {
|
||||
.font-weight-bold();
|
||||
margin: 20px 0 10px;
|
||||
margin: 20px 0 4px 0;
|
||||
}
|
||||
|
||||
table {
|
||||
td {
|
||||
padding: 5px 0;
|
||||
}
|
||||
.description {
|
||||
color: @text-secondary-ie;
|
||||
color: @text-secondary;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#fms-btn-delete-pwd {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.signature-view-link {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.signature-tip {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
#fms-btn-invisible-sign {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#id-fms-lbl-protect-header {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.btn-text-default.auto {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
}
|
|
@ -1749,20 +1749,27 @@ define([
|
|||
'<label id="id-fms-lbl-protect-header"><%= scope.strProtect %></label>',
|
||||
'<div id="id-fms-password">',
|
||||
'<label class="header"><%= scope.strEncrypt %></label>',
|
||||
'<div id="fms-btn-add-pwd" style="width:190px;"></div>',
|
||||
'<table id="id-fms-view-pwd" cols="2" width="300">',
|
||||
'<tr>',
|
||||
'<td colspan="2"><label style="cursor: default;"><%= scope.txtEncrypted %></label></td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td><div id="fms-btn-change-pwd" style="width:190px;"></div></td>',
|
||||
'<td align="right"><div id="fms-btn-delete-pwd" style="width:190px; margin-left:20px;"></div></td>',
|
||||
'</tr>',
|
||||
'</table>',
|
||||
'<div class="encrypt-block">',
|
||||
'<div class="description"><%= scope.txtProtectPresentation %></div>',
|
||||
'<div id="fms-btn-add-pwd"></div>',
|
||||
'</div>',
|
||||
'<div class="encrypted-block">',
|
||||
'<div class="description"><%= scope.txtEncrypted %></div>',
|
||||
'<div class="buttons">',
|
||||
'<div id="fms-btn-change-pwd"></div>',
|
||||
'<div id="fms-btn-delete-pwd"></div>',
|
||||
'</div>',
|
||||
'</div>',
|
||||
'</div>',
|
||||
'<div id="id-fms-signature">',
|
||||
'<label class="header"><%= scope.strSignature %></label>',
|
||||
'<div id="fms-btn-invisible-sign" style="width:190px; margin-bottom: 20px;"></div>',
|
||||
'<div class="add-signature-block">',
|
||||
'<div class="description"><%= scope.txtAddSignature %></div>',
|
||||
'<div id="fms-btn-invisible-sign"></div>',
|
||||
'</div>',
|
||||
'<div class="added-signature-block">',
|
||||
'<div class="description"><%= scope.txtAddedSignature %></div>',
|
||||
'</div>',
|
||||
'<div id="id-fms-signature-view"></div>',
|
||||
'</div>'
|
||||
].join('')),
|
||||
|
@ -1774,15 +1781,13 @@ define([
|
|||
|
||||
var me = this;
|
||||
this.templateSignature = _.template([
|
||||
'<table cols="2" width="300" class="<% if (!hasSigned) { %>hidden<% } %>"">',
|
||||
'<tr>',
|
||||
'<td colspan="2"><label style="cursor: default;"><%= tipText %></label></td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td><label class="link signature-view-link" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium">' + me.txtView + '</label></td>',
|
||||
'<td align="right"><label class="link signature-edit-link <% if (!hasSigned) { %>hidden<% } %>" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium">' + me.txtEdit + '</label></td>',
|
||||
'</tr>',
|
||||
'</table>'
|
||||
'<div class="<% if (!hasSigned) { %>hidden<% } %>"">',
|
||||
'<div class="signature-tip"><%= tipText %></div>',
|
||||
'<div class="buttons">',
|
||||
'<label class="link signature-view-link" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium">' + me.txtView + '</label>',
|
||||
'<label class="link signature-edit-link <% if (!hasSigned) { %>hidden<% } %>" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium">' + me.txtEdit + '</label>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
|
@ -1804,7 +1809,8 @@ define([
|
|||
this.btnDeletePwd.on('click', _.bind(this.closeMenu, this));
|
||||
|
||||
this.cntPassword = $('#id-fms-password');
|
||||
this.cntPasswordView = $('#id-fms-view-pwd');
|
||||
this.cntEncryptBlock = this.$el.find('.encrypt-block');
|
||||
this.cntEncryptedBlock = this.$el.find('.encrypted-block');
|
||||
|
||||
this.btnAddInvisibleSign = protection.getButton('signature');
|
||||
this.btnAddInvisibleSign.render(this.$el.find('#fms-btn-invisible-sign'));
|
||||
|
@ -1812,6 +1818,10 @@ define([
|
|||
|
||||
this.cntSignature = $('#id-fms-signature');
|
||||
this.cntSignatureView = $('#id-fms-signature-view');
|
||||
|
||||
this.cntAddSignature = this.$el.find('.add-signature-block');
|
||||
this.cntAddedSignature = this.$el.find('.added-signature-block');
|
||||
|
||||
if (_.isUndefined(this.scroller)) {
|
||||
this.scroller = new Common.UI.Scroller({
|
||||
el: this.$el,
|
||||
|
@ -1888,10 +1898,16 @@ define([
|
|||
|
||||
var tipText = (hasInvalid) ? this.txtSignedInvalid : (hasValid ? this.txtSigned : "");
|
||||
this.cntSignatureView.html(this.templateSignature({tipText: tipText, hasSigned: (hasValid || hasInvalid)}));
|
||||
|
||||
var isAddedSignature = this.btnAddInvisibleSign.$el.find('button').hasClass('hidden');
|
||||
this.cntAddSignature.toggleClass('hidden', isAddedSignature);
|
||||
this.cntAddedSignature.toggleClass('hidden', !isAddedSignature);
|
||||
},
|
||||
|
||||
updateEncrypt: function() {
|
||||
this.cntPasswordView.toggleClass('hidden', this.btnAddPwd.isVisible());
|
||||
var isProtected = this.btnAddPwd.$el.find('button').hasClass('hidden');
|
||||
this.cntEncryptBlock.toggleClass('hidden', isProtected);
|
||||
this.cntEncryptedBlock.toggleClass('hidden', !isProtected);
|
||||
},
|
||||
|
||||
strProtect: 'Protect Presentation',
|
||||
|
@ -1903,7 +1919,10 @@ define([
|
|||
notcriticalErrorTitle: 'Warning',
|
||||
txtEditWarning: 'Editing will remove the signatures from the presentation.<br>Are you sure you want to continue?',
|
||||
strEncrypt: 'With Password',
|
||||
txtEncrypted: 'This presentation has been protected by password'
|
||||
txtProtectPresentation: 'Protect this presentation with a password',
|
||||
txtEncrypted: 'A password is required to open this presentation',
|
||||
txtAddSignature: 'Ensure the integrity of the presentation by adding an<br>invisible digital signature',
|
||||
txtAddedSignature: 'Valid signatures have been added to the presentation.<br>The presentation is protected from editing.'
|
||||
|
||||
}, PE.Views.FileMenuPanels.ProtectDoc || {}));
|
||||
|
||||
|
|
|
@ -1857,10 +1857,13 @@
|
|||
"PE.Views.FileMenuPanels.ProtectDoc.strSignature": "With signature",
|
||||
"PE.Views.FileMenuPanels.ProtectDoc.txtEdit": "Edit presentation",
|
||||
"PE.Views.FileMenuPanels.ProtectDoc.txtEditWarning": "Editing will remove signatures from the presentation.<br>Continue?",
|
||||
"PE.Views.FileMenuPanels.ProtectDoc.txtEncrypted": "This presentation has been protected by password",
|
||||
"PE.Views.FileMenuPanels.ProtectDoc.txtEncrypted": "A password is required to open this presentation",
|
||||
"PE.Views.FileMenuPanels.ProtectDoc.txtSigned": "Valid signatures have been added to the presentation. The presentation is protected from editing.",
|
||||
"PE.Views.FileMenuPanels.ProtectDoc.txtSignedInvalid": "Some of the digital signatures in presentation are invalid or could not be verified. The presentation is protected from editing.",
|
||||
"PE.Views.FileMenuPanels.ProtectDoc.txtView": "View signatures",
|
||||
"PE.Views.FileMenuPanels.ProtectDoc.txtProtectPresentation": "Protect this presentation with a password",
|
||||
"PE.Views.FileMenuPanels.ProtectDoc.txtAddSignature": "Ensure the integrity of the presentation by adding an<br>invisible digital signature",
|
||||
"PE.Views.FileMenuPanels.ProtectDoc.txtAddedSignature": "Valid signatures have been added to the presentation.<br>The presentation is protected from editing.",
|
||||
"PE.Views.FileMenuPanels.Settings.okButtonText": "Apply",
|
||||
"PE.Views.FileMenuPanels.Settings.strCoAuthMode": "Co-editing Mode",
|
||||
"PE.Views.FileMenuPanels.Settings.strFast": "Fast",
|
||||
|
|
|
@ -537,26 +537,51 @@
|
|||
}
|
||||
|
||||
#panel-protect {
|
||||
padding: 30px 30px;
|
||||
|
||||
label {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
padding: 30px 30px;
|
||||
|
||||
.header {
|
||||
.font-weight-bold();
|
||||
margin: 20px 0 10px;
|
||||
margin: 20px 0 4px 0;
|
||||
}
|
||||
|
||||
table {
|
||||
td {
|
||||
padding: 5px 0;
|
||||
}
|
||||
.description {
|
||||
color: @text-secondary-ie;
|
||||
color: @text-secondary;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#fms-btn-delete-pwd {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.signature-view-link {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.signature-tip {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
#fms-btn-invisible-sign {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#id-fms-lbl-protect-header {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.btn-text-default.auto {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2139,20 +2139,27 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
|||
'<label id="id-fms-lbl-protect-header"><%= scope.strProtect %></label>',
|
||||
'<div id="id-fms-password">',
|
||||
'<label class="header"><%= scope.strEncrypt %></label>',
|
||||
'<div id="fms-btn-add-pwd" style="width:190px;"></div>',
|
||||
'<table id="id-fms-view-pwd" cols="2" width="300">',
|
||||
'<tr>',
|
||||
'<td colspan="2"><label style="cursor: default;"><%= scope.txtEncrypted %></label></td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td><div id="fms-btn-change-pwd" style="width:190px;"></div></td>',
|
||||
'<td align="right"><div id="fms-btn-delete-pwd" style="width:190px; margin-left:20px;"></div></td>',
|
||||
'</tr>',
|
||||
'</table>',
|
||||
'<div class="encrypt-block">',
|
||||
'<div class="description"><%= scope.txtProtectSpreadsheet %></div>',
|
||||
'<div id="fms-btn-add-pwd"></div>',
|
||||
'</div>',
|
||||
'<div class="encrypted-block">',
|
||||
'<div class="description"><%= scope.txtEncrypted %></div>',
|
||||
'<div class="buttons">',
|
||||
'<div id="fms-btn-change-pwd"></div>',
|
||||
'<div id="fms-btn-delete-pwd"></div>',
|
||||
'</div>',
|
||||
'</div>',
|
||||
'</div>',
|
||||
'<div id="id-fms-signature">',
|
||||
'<label class="header"><%= scope.strSignature %></label>',
|
||||
'<div id="fms-btn-invisible-sign" style="width:190px; margin-bottom: 20px;"></div>',
|
||||
'<div class="add-signature-block">',
|
||||
'<div class="description"><%= scope.txtAddSignature %></div>',
|
||||
'<div id="fms-btn-invisible-sign"></div>',
|
||||
'</div>',
|
||||
'<div class="added-signature-block">',
|
||||
'<div class="description"><%= scope.txtAddedSignature %></div>',
|
||||
'</div>',
|
||||
'<div id="id-fms-signature-view"></div>',
|
||||
'</div>'
|
||||
].join('')),
|
||||
|
@ -2164,15 +2171,13 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
|||
|
||||
var me = this;
|
||||
this.templateSignature = _.template([
|
||||
'<table cols="2" width="300" class="<% if (!hasRequested && !hasSigned) { %>hidden<% } %>"">',
|
||||
'<tr>',
|
||||
'<td colspan="2"><label style="cursor: default;"><%= tipText %></label></td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td><label class="link signature-view-link" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium">' + me.txtView + '</label></td>',
|
||||
'<td align="right"><label class="link signature-edit-link <% if (!hasSigned) { %>hidden<% } %>" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium">' + me.txtEdit + '</label></td>',
|
||||
'</tr>',
|
||||
'</table>'
|
||||
'<div class="<% if (!hasRequested && !hasSigned) { %>hidden<% } %>"">',
|
||||
'<div class="signature-tip"><%= tipText %></div>',
|
||||
'<div class="buttons">',
|
||||
'<label class="link signature-view-link" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium">' + me.txtView + '</label>',
|
||||
'<label class="link signature-edit-link <% if (!hasSigned) { %>hidden<% } %>" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium">' + me.txtEdit + '</label>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join(''));
|
||||
},
|
||||
|
||||
|
@ -2194,7 +2199,8 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
|||
this.btnDeletePwd.on('click', _.bind(this.closeMenu, this));
|
||||
|
||||
this.cntPassword = $('#id-fms-password');
|
||||
this.cntPasswordView = $('#id-fms-view-pwd');
|
||||
this.cntEncryptBlock = this.$el.find('.encrypt-block');
|
||||
this.cntEncryptedBlock = this.$el.find('.encrypted-block');
|
||||
|
||||
this.btnAddInvisibleSign = protection.getButton('signature');
|
||||
this.btnAddInvisibleSign.render(this.$el.find('#fms-btn-invisible-sign'));
|
||||
|
@ -2202,6 +2208,10 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
|||
|
||||
this.cntSignature = $('#id-fms-signature');
|
||||
this.cntSignatureView = $('#id-fms-signature-view');
|
||||
|
||||
this.cntAddSignature = this.$el.find('.add-signature-block');
|
||||
this.cntAddedSignature = this.$el.find('.added-signature-block');
|
||||
|
||||
if (_.isUndefined(this.scroller)) {
|
||||
this.scroller = new Common.UI.Scroller({
|
||||
el: this.$el,
|
||||
|
@ -2284,10 +2294,16 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
|||
tipText = this.txtRequestedSignatures + (tipText!="" ? "<br><br>" : "")+ tipText;
|
||||
|
||||
this.cntSignatureView.html(this.templateSignature({tipText: tipText, hasSigned: (hasValid || hasInvalid), hasRequested: hasRequested}));
|
||||
|
||||
var isAddedSignature = this.btnAddInvisibleSign.$el.find('button').hasClass('hidden');
|
||||
this.cntAddSignature.toggleClass('hidden', isAddedSignature);
|
||||
this.cntAddedSignature.toggleClass('hidden', !isAddedSignature);
|
||||
},
|
||||
|
||||
updateEncrypt: function() {
|
||||
this.cntPasswordView.toggleClass('hidden', this.btnAddPwd.isVisible());
|
||||
var isProtected = this.btnAddPwd.$el.find('button').hasClass('hidden');
|
||||
this.cntEncryptBlock.toggleClass('hidden', isProtected);
|
||||
this.cntEncryptedBlock.toggleClass('hidden', !isProtected);
|
||||
},
|
||||
|
||||
strProtect: 'Protect Workbook',
|
||||
|
@ -2300,7 +2316,10 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
|||
notcriticalErrorTitle: 'Warning',
|
||||
txtEditWarning: 'Editing will remove the signatures from the workbook.<br>Are you sure you want to continue?',
|
||||
strEncrypt: 'With Password',
|
||||
txtEncrypted: 'This workbook has been protected by password'
|
||||
txtProtectSpreadsheet: 'Protect this spreadsheet with a password',
|
||||
txtEncrypted: 'A password is required to open this spreadsheet',
|
||||
txtAddSignature: 'Ensure the integrity of the spreadsheet by adding an<br>invisible digital signature',
|
||||
txtAddedSignature: 'Valid signatures have been added to the spreadsheet.<br>The spreadsheet is protected from editing.'
|
||||
|
||||
}, SSE.Views.FileMenuPanels.ProtectDoc || {}));
|
||||
|
||||
|
|
|
@ -2445,11 +2445,14 @@
|
|||
"SSE.Views.FileMenuPanels.ProtectDoc.strSignature": "With signature",
|
||||
"SSE.Views.FileMenuPanels.ProtectDoc.txtEdit": "Edit spreadsheet",
|
||||
"SSE.Views.FileMenuPanels.ProtectDoc.txtEditWarning": "Editing will remove signatures from the spreadsheet.<br>Continue?",
|
||||
"SSE.Views.FileMenuPanels.ProtectDoc.txtEncrypted": "This spreadsheet has been protected by password",
|
||||
"SSE.Views.FileMenuPanels.ProtectDoc.txtEncrypted": "A password is required to open this spreadsheet",
|
||||
"SSE.Views.FileMenuPanels.ProtectDoc.txtRequestedSignatures": "This spreadsheet needs to be signed.",
|
||||
"SSE.Views.FileMenuPanels.ProtectDoc.txtSigned": "Valid signatures have been added to the spreadsheet. The spreadsheet is protected from editing.",
|
||||
"SSE.Views.FileMenuPanels.ProtectDoc.txtSignedInvalid": "Some of the digital signatures in spreadsheet are invalid or could not be verified. The spreadsheet is protected from editing.",
|
||||
"SSE.Views.FileMenuPanels.ProtectDoc.txtView": "View signatures",
|
||||
"SSE.Views.FileMenuPanels.ProtectDoc.txtProtectSpreadsheet": "Protect this spreadsheet with a password",
|
||||
"SSE.Views.FileMenuPanels.ProtectDoc.txtAddSignature": "Ensure the integrity of the spreadsheet by adding an<br>invisible digital signature",
|
||||
"SSE.Views.FileMenuPanels.ProtectDoc.txtAddedSignature": "Valid signatures have been added to the spreadsheet.<br>The spreadsheet is protected from editing.",
|
||||
"SSE.Views.FileMenuPanels.ViewSaveAs.textDownloadAs": "Download as",
|
||||
"SSE.Views.FileMenuPanels.ViewSaveCopy.textSaveCopyAs": "Save Copy as",
|
||||
"SSE.Views.FileMenuPanels.RecentFiles.txtOpenRecent": "Open Recent",
|
||||
|
|
|
@ -596,26 +596,51 @@
|
|||
}
|
||||
|
||||
#panel-protect {
|
||||
padding: 30px 30px;
|
||||
|
||||
label {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
padding: 30px 30px;
|
||||
|
||||
.header {
|
||||
.font-weight-bold();
|
||||
margin: 20px 0 10px;
|
||||
margin: 20px 0 4px 0;
|
||||
}
|
||||
|
||||
table {
|
||||
td {
|
||||
padding: 5px 0;
|
||||
}
|
||||
.description {
|
||||
color: @text-secondary-ie;
|
||||
color: @text-secondary;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#fms-btn-delete-pwd {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.signature-view-link {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.signature-tip {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
#fms-btn-invisible-sign {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#id-fms-lbl-protect-header {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.btn-text-default.auto {
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
#panel-print {
|
||||
|
|
Loading…
Reference in a new issue