Open with password: close dialog only by Close File button (not by Esc, not by cross button)
This commit is contained in:
parent
985d48ed84
commit
1cf7526a85
|
@ -74,7 +74,8 @@ define([
|
||||||
cls : 'open-dlg',
|
cls : 'open-dlg',
|
||||||
contentTemplate : '',
|
contentTemplate : '',
|
||||||
title : (options.type == Asc.c_oAscAdvancedOptionsID.DRM) ? t.txtTitleProtected : t.txtTitle.replace('%1', (options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 'CSV' : 'TXT'),
|
title : (options.type == Asc.c_oAscAdvancedOptionsID.DRM) ? t.txtTitleProtected : t.txtTitle.replace('%1', (options.type == Asc.c_oAscAdvancedOptionsID.CSV) ? 'CSV' : 'TXT'),
|
||||||
toolcallback : _.bind(t.onToolClose, t)
|
toolcallback : _.bind(t.onToolClose, t),
|
||||||
|
closeFile : false
|
||||||
|
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
|
@ -130,8 +131,11 @@ define([
|
||||||
'</div>',
|
'</div>',
|
||||||
'<div class="footer center">',
|
'<div class="footer center">',
|
||||||
'<button class="btn normal dlg-btn primary" result="ok">' + t.okButtonText + '</button>',
|
'<button class="btn normal dlg-btn primary" result="ok">' + t.okButtonText + '</button>',
|
||||||
|
'<% if (closeFile) { %>',
|
||||||
|
'<button class="btn normal dlg-btn" result="cancel" style="margin-left:10px;">' + t.closeButtonText + '</button>',
|
||||||
|
'<% } %>',
|
||||||
'<% if (closable) { %>',
|
'<% if (closable) { %>',
|
||||||
'<button class="btn normal dlg-btn" result="cancel" style="margin-left:10px;">' + ((_options.mode == 1) ? t.closeButtonText : t.cancelButtonText) + '</button>',
|
'<button class="btn normal dlg-btn" result="cancel" style="margin-left:10px;">' + t.cancelButtonText + '</button>',
|
||||||
'<% } %>',
|
'<% } %>',
|
||||||
'</div>'
|
'</div>'
|
||||||
].join('');
|
].join('');
|
||||||
|
|
|
@ -1921,7 +1921,7 @@ define([
|
||||||
});
|
});
|
||||||
} else if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
|
} else if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
|
||||||
me._state.openDlg = new Common.Views.OpenDialog({
|
me._state.openDlg = new Common.Views.OpenDialog({
|
||||||
closable: me.appOptions.canRequestClose,
|
closeFile: me.appOptions.canRequestClose,
|
||||||
type: type,
|
type: type,
|
||||||
warning: !(me.appOptions.isDesktopApp && me.appOptions.isOffline),
|
warning: !(me.appOptions.isDesktopApp && me.appOptions.isOffline),
|
||||||
validatePwd: !!me._state.isDRM,
|
validatePwd: !!me._state.isDRM,
|
||||||
|
|
|
@ -1765,7 +1765,7 @@ define([
|
||||||
me = this;
|
me = this;
|
||||||
if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
|
if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
|
||||||
me._state.openDlg = new Common.Views.OpenDialog({
|
me._state.openDlg = new Common.Views.OpenDialog({
|
||||||
closable: me.appOptions.canRequestClose,
|
closeFile: me.appOptions.canRequestClose,
|
||||||
type: type,
|
type: type,
|
||||||
warning: !(me.appOptions.isDesktopApp && me.appOptions.isOffline),
|
warning: !(me.appOptions.isDesktopApp && me.appOptions.isOffline),
|
||||||
validatePwd: !!me._state.isDRM,
|
validatePwd: !!me._state.isDRM,
|
||||||
|
|
|
@ -1589,7 +1589,7 @@ define([
|
||||||
});
|
});
|
||||||
} else if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
|
} else if (type == Asc.c_oAscAdvancedOptionsID.DRM) {
|
||||||
me._state.openDlg = new Common.Views.OpenDialog({
|
me._state.openDlg = new Common.Views.OpenDialog({
|
||||||
closable: me.appOptions.canRequestClose,
|
closeFile: me.appOptions.canRequestClose,
|
||||||
type: type,
|
type: type,
|
||||||
warning: !(me.appOptions.isDesktopApp && me.appOptions.isOffline),
|
warning: !(me.appOptions.isDesktopApp && me.appOptions.isOffline),
|
||||||
validatePwd: !!me._state.isDRM,
|
validatePwd: !!me._state.isDRM,
|
||||||
|
|
Loading…
Reference in a new issue