commit
a3e7dbab24
|
@ -105,4 +105,5 @@ li {
|
|||
&.zh, &.zh-CN {background-position: -32px -180px;}
|
||||
&.ja, &.ja-JP {background-position: 0 -192px;}
|
||||
&.es-MX {background-position: -16px -192px;}
|
||||
&.zh-TW {background-position: -32px -192px;}
|
||||
}
|
||||
|
|
|
@ -116,12 +116,10 @@ define([
|
|||
onProtectDocClick: function(state) {
|
||||
this.view.btnProtectDoc.toggle(!state, true);
|
||||
if (state) {
|
||||
var me = this,
|
||||
btn,
|
||||
win = new DE.Views.ProtectDialog({
|
||||
var me = this;
|
||||
me._docProtectDlg = new DE.Views.ProtectDialog({
|
||||
props: me.appConfig,
|
||||
handler: function(result, value, props) {
|
||||
btn = result;
|
||||
if (result == 'ok') {
|
||||
var protection = me.api.asc_getDocumentProtection() || new AscCommonWord.CDocProtect();
|
||||
protection.asc_setEditType(props);
|
||||
|
@ -131,14 +129,12 @@ define([
|
|||
Common.NotificationCenter.trigger('edit:complete');
|
||||
}
|
||||
}).on('close', function() {
|
||||
if (btn!=='ok')
|
||||
me.view.btnProtectDoc.toggle(false, true);
|
||||
me._docProtectDlg = undefined;
|
||||
});
|
||||
|
||||
win.show();
|
||||
me._docProtectDlg.show();
|
||||
} else {
|
||||
var me = this,
|
||||
btn,
|
||||
props = me.api.asc_getDocumentProtection();
|
||||
if (props && props.asc_getIsPassword()) {
|
||||
var win = new Common.Views.OpenDialog({
|
||||
|
@ -149,7 +145,6 @@ define([
|
|||
validatePwd: false,
|
||||
maxPasswordLength: 15,
|
||||
handler: function (result, value) {
|
||||
btn = result;
|
||||
if (result == 'ok') {
|
||||
if (me.api) {
|
||||
props.asc_setEditType(Asc.c_oAscEDocProtect.None);
|
||||
|
@ -160,8 +155,6 @@ define([
|
|||
}
|
||||
}
|
||||
}).on('close', function() {
|
||||
if (btn!=='ok')
|
||||
me.view.btnProtectDoc.toggle(true, true);
|
||||
});
|
||||
|
||||
win.show();
|
||||
|
@ -208,6 +201,8 @@ define([
|
|||
}
|
||||
|
||||
props && this.applyRestrictions(props.type);
|
||||
if (this._docProtectDlg && this._docProtectDlg.isVisible())
|
||||
this._docProtectDlg.SetDisabled(!!this._state.lockDocProtect || isProtected);
|
||||
Common.NotificationCenter.trigger('protect:doclock', props);
|
||||
},
|
||||
|
||||
|
@ -246,7 +241,11 @@ define([
|
|||
},
|
||||
|
||||
onLockDocumentProtection: function(state) {
|
||||
this._state.lockDocProtect = state;
|
||||
this.view && Common.Utils.lockControls(Common.enumLock.protectLock, state, {array: [this.view.btnProtectDoc]});
|
||||
if (this._docProtectDlg && this._docProtectDlg.isVisible())
|
||||
this._docProtectDlg.SetDisabled(state || this._state.docProtection && (this._state.docProtection.isReadOnly || this._state.docProtection.isFormsOnly ||
|
||||
this._state.docProtection.isCommentsOnly || this._state.docProtection.isReviewOnly));
|
||||
}
|
||||
|
||||
}, DE.Controllers.DocProtection || {}));
|
||||
|
|
|
@ -205,7 +205,7 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template',
|
|||
// date picker
|
||||
var data = [{ value: 0x042C }, { value: 0x0402 }, { value: 0x0405 }, { value: 0x0C07 }, { value: 0x0407 }, {value: 0x0807}, { value: 0x0408 }, { value: 0x0C09 }, { value: 0x0809 }, { value: 0x0409 }, { value: 0x0C0A }, { value: 0x080A },
|
||||
{ value: 0x040B }, { value: 0x040C }, { value: 0x100C }, { value: 0x0410 }, { value: 0x0810 }, { value: 0x0411 }, { value: 0x0412 }, { value: 0x0426 }, { value: 0x040E }, { value: 0x0413 }, { value: 0x0415 }, { value: 0x0416 },
|
||||
{ value: 0x0816 }, { value: 0x0419 }, { value: 0x041B }, { value: 0x0424 }, { value: 0x081D }, { value: 0x041D }, { value: 0x041F }, { value: 0x0422 }, { value: 0x042A }, { value: 0x0804 }];
|
||||
{ value: 0x0816 }, { value: 0x0419 }, { value: 0x041B }, { value: 0x0424 }, { value: 0x081D }, { value: 0x041D }, { value: 0x041F }, { value: 0x0422 }, { value: 0x042A }, { value: 0x0804 }, { value: 0x0404 }];
|
||||
data.forEach(function(item) {
|
||||
var langinfo = Common.util.LanguageInfo.getLocalLanguageName(item.value);
|
||||
item.displayValue = langinfo[1];
|
||||
|
|
|
@ -90,7 +90,7 @@ define([
|
|||
|
||||
var data = [{ value: 0x042C }, { value: 0x0402 }, { value: 0x0405 }, { value: 0x0C07 }, { value: 0x0407 }, {value: 0x0807}, { value: 0x0408 }, { value: 0x0C09 }, { value: 0x0809 }, { value: 0x0409 }, { value: 0x0C0A }, { value: 0x080A },
|
||||
{ value: 0x040B }, { value: 0x040C }, { value: 0x100C }, { value: 0x0410 }, { value: 0x0810 }, { value: 0x0411 }, { value: 0x0412 }, { value: 0x0426 }, { value: 0x040E }, { value: 0x0413 }, { value: 0x0415 }, { value: 0x0416 },
|
||||
{ value: 0x0816 }, { value: 0x0419 }, { value: 0x041B }, { value: 0x0424 }, { value: 0x081D }, { value: 0x041D }, { value: 0x041F }, { value: 0x0422 }, { value: 0x042A }, { value: 0x0804 }];
|
||||
{ value: 0x0816 }, { value: 0x0419 }, { value: 0x041B }, { value: 0x0424 }, { value: 0x081D }, { value: 0x041D }, { value: 0x041F }, { value: 0x0422 }, { value: 0x042A }, { value: 0x0804 }, { value: 0x0404 }];
|
||||
data.forEach(function(item) {
|
||||
var langinfo = Common.util.LanguageInfo.getLocalLanguageName(item.value);
|
||||
item.displayValue = langinfo[1];
|
||||
|
|
|
@ -146,6 +146,10 @@ define([
|
|||
value: Asc.c_oAscEDocProtect.Comments
|
||||
});
|
||||
|
||||
this.btnOk = new Common.UI.Button({
|
||||
el: this.$window.find('.primary')
|
||||
});
|
||||
|
||||
this.afterRender();
|
||||
},
|
||||
|
||||
|
@ -171,8 +175,11 @@ define([
|
|||
},
|
||||
|
||||
_handleInput: function(state) {
|
||||
if (state === 'ok' && this.btnOk.isDisabled())
|
||||
return;
|
||||
|
||||
if (this.handler) {
|
||||
if (state == 'ok') {
|
||||
if (state === 'ok') {
|
||||
if (this.inputPwd.checkValidate() !== true) {
|
||||
this.inputPwd.focus();
|
||||
return;
|
||||
|
@ -208,6 +215,10 @@ define([
|
|||
return Asc.c_oAscEDocProtect.Comments;
|
||||
},
|
||||
|
||||
SetDisabled: function(disabled) {
|
||||
this.btnOk.setDisabled(disabled);
|
||||
},
|
||||
|
||||
txtPassword : "Password",
|
||||
txtRepeat: 'Repeat password',
|
||||
txtOptional: 'optional',
|
||||
|
|
|
@ -223,6 +223,8 @@ define([
|
|||
me.api.asc_registerCallback('asc_onTrackGuide', _.bind(me.onTrackGuide, me));
|
||||
me.api.asc_registerCallback('asc_onShowMathTrack', _.bind(me.onShowMathTrack, me));
|
||||
me.api.asc_registerCallback('asc_onHideMathTrack', _.bind(me.onHideMathTrack, me));
|
||||
me.api.asc_registerCallback('asc_onLockViewProps', _.bind(me.onLockViewProps, me, true));
|
||||
me.api.asc_registerCallback('asc_onUnLockViewProps', _.bind(me.onLockViewProps, me, false));
|
||||
}
|
||||
me.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(me.onCoAuthoringDisconnect, me));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(me.onCoAuthoringDisconnect, me));
|
||||
|
@ -2396,6 +2398,10 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onLockViewProps: function(lock) {
|
||||
this.documentHolder && (this.documentHolder._state.viewPropsLock = lock);
|
||||
},
|
||||
|
||||
SetDisabled: function(state) {
|
||||
this._isDisabled = state;
|
||||
this.documentHolder.SetDisabled(state);
|
||||
|
|
|
@ -61,7 +61,8 @@ define([
|
|||
this._state = {
|
||||
zoom_type: undefined,
|
||||
zoom_percent: undefined,
|
||||
unitsChanged: true
|
||||
unitsChanged: true,
|
||||
lock_viewProps: false
|
||||
};
|
||||
Common.NotificationCenter.on('uitheme:changed', this.onThemeChanged.bind(this));
|
||||
Common.NotificationCenter.on('document:ready', _.bind(this.onDocumentReady, this));
|
||||
|
@ -75,6 +76,8 @@ define([
|
|||
this.api.asc_registerCallback('asc_onNotesShow', _.bind(this.onNotesShow, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||
this.api.asc_registerCallback('asc_onLockViewProps', _.bind(this.onLockViewProps, this, true));
|
||||
this.api.asc_registerCallback('asc_onUnLockViewProps', _.bind(this.onLockViewProps, this, false));
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
@ -254,7 +257,10 @@ define([
|
|||
|
||||
onGuidesAfterShow: function() {
|
||||
if (this.view) {
|
||||
this.view.btnGuides.menu.items[6].setDisabled(!this.api.asc_canClearGuides());
|
||||
this.view.btnGuides.menu.items[2].setDisabled(this._state.lock_viewProps); // add v guides
|
||||
this.view.btnGuides.menu.items[3].setDisabled(this._state.lock_viewProps); // add h guides
|
||||
this.view.btnGuides.menu.items[6].setDisabled(this._state.lock_viewProps || !this.api.asc_canClearGuides()); // clear guides
|
||||
|
||||
this.view.btnGuides.menu.items[0].setChecked(this.api.asc_getShowGuides(), true);
|
||||
this.view.btnGuides.menu.items[5].setChecked(this.api.asc_getShowSmartGuides(), true);
|
||||
}
|
||||
|
@ -350,7 +356,20 @@ define([
|
|||
item.setChecked(true);
|
||||
else
|
||||
item.setChecked(false);
|
||||
item.setDisabled(this._state.lock_viewProps);
|
||||
}
|
||||
menu.items[1].setDisabled(this._state.lock_viewProps); // snap to grid
|
||||
menu.items[items.length-1].setDisabled(this._state.lock_viewProps); // custom
|
||||
}
|
||||
},
|
||||
|
||||
onLockViewProps: function(lock) {
|
||||
this._state.lock_viewProps = lock;
|
||||
if (this.view) {
|
||||
if (this.view.btnGridlines && (typeof this.view.btnGridlines.menu === 'object') && this.view.btnGridlines.menu.isVisible())
|
||||
this.onGridlinesAfterShow();
|
||||
if (this.view.btnGuides && (typeof this.view.btnGuides.menu === 'object') && this.view.btnGuides.menu.isVisible())
|
||||
this.onGuidesAfterShow();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ define([
|
|||
|
||||
var data = [{ value: 0x042C }, { value: 0x0402 }, { value: 0x0405 }, { value: 0x0C07 }, { value: 0x0407 }, {value: 0x0807}, { value: 0x0408 }, { value: 0x0C09 }, { value: 0x0809 }, { value: 0x0409 }, { value: 0x0C0A }, { value: 0x080A },
|
||||
{ value: 0x040B }, { value: 0x040C }, { value: 0x100C }, { value: 0x0410 }, { value: 0x0810 }, { value: 0x0411 }, { value: 0x0412 }, { value: 0x0426 }, { value: 0x040E }, { value: 0x0413 }, { value: 0x0415 }, { value: 0x0416 },
|
||||
{ value: 0x0816 }, { value: 0x0419 }, { value: 0x041B }, { value: 0x0424 }, { value: 0x081D }, { value: 0x041D }, { value: 0x041F }, { value: 0x0422 }, { value: 0x042A }, { value: 0x0804 }];
|
||||
{ value: 0x0816 }, { value: 0x0419 }, { value: 0x041B }, { value: 0x0424 }, { value: 0x081D }, { value: 0x041D }, { value: 0x041F }, { value: 0x0422 }, { value: 0x042A }, { value: 0x0804 }, { value: 0x0404 }];
|
||||
data.forEach(function(item) {
|
||||
var langinfo = Common.util.LanguageInfo.getLocalLanguageName(item.value);
|
||||
item.displayValue = langinfo[1];
|
||||
|
|
|
@ -1033,7 +1033,11 @@ define([
|
|||
me.mnuGuides.menu.items[4].setVisible(!!value.guideId);
|
||||
me.mnuGuides.menu.items[4].options.guideId = value.guideId;
|
||||
me.mnuGuides.menu.items[6].setChecked(me.api.asc_getShowSmartGuides(), true);
|
||||
me.mnuGuides.menu.items[7].setDisabled(!me.api.asc_canClearGuides());
|
||||
|
||||
me.mnuGuides.menu.items[2].setDisabled(me._state.viewPropsLock);
|
||||
me.mnuGuides.menu.items[3].setDisabled(me._state.viewPropsLock);
|
||||
me.mnuGuides.menu.items[4].setDisabled(me._state.viewPropsLock);
|
||||
me.mnuGuides.menu.items[7].setDisabled(me._state.viewPropsLock || !me.api.asc_canClearGuides());
|
||||
|
||||
me.mnuGridlines.menu.items[0].setChecked(me.api.asc_getShowGridlines(), true);
|
||||
me.mnuGridlines.menu.items[1].setChecked(me.api.asc_getSnapToGrid(), true);
|
||||
|
@ -1066,7 +1070,10 @@ define([
|
|||
item.setChecked(true);
|
||||
else
|
||||
item.setChecked(false);
|
||||
item.setDisabled(me._state.viewPropsLock);
|
||||
}
|
||||
me.mnuGridlines.menu.items[1].setDisabled(me._state.viewPropsLock);
|
||||
me.mnuGridlines.menu.items[items.length-1].setDisabled(me._state.viewPropsLock);
|
||||
me.mnuRulers.setChecked(!Common.Utils.InternalSettings.get("pe-hidden-rulers"));
|
||||
}
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ define(['text!presentationeditor/main/app/template/HeaderFooterDialog.template',
|
|||
|
||||
var data = [{ value: 0x042C }, { value: 0x0402 }, { value: 0x0405 }, { value: 0x0C07 }, { value: 0x0407 }, {value: 0x0807}, { value: 0x0408 }, { value: 0x0C09 }, { value: 0x0809 }, { value: 0x0409 }, { value: 0x0C0A }, { value: 0x080A },
|
||||
{ value: 0x040B }, { value: 0x040C }, { value: 0x100C }, { value: 0x0410 }, { value: 0x0810 }, { value: 0x0411 }, { value: 0x0412 }, { value: 0x0426 }, { value: 0x040E }, { value: 0x0413 }, { value: 0x0415 }, { value: 0x0416 },
|
||||
{ value: 0x0816 }, { value: 0x0419 }, { value: 0x041B }, { value: 0x0424 }, { value: 0x081D }, { value: 0x041D }, { value: 0x041F }, { value: 0x0422 }, { value: 0x042A }, { value: 0x0804 }];
|
||||
{ value: 0x0816 }, { value: 0x0419 }, { value: 0x041B }, { value: 0x0424 }, { value: 0x081D }, { value: 0x041D }, { value: 0x041F }, { value: 0x0422 }, { value: 0x042A }, { value: 0x0804 }, { value: 0x0404 }];
|
||||
data.forEach(function(item) {
|
||||
var langinfo = Common.util.LanguageInfo.getLocalLanguageName(item.value);
|
||||
item.displayValue = langinfo[1];
|
||||
|
|
|
@ -529,7 +529,7 @@ define([
|
|||
|
||||
var regdata = [{ value: 0x042C }, { value: 0x0402 }, { value: 0x0405 }, { value: 0x0C07 }, { value: 0x0407 }, {value: 0x0807}, { value: 0x0408 }, { value: 0x0C09 }, { value: 0x0809 }, { value: 0x0409 }, { value: 0x0C0A }, { value: 0x080A },
|
||||
{ value: 0x040B }, { value: 0x040C }, { value: 0x100C }, { value: 0x0410 }, { value: 0x0810 }, { value: 0x0411 }, { value: 0x0412 }, { value: 0x0426 }, { value: 0x040E }, { value: 0x0413 }, { value: 0x0415 }, { value: 0x0416 },
|
||||
{ value: 0x0816 }, { value: 0x0419 }, { value: 0x041B }, { value: 0x0424 }, { value: 0x081D }, { value: 0x041D }, { value: 0x041F }, { value: 0x0422 }, { value: 0x042A }, { value: 0x0804 }];
|
||||
{ value: 0x0816 }, { value: 0x0419 }, { value: 0x041B }, { value: 0x0424 }, { value: 0x081D }, { value: 0x041D }, { value: 0x041F }, { value: 0x0422 }, { value: 0x042A }, { value: 0x0804 }, { value: 0x0404 }];
|
||||
regdata.forEach(function(item) {
|
||||
var langinfo = Common.util.LanguageInfo.getLocalLanguageName(item.value);
|
||||
item.displayValue = langinfo[1];
|
||||
|
|
|
@ -102,7 +102,9 @@ define([ 'text!spreadsheeteditor/main/app/template/WatchDialog.template',
|
|||
tabindex: 1
|
||||
});
|
||||
this.watchList.on('item:select', _.bind(this.onSelectWatch, this))
|
||||
.on('item:keydown', _.bind(this.onKeyDown, this));
|
||||
.on('item:keydown', _.bind(this.onKeyDown, this))
|
||||
.on('item:dblclick', _.bind(this.onDblClickWatch, this))
|
||||
.on('entervalue', _.bind(this.onEnterValue, this));
|
||||
|
||||
this.btnAdd = new Common.UI.Button({
|
||||
el: $('#watch-dialog-btn-add', this.$window)
|
||||
|
@ -253,6 +255,15 @@ define([ 'text!spreadsheeteditor/main/app/template/WatchDialog.template',
|
|||
this.updateButtons();
|
||||
},
|
||||
|
||||
onDblClickWatch: function(lisvView, itemView, record) {
|
||||
record && this.api.asc_findCell('\'' + record.get('sheet') + '\'' + '!' + record.get('cell'));
|
||||
},
|
||||
|
||||
onEnterValue: function(lisvView, record) {
|
||||
if (this.watchList.store.length===0) return;
|
||||
record && this.api.asc_findCell('\'' + record.get('sheet') + '\'' + '!' + record.get('cell'));
|
||||
},
|
||||
|
||||
onKeyDown: function (lisvView, record, e) {
|
||||
if (e.keyCode==Common.UI.Keys.DELETE && !this.btnDelete.isDisabled()) {
|
||||
this._fromKeyDown = true;
|
||||
|
|
|
@ -64,7 +64,7 @@ export class storeApplicationSettings {
|
|||
const regDataCode = [
|
||||
{ value: 0x042C }, { value: 0x0402 }, { value: 0x0405 }, { value: 0x0C07 }, { value: 0x0407 }, {value: 0x0807}, { value: 0x0408 }, { value: 0x0C09 }, { value: 0x0809 }, { value: 0x0409 }, { value: 0x0C0A }, { value: 0x080A },
|
||||
{ value: 0x040B }, { value: 0x040C }, { value: 0x100C }, { value: 0x0410 }, { value: 0x0810 }, { value: 0x0411 }, { value: 0x0412 }, { value: 0x0426 }, { value: 0x040E }, { value: 0x0413 }, { value: 0x0415 }, { value: 0x0416 },
|
||||
{ value: 0x0816 }, { value: 0x0419 }, { value: 0x041B }, { value: 0x0424 }, { value: 0x081D }, { value: 0x041D }, { value: 0x041F }, { value: 0x0422 }, { value: 0x042A }, { value: 0x0804 }
|
||||
{ value: 0x0816 }, { value: 0x0419 }, { value: 0x041B }, { value: 0x0424 }, { value: 0x081D }, { value: 0x041D }, { value: 0x041F }, { value: 0x0422 }, { value: 0x042A }, { value: 0x0804 }, { value: 0x0404 }
|
||||
];
|
||||
|
||||
return regDataCode;
|
||||
|
|
Loading…
Reference in a new issue