[SSE] Check wb password

This commit is contained in:
Julia Radzhabova 2021-11-09 16:22:06 +03:00
parent b6b126027e
commit 74a479045b

View file

@ -125,9 +125,7 @@ define([
btn = result;
if (result == 'ok') {
var props = me.api.asc_getProtectedWorkbook();
props.asc_setLockStructure(true);
value && props.asc_setPassword(value);
me.api.asc_setProtectedWorkbook(props);
props.asc_setLockStructure(value, _.bind(me.onSetProtectedWorkbook, me));
}
Common.NotificationCenter.trigger('edit:complete');
}
@ -152,8 +150,7 @@ define([
btn = result;
if (result == 'ok') {
if (me.api) {
props.asc_setLockStructure(false, value);
me.api.asc_setProtectedWorkbook(props);
props.asc_setLockStructure(value, _.bind(me.onSetProtectedWorkbook, me));
}
Common.NotificationCenter.trigger('edit:complete');
}
@ -165,12 +162,15 @@ define([
win.show();
} else {
props.asc_setLockStructure(false);
me.api.asc_setProtectedWorkbook(props);
props.asc_setLockStructure(undefined, _.bind(me.onSetProtectedWorkbook, me));
}
}
},
onSetProtectedWorkbook: function(props) {
this.api.asc_setProtectedWorkbook(props);
},
onSheetClick: function(state) {
if (state) {
var me = this,