Add warning when open file protected with password.

This commit is contained in:
Julia Radzhabova 2018-04-27 14:53:36 +03:00
parent 5bfbda65d5
commit d8f87beaa2
5 changed files with 27 additions and 9 deletions

View file

@ -55,8 +55,8 @@ define([
_.extend(_options, {
closable : false,
width : (options.preview) ? 414 : 262,
height : (options.preview) ? 291 : ((options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 205 : 155),
width : (options.preview) ? 414 : ((options.type == Asc.c_oAscAdvancedOptionsID.DRM) ? 370 : 262),
height : (options.preview) ? 277 : ((options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 190 : 187),
header : true,
preview : options.preview,
cls : 'open-dlg',
@ -70,8 +70,12 @@ define([
'<div class="box" style="height:' + (_options.height - 85) + 'px;">',
'<div class="content-panel" >',
'<% if (type == Asc.c_oAscAdvancedOptionsID.DRM) { %>',
'<label class="header">' + t.txtPassword + '</label>',
'<div id="id-password-txt" style="margin-bottom:15px;"></div>',
'<div>',
'<div class="icon img-commonctrl warn"/>',
'<div style="padding-left: 50px;"><div style="font-size: 12px;">' + t.txtProtected+ '</div>',
'<label class="header" style="margin-top: 15px;">' + t.txtPassword + '</label>',
'<div id="id-password-txt" style="width: 240px;"></div></div>',
'</div>',
'<% } else { %>',
'<div style="display: inline-block; margin-bottom:15px;margin-right: 10px;">',
'<label class="header">' + t.txtEncoding + '</label>',
@ -105,11 +109,10 @@ define([
'<% } %>',
'</div>',
'</div>',
'<div class="separator horizontal"/>',
'<div class="footer center">',
'<button class="btn normal dlg-btn primary" result="ok" style="margin-right:10px;">' + t.okButtonText + '</button>',
'<button class="btn normal dlg-btn primary" result="ok">' + t.okButtonText + '</button>',
'<% if (closable) { %>',
'<button class="btn normal dlg-btn" result="cancel">' + t.closeButtonText + '</button>',
'<button class="btn normal dlg-btn" result="cancel" style="margin-left:10px;">' + t.closeButtonText + '</button>',
'<% } %>',
'</div>'
].join('');
@ -527,7 +530,8 @@ define([
txtPreview: 'Preview',
txtComma: 'Comma',
txtColon: 'Colon',
txtSemicolon: 'Semicolon'
txtSemicolon: 'Semicolon',
txtProtected: 'Once you enter the password and open the file, the current password to the file will be reset.'
}, Common.Views.OpenDialog || {}));
});

View file

@ -15,7 +15,7 @@
.content-panel {
vertical-align: top;
padding: 15px;
padding: 15px 15px 0;
width: 100%;
.inner-content {
@ -74,6 +74,17 @@
padding-bottom: 8px;
}
}
.icon {
float: left;
width: 35px;
height: 35px;
&.warn {
height: 32px;
background-position: @alerts-offset-x @alerts-offset-y - 105px;
}
}
}
}
.footer {

View file

@ -191,6 +191,7 @@
"Common.Views.OpenDialog.txtPreview": "Preview",
"Common.Views.OpenDialog.txtTitle": "Choose %1 options",
"Common.Views.OpenDialog.txtTitleProtected": "Protected File",
"Common.Views.OpenDialog.txtProtected": "Once you enter the password and open the file, the current password to the file will be reset.",
"Common.Views.PasswordDialog.cancelButtonText": "Cancel",
"Common.Views.PasswordDialog.okButtonText": "OK",
"Common.Views.PasswordDialog.txtDescription": "Set a password to protect this document",

View file

@ -123,6 +123,7 @@
"Common.Views.OpenDialog.txtPassword": "Password",
"Common.Views.OpenDialog.txtTitle": "Choose %1 options",
"Common.Views.OpenDialog.txtTitleProtected": "Protected File",
"Common.Views.OpenDialog.txtProtected": "Once you enter the password and open the file, the current password to the file will be reset.",
"Common.Views.PasswordDialog.cancelButtonText": "Cancel",
"Common.Views.PasswordDialog.okButtonText": "OK",
"Common.Views.PasswordDialog.txtDescription": "Set a password to protect this document",

View file

@ -113,6 +113,7 @@
"Common.Views.OpenDialog.txtTab": "Tab",
"Common.Views.OpenDialog.txtTitle": "Choose %1 options",
"Common.Views.OpenDialog.txtTitleProtected": "Protected File",
"Common.Views.OpenDialog.txtProtected": "Once you enter the password and open the file, the current password to the file will be reset.",
"Common.Views.PasswordDialog.cancelButtonText": "Cancel",
"Common.Views.PasswordDialog.okButtonText": "OK",
"Common.Views.PasswordDialog.txtDescription": "Set a password to protect this document",