[SSE] Fix protection
This commit is contained in:
parent
3695549003
commit
b05d1922d2
|
@ -126,7 +126,8 @@ define([
|
||||||
btn = result;
|
btn = result;
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
var props = me.api.asc_getProtectedWorkbook();
|
var props = me.api.asc_getProtectedWorkbook();
|
||||||
props.asc_setLockStructure(value, _.bind(me.onSetProtectedWorkbook, me));
|
props.asc_setLockStructure(value);
|
||||||
|
me.api.asc_setProtectedWorkbook(props);
|
||||||
}
|
}
|
||||||
Common.NotificationCenter.trigger('edit:complete');
|
Common.NotificationCenter.trigger('edit:complete');
|
||||||
}
|
}
|
||||||
|
@ -151,7 +152,8 @@ define([
|
||||||
btn = result;
|
btn = result;
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
if (me.api) {
|
if (me.api) {
|
||||||
props.asc_setLockStructure(value && value.drmOptions ? value.drmOptions.asc_getPassword() : undefined, _.bind(me.onSetProtectedWorkbook, me));
|
props.asc_setLockStructure(value && value.drmOptions ? value.drmOptions.asc_getPassword() : undefined);
|
||||||
|
me.api.asc_setProtectedWorkbook(props);
|
||||||
}
|
}
|
||||||
Common.NotificationCenter.trigger('edit:complete');
|
Common.NotificationCenter.trigger('edit:complete');
|
||||||
}
|
}
|
||||||
|
@ -163,15 +165,12 @@ define([
|
||||||
|
|
||||||
win.show();
|
win.show();
|
||||||
} else {
|
} else {
|
||||||
props.asc_setLockStructure(undefined, _.bind(me.onSetProtectedWorkbook, me));
|
props.asc_setLockStructure();
|
||||||
|
me.api.asc_setProtectedWorkbook(props);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onSetProtectedWorkbook: function(props) {
|
|
||||||
this.api.asc_setProtectedWorkbook(props);
|
|
||||||
},
|
|
||||||
|
|
||||||
onSheetClick: function(state) {
|
onSheetClick: function(state) {
|
||||||
this.view.btnProtectSheet.toggle(!state, true);
|
this.view.btnProtectSheet.toggle(!state, true);
|
||||||
if (state) {
|
if (state) {
|
||||||
|
@ -184,7 +183,8 @@ define([
|
||||||
handler: function(result, value, props) {
|
handler: function(result, value, props) {
|
||||||
btn = result;
|
btn = result;
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
props.asc_setSheet(value, _.bind(me.onSetProtectedSheet, me));
|
props.asc_setSheet(value);
|
||||||
|
me.api.asc_setProtectedSheet(props);
|
||||||
}
|
}
|
||||||
Common.NotificationCenter.trigger('edit:complete');
|
Common.NotificationCenter.trigger('edit:complete');
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,8 @@ define([
|
||||||
btn = result;
|
btn = result;
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
if (me.api) {
|
if (me.api) {
|
||||||
props.asc_setSheet(value && value.drmOptions ? value.drmOptions.asc_getPassword() : undefined, _.bind(me.onSetProtectedSheet, me));
|
props.asc_setSheet(value && value.drmOptions ? value.drmOptions.asc_getPassword() : undefined);
|
||||||
|
me.api.asc_setProtectedSheet(props);
|
||||||
}
|
}
|
||||||
Common.NotificationCenter.trigger('edit:complete');
|
Common.NotificationCenter.trigger('edit:complete');
|
||||||
}
|
}
|
||||||
|
@ -221,15 +222,12 @@ define([
|
||||||
|
|
||||||
win.show();
|
win.show();
|
||||||
} else {
|
} else {
|
||||||
props.asc_setSheet(undefined, _.bind(me.onSetProtectedSheet, me));
|
props.asc_setSheet();
|
||||||
|
me.api.asc_setProtectedSheet(props);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onSetProtectedSheet: function(props) {
|
|
||||||
this.api.asc_setProtectedSheet(props);
|
|
||||||
},
|
|
||||||
|
|
||||||
onRangesClick: function() {
|
onRangesClick: function() {
|
||||||
var me = this,
|
var me = this,
|
||||||
props = me.api.asc_getProtectedRanges(),
|
props = me.api.asc_getProtectedRanges(),
|
||||||
|
|
Loading…
Reference in a new issue