commit
f7187db16a
|
@ -1445,8 +1445,6 @@ define([
|
||||||
this.textMenu.items[0].setDisabled(!cancopy); // copy
|
this.textMenu.items[0].setDisabled(!cancopy); // copy
|
||||||
this.textMenu.items[1].setDisabled(disabled || !cancopy); // cut
|
this.textMenu.items[1].setDisabled(disabled || !cancopy); // cut
|
||||||
this.textMenu.items[2].setDisabled(disabled) // paste;
|
this.textMenu.items[2].setDisabled(disabled) // paste;
|
||||||
this.textMenu.items[3].setVisible(this.appOptions.canPrint);
|
|
||||||
this.textMenu.items[3].setDisabled(!cancopy);
|
|
||||||
|
|
||||||
this.showPopupMenu(this.textMenu, {}, event);
|
this.showPopupMenu(this.textMenu, {}, event);
|
||||||
}
|
}
|
||||||
|
@ -1470,13 +1468,6 @@ define([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'print':
|
|
||||||
var printopt = new Asc.asc_CAdjustPrint();
|
|
||||||
printopt.asc_setPrintType(Asc.c_oAscPrintType.Selection);
|
|
||||||
var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
|
|
||||||
opts.asc_setAdvancedOptions(printopt);
|
|
||||||
this.api.asc_Print(opts);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -92,8 +92,7 @@ define([
|
||||||
items: [
|
items: [
|
||||||
{ caption: this.textCut, value: 'cut', iconCls: 'mi-icon svg-icon cut' },
|
{ caption: this.textCut, value: 'cut', iconCls: 'mi-icon svg-icon cut' },
|
||||||
{ caption: this.textCopy, value: 'copy', iconCls: 'mi-icon svg-icon copy' },
|
{ caption: this.textCopy, value: 'copy', iconCls: 'mi-icon svg-icon copy' },
|
||||||
{ caption: this.textPaste, value: 'paste', iconCls: 'mi-icon svg-icon paste' },
|
{ caption: this.textPaste, value: 'paste', iconCls: 'mi-icon svg-icon paste' }
|
||||||
{ caption: this.textPrintSel, value: 'print', iconCls: 'mi-icon svg-icon print' }
|
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -1219,19 +1219,20 @@ define([
|
||||||
this.txtNewValue.setValue(record.get('name'));
|
this.txtNewValue.setValue(record.get('name'));
|
||||||
this._state.listValue = record.get('name');
|
this._state.listValue = record.get('name');
|
||||||
this._state.listIndex = undefined;
|
this._state.listIndex = undefined;
|
||||||
this.disableListButtons(false);
|
this.disableListButtons();
|
||||||
},
|
},
|
||||||
|
|
||||||
onDisconnect: function() {
|
onDisconnect: function() {
|
||||||
this.onKeyChanged(this.cmbKey, {value: ""});
|
this.onKeyChanged(this.cmbKey, {value: ""});
|
||||||
},
|
},
|
||||||
|
|
||||||
disableListButtons: function(disabled) {
|
disableListButtons: function() {
|
||||||
if (disabled===undefined)
|
var rec = this.list.getSelectedRec(),
|
||||||
disabled = !this.list.getSelectedRec();
|
idx = rec ? this.list.store.indexOf(rec) : -1;
|
||||||
this.btnListDelete.setDisabled(disabled || this._state.DisabledControls);
|
|
||||||
this.btnListUp.setDisabled(disabled || this._state.DisabledControls);
|
this.btnListDelete.setDisabled(idx<0 || this._state.DisabledControls);
|
||||||
this.btnListDown.setDisabled(disabled || this._state.DisabledControls);
|
this.btnListUp.setDisabled(idx<1 || this._state.DisabledControls);
|
||||||
|
this.btnListDown.setDisabled(idx<0 || idx>this.list.store.length-2 || this._state.DisabledControls);
|
||||||
},
|
},
|
||||||
|
|
||||||
onImagePositionChange: function (type, field, newValue, oldValue) {
|
onImagePositionChange: function (type, field, newValue, oldValue) {
|
||||||
|
|
|
@ -2231,7 +2231,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
checkProtectedRange: function(callback, scope, args) {
|
checkProtectedRange: function(callback, scope, args) {
|
||||||
var result = this.api.asc_isProtectedSheet() ? this.api.asc_checkProtectedRange() : false;
|
var result = this.api.asc_isProtectedSheet() && this.api.asc_checkLockedCells() ? this.api.asc_checkProtectedRange() : false;
|
||||||
if (result===null) {
|
if (result===null) {
|
||||||
this.onError(Asc.c_oAscError.ID.ChangeOnProtectedSheet, Asc.c_oAscError.Level.NoCritical);
|
this.onError(Asc.c_oAscError.ID.ChangeOnProtectedSheet, Asc.c_oAscError.Level.NoCritical);
|
||||||
return;
|
return;
|
||||||
|
@ -2250,18 +2250,20 @@ define([
|
||||||
handler: function (result, value) {
|
handler: function (result, value) {
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
if (me.api) {
|
if (me.api) {
|
||||||
if (me.api.asc_checkActiveCellPassword(value.drmOptions.asc_getPassword())) {
|
me.api.asc_checkActiveCellPassword(value.drmOptions.asc_getPassword(), function(res) {
|
||||||
callback && setTimeout(function() {
|
if (res) {
|
||||||
callback.apply(scope, args);
|
callback && setTimeout(function() {
|
||||||
}, 1);
|
callback.apply(scope, args);
|
||||||
} else {
|
}, 1);
|
||||||
Common.UI.warning({
|
} else {
|
||||||
msg: me.errorWrongPassword,
|
Common.UI.warning({
|
||||||
callback: function() {
|
msg: me.errorWrongPassword,
|
||||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
callback: function() {
|
||||||
}
|
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||||
|
|
Loading…
Reference in a new issue