Added Sogou Pinyin input in Chrome.
This commit is contained in:
parent
fce84eef7a
commit
f05835e0c0
|
@ -306,6 +306,12 @@ define([
|
|||
Common.Utils.InternalSettings.set("de-settings-inputmode", value);
|
||||
this.api.SetTextBoxInputMode(value);
|
||||
|
||||
if (Common.Utils.isChrome) {
|
||||
value = Common.localStorage.getBool("de-settings-inputsogou");
|
||||
Common.Utils.InternalSettings.set("de-settings-inputsogou", value);
|
||||
window["AscInputMethod"]["SogouPinyin"] = value;
|
||||
}
|
||||
|
||||
/** coauthoring begin **/
|
||||
if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring) {
|
||||
var fast_coauth = Common.localStorage.getBool("de-settings-coauthmode", true);
|
||||
|
|
|
@ -809,6 +809,12 @@ define([
|
|||
Common.Utils.InternalSettings.set("de-settings-inputmode", value);
|
||||
me.api.SetTextBoxInputMode(value);
|
||||
|
||||
if (Common.Utils.isChrome) {
|
||||
value = Common.localStorage.getBool("de-settings-inputsogou");
|
||||
Common.Utils.InternalSettings.set("de-settings-inputsogou", value);
|
||||
window["AscInputMethod"]["SogouPinyin"] = value;
|
||||
}
|
||||
|
||||
/** coauthoring begin **/
|
||||
if (me.appOptions.isEdit && !me.appOptions.isOffline && me.appOptions.canCoAuthoring) {
|
||||
value = Common.localStorage.getItem("de-settings-coauthmode");
|
||||
|
|
|
@ -128,6 +128,10 @@ define([
|
|||
'<td class="left"><label><%= scope.txtInput %></label></td>',
|
||||
'<td class="right"><div id="fms-chb-input-mode"/></td>',
|
||||
'</tr>','<tr class="divider edit"></tr>',
|
||||
'<tr class="edit sogou">',
|
||||
'<td class="left"></td>',
|
||||
'<td class="right"><div id="fms-chb-input-sogou"/></td>',
|
||||
'</tr>','<tr class="divider edit"></tr>',
|
||||
'<tr class="edit">',
|
||||
'<td class="left"><label><%= scope.textAlignGuides %></label></td>',
|
||||
'<td class="right"><span id="fms-chb-align-guides" /></td>',
|
||||
|
@ -185,6 +189,11 @@ define([
|
|||
labelText: this.strInputMode
|
||||
});
|
||||
|
||||
this.chInputSogou = new Common.UI.CheckBox({
|
||||
el: $('#fms-chb-input-sogou'),
|
||||
labelText: this.strInputSogou
|
||||
});
|
||||
|
||||
/** coauthoring begin **/
|
||||
this.chLiveComment = new Common.UI.CheckBox({
|
||||
el: $('#fms-chb-live-comment'),
|
||||
|
@ -339,10 +348,13 @@ define([
|
|||
$('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide']();
|
||||
$('tr.comments', this.el)[mode.canCoAuthoring && mode.canComments ? 'show' : 'hide']();
|
||||
/** coauthoring end **/
|
||||
|
||||
$('tr.sogou', this.el)[mode.isEdit && Common.Utils.isChrome ?'show':'hide']();
|
||||
},
|
||||
|
||||
updateSettings: function() {
|
||||
this.chInputMode.setValue(Common.Utils.InternalSettings.get("de-settings-inputmode"));
|
||||
Common.Utils.isChrome && this.chInputSogou.setValue(Common.Utils.InternalSettings.get("de-settings-inputsogou"));
|
||||
|
||||
var value = Common.Utils.InternalSettings.get("de-settings-zoom");
|
||||
value = (value!==null) ? parseInt(value) : (this.mode.customization && this.mode.customization.zoom ? parseInt(this.mode.customization.zoom) : 100);
|
||||
|
@ -386,6 +398,7 @@ define([
|
|||
|
||||
applySettings: function() {
|
||||
Common.localStorage.setItem("de-settings-inputmode", this.chInputMode.isChecked() ? 1 : 0);
|
||||
Common.Utils.isChrome && Common.localStorage.setItem("de-settings-inputsogou", this.chInputSogou.isChecked() ? 1 : 0);
|
||||
Common.localStorage.setItem("de-settings-zoom", this.cmbZoom.getValue());
|
||||
Common.Utils.InternalSettings.set("de-settings-zoom", Common.localStorage.getItem("de-settings-zoom"));
|
||||
|
||||
|
@ -465,7 +478,8 @@ define([
|
|||
txtFitWidth: 'Fit to Width',
|
||||
textForceSave: 'Save to Server',
|
||||
strForcesave: 'Always save to server (otherwise save to server on document close)',
|
||||
strResolvedComment: 'Turn on display of the resolved comments'
|
||||
strResolvedComment: 'Turn on display of the resolved comments',
|
||||
strInputSogou: 'Turn on Sogou Pinyin input'
|
||||
}, DE.Views.FileMenuPanels.Settings || {}));
|
||||
|
||||
DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
||||
|
|
|
@ -1021,6 +1021,7 @@
|
|||
"DE.Views.FileMenuPanels.Settings.strFontRender": "Font Hinting",
|
||||
"DE.Views.FileMenuPanels.Settings.strForcesave": "Always save to server (otherwise save to server on document close)",
|
||||
"DE.Views.FileMenuPanels.Settings.strInputMode": "Turn on hieroglyphs",
|
||||
"DE.Views.FileMenuPanels.Settings.strInputSogou": "Turn on Sogou Pinyin input",
|
||||
"DE.Views.FileMenuPanels.Settings.strLiveComment": "Turn on display of the comments",
|
||||
"DE.Views.FileMenuPanels.Settings.strResolvedComment": "Turn on display of the resolved comments",
|
||||
"DE.Views.FileMenuPanels.Settings.strShowChanges": "Realtime Collaboration Changes",
|
||||
|
|
|
@ -244,6 +244,12 @@ define([
|
|||
Common.Utils.InternalSettings.set("pe-settings-inputmode", value);
|
||||
this.api.SetTextBoxInputMode(value);
|
||||
|
||||
if (Common.Utils.isChrome) {
|
||||
value = Common.localStorage.getBool("pe-settings-inputsogou");
|
||||
Common.Utils.InternalSettings.set("pe-settings-inputsogou", value);
|
||||
window["AscInputMethod"]["SogouPinyin"] = value;
|
||||
}
|
||||
|
||||
/** coauthoring begin **/
|
||||
if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring) {
|
||||
value = Common.localStorage.getBool("pe-settings-coauthmode", true);
|
||||
|
|
|
@ -603,6 +603,12 @@ define([
|
|||
Common.Utils.InternalSettings.set("pe-settings-inputmode", value);
|
||||
me.api.SetTextBoxInputMode(value);
|
||||
|
||||
if (Common.Utils.isChrome) {
|
||||
value = Common.localStorage.getBool("pe-settings-inputsogou");
|
||||
Common.Utils.InternalSettings.set("pe-settings-inputsogou", value);
|
||||
window["AscInputMethod"]["SogouPinyin"] = value;
|
||||
}
|
||||
|
||||
/** coauthoring begin **/
|
||||
if (me.appOptions.isEdit && !me.appOptions.isOffline && me.appOptions.canCoAuthoring) {
|
||||
value = Common.localStorage.getItem("pe-settings-coauthmode");
|
||||
|
|
|
@ -119,6 +119,10 @@ define([
|
|||
'<td class="left"><label><%= scope.txtInput %></label></td>',
|
||||
'<td class="right"><div id="fms-chb-input-mode"/></td>',
|
||||
'</tr>','<tr class="divider edit"></tr>',
|
||||
'<tr class="edit sogou">',
|
||||
'<td class="left"></td>',
|
||||
'<td class="right"><div id="fms-chb-input-sogou"/></td>',
|
||||
'</tr>','<tr class="divider edit"></tr>',
|
||||
'<tr class="edit">',
|
||||
'<td class="left"><label><%= scope.textAlignGuides %></label></td>',
|
||||
'<td class="right"><span id="fms-chb-align-guides" /></td>',
|
||||
|
@ -173,6 +177,11 @@ define([
|
|||
labelText: this.strInputMode
|
||||
});
|
||||
|
||||
this.chInputSogou = new Common.UI.CheckBox({
|
||||
el: $('#fms-chb-input-sogou'),
|
||||
labelText: this.strInputSogou
|
||||
});
|
||||
|
||||
this.cmbZoom = new Common.UI.ComboBox({
|
||||
el : $('#fms-cmb-zoom'),
|
||||
style : 'width: 160px;',
|
||||
|
@ -282,12 +291,15 @@ define([
|
|||
/** coauthoring begin **/
|
||||
$('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide']();
|
||||
/** coauthoring end **/
|
||||
|
||||
$('tr.sogou', this.el)[mode.isEdit && Common.Utils.isChrome ?'show':'hide']();
|
||||
},
|
||||
|
||||
updateSettings: function() {
|
||||
this.chSpell.setValue(Common.Utils.InternalSettings.get("pe-settings-spellcheck"));
|
||||
|
||||
this.chInputMode.setValue(Common.Utils.InternalSettings.get("pe-settings-inputmode"));
|
||||
Common.Utils.isChrome && this.chInputSogou.setValue(Common.Utils.InternalSettings.get("pe-settings-inputsogou"));
|
||||
|
||||
var value = Common.Utils.InternalSettings.get("pe-settings-zoom");
|
||||
value = (value!==null) ? parseInt(value) : (this.mode.customization && this.mode.customization.zoom ? parseInt(this.mode.customization.zoom) : -1);
|
||||
|
@ -319,6 +331,7 @@ define([
|
|||
applySettings: function() {
|
||||
Common.localStorage.setItem("pe-settings-spellcheck", this.chSpell.isChecked() ? 1 : 0);
|
||||
Common.localStorage.setItem("pe-settings-inputmode", this.chInputMode.isChecked() ? 1 : 0);
|
||||
Common.Utils.isChrome && Common.localStorage.setItem("pe-settings-inputsogou", this.chInputSogou.isChecked() ? 1 : 0);
|
||||
Common.localStorage.setItem("pe-settings-zoom", this.cmbZoom.getValue());
|
||||
Common.Utils.InternalSettings.set("pe-settings-zoom", Common.localStorage.getItem("pe-settings-zoom"));
|
||||
/** coauthoring begin **/
|
||||
|
@ -371,7 +384,8 @@ define([
|
|||
textForceSave: 'Save to Server',
|
||||
strForcesave: 'Always save to server (otherwise save to server on document close)',
|
||||
txtSpellCheck: 'Spell Checking',
|
||||
strSpellCheckMode: 'Turn on spell checking option'
|
||||
strSpellCheckMode: 'Turn on spell checking option',
|
||||
strInputSogou: 'Turn on Sogou Pinyin input'
|
||||
}, PE.Views.FileMenuPanels.Settings || {}));
|
||||
|
||||
PE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
||||
|
|
|
@ -867,6 +867,7 @@
|
|||
"PE.Views.FileMenuPanels.Settings.strFast": "Fast",
|
||||
"PE.Views.FileMenuPanels.Settings.strForcesave": "Always save to server (otherwise save to server on document close)",
|
||||
"PE.Views.FileMenuPanels.Settings.strInputMode": "Turn on hieroglyphs",
|
||||
"PE.Views.FileMenuPanels.Settings.strInputSogou": "Turn on Sogou Pinyin input",
|
||||
"PE.Views.FileMenuPanels.Settings.strShowChanges": "Realtime Collaboration Changes",
|
||||
"PE.Views.FileMenuPanels.Settings.strSpellCheckMode": "Turn on spell checking option",
|
||||
"PE.Views.FileMenuPanels.Settings.strStrict": "Strict",
|
||||
|
|
|
@ -270,6 +270,12 @@ define([
|
|||
Common.Utils.InternalSettings.set("sse-settings-fontrender", value);
|
||||
this.api.asc_setFontRenderingMode(parseInt(value));
|
||||
|
||||
if (Common.Utils.isChrome) {
|
||||
value = Common.localStorage.getBool("sse-settings-inputsogou");
|
||||
Common.Utils.InternalSettings.set("sse-settings-inputsogou", value);
|
||||
window["AscInputMethod"]["SogouPinyin"] = value;
|
||||
}
|
||||
|
||||
/** coauthoring begin **/
|
||||
value = Common.localStorage.getBool("sse-settings-livecomment", true);
|
||||
Common.Utils.InternalSettings.set("sse-settings-livecomment", value);
|
||||
|
|
|
@ -150,6 +150,12 @@ define([
|
|||
});
|
||||
this.api.asc_setFontRenderingMode(parseInt(value));
|
||||
|
||||
if (Common.Utils.isChrome) {
|
||||
value = Common.localStorage.getBool("sse-settings-inputsogou");
|
||||
Common.Utils.InternalSettings.set("sse-settings-inputsogou", value);
|
||||
window["AscInputMethod"]["SogouPinyin"] = value;
|
||||
}
|
||||
|
||||
this.api.asc_registerCallback('asc_onOpenDocumentProgress', _.bind(this.onOpenDocument, this));
|
||||
this.api.asc_registerCallback('asc_onEndAction', _.bind(this.onLongActionEnd, this));
|
||||
this.api.asc_registerCallback('asc_onError', _.bind(this.onError, this));
|
||||
|
|
|
@ -447,6 +447,10 @@ define([
|
|||
'<td class="left"></td>',
|
||||
'<td class="right"><div id="fms-chb-resolved-comment"/></td>',
|
||||
'</tr>','<tr class="divider comments"></tr>',
|
||||
'<tr class="edit sogou">',
|
||||
'<td class="left"><label><%= scope.txtInput %></label></td>',
|
||||
'<td class="right"><div id="fms-chb-input-sogou"/></td>',
|
||||
'</tr>','<tr class="divider edit"></tr>',
|
||||
'<tr class="autosave">',
|
||||
'<td class="left"><label id="fms-lbl-autosave"><%= scope.textAutoSave %></label></td>',
|
||||
'<td class="right"><span id="fms-chb-autosave" /></td>',
|
||||
|
@ -515,6 +519,11 @@ define([
|
|||
labelText: this.strResolvedComment
|
||||
});
|
||||
|
||||
this.chInputSogou = new Common.UI.CheckBox({
|
||||
el: $('#fms-chb-input-sogou'),
|
||||
labelText: this.strInputSogou
|
||||
});
|
||||
|
||||
this.cmbCoAuthMode = new Common.UI.ComboBox({
|
||||
el : $('#fms-cmb-coauth-mode'),
|
||||
style : 'width: 160px;',
|
||||
|
@ -679,6 +688,7 @@ define([
|
|||
$('tr.forcesave', this.el)[mode.canForcesave ? 'show' : 'hide']();
|
||||
$('tr.comments', this.el)[mode.canCoAuthoring && mode.canComments ? 'show' : 'hide']();
|
||||
$('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring? 'show' : 'hide']();
|
||||
$('tr.sogou', this.el)[mode.isEdit && Common.Utils.isChrome ?'show':'hide']();
|
||||
},
|
||||
|
||||
setApi: function(api) {
|
||||
|
@ -701,6 +711,8 @@ define([
|
|||
this.lblCoAuthMode.text(item ? item.get('descValue') : this.strCoAuthModeDescFast);
|
||||
/** coauthoring end **/
|
||||
|
||||
Common.Utils.isChrome && this.chInputSogou.setValue(Common.Utils.InternalSettings.get("sse-settings-inputsogou"));
|
||||
|
||||
value = Common.Utils.InternalSettings.get("sse-settings-fontrender");
|
||||
item = this.cmbFontRender.store.findWhere({value: parseInt(value)});
|
||||
this.cmbFontRender.setValue(item ? item.get('value') : (window.devicePixelRatio > 1 ? Asc.c_oAscFontRenderingModeType.noHinting : Asc.c_oAscFontRenderingModeType.hintingAndSubpixeling));
|
||||
|
@ -745,6 +757,7 @@ define([
|
|||
if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring)
|
||||
Common.localStorage.setItem("sse-settings-coauthmode", this.cmbCoAuthMode.getValue());
|
||||
/** coauthoring end **/
|
||||
Common.Utils.isChrome && Common.localStorage.setItem("sse-settings-inputsogou", this.chInputSogou.isChecked() ? 1 : 0);
|
||||
Common.localStorage.setItem("sse-settings-fontrender", this.cmbFontRender.getValue());
|
||||
Common.localStorage.setItem("sse-settings-unit", this.cmbUnit.getValue());
|
||||
Common.localStorage.setItem("sse-settings-autosave", this.chAutosave.isChecked() ? 1 : 0);
|
||||
|
@ -825,7 +838,9 @@ define([
|
|||
txtInch: 'Inch',
|
||||
textForceSave: 'Save to Server',
|
||||
strForcesave: 'Always save to server (otherwise save to server on document close)',
|
||||
strResolvedComment: 'Turn on display of the resolved comments'
|
||||
strResolvedComment: 'Turn on display of the resolved comments',
|
||||
txtInput: 'Alternate Input',
|
||||
strInputSogou: 'Turn on Sogou Pinyin input'
|
||||
}, SSE.Views.FileMenuPanels.MainSettingsGeneral || {}));
|
||||
|
||||
SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
||||
|
|
|
@ -1127,6 +1127,7 @@
|
|||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strForcesave": "Always save to server (otherwise save to server on document close)",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strFuncLocale": "Formula Language",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strFuncLocaleEx": "Example: SUM; MIN; MAX; COUNT",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strInputSogou": "Turn on Sogou Pinyin input",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strLiveComment": "Turn on display of the comments",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strRegSettings": "Regional Settings",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.strRegSettingsEx": "Example: ",
|
||||
|
@ -1147,6 +1148,7 @@
|
|||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtDe": "Deutsch",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtEn": "English",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtInch": "Inch",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtInput": "Alternate Input",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtLiveComment": "Commenting Display",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtMac": "as OS X",
|
||||
"SSE.Views.FileMenuPanels.MainSettingsGeneral.txtNative": "Native",
|
||||
|
|
Loading…
Reference in a new issue