[DE] Added Sogou Pinyin input in Chrome.

This commit is contained in:
Julia Radzhabova 2017-10-05 17:51:15 +03:00
parent 229c47b8a0
commit a7e4628000
4 changed files with 23 additions and 1 deletions

View file

@ -299,6 +299,9 @@ define([
var value;
this.api.SetTextBoxInputMode(Common.localStorage.getBool("de-settings-inputmode"));
if (Common.Utils.isChrome)
window["AscInputMethod"]["SogouPinyin"] = Common.localStorage.getBool("de-settings-inputsogou");
/** coauthoring begin **/
if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring) {
var fast_coauth = Common.localStorage.getBool("de-settings-coauthmode", true);

View file

@ -800,6 +800,10 @@ define([
me.api.SetTextBoxInputMode(Common.localStorage.getBool("de-settings-inputmode"));
if (Common.Utils.isChrome) {
window["AscInputMethod"]["SogouPinyin"] = Common.localStorage.getBool("de-settings-inputsogou");
}
/** coauthoring begin **/
if (me.appOptions.isEdit && !me.appOptions.isOffline && me.appOptions.canCoAuthoring) {
value = Common.localStorage.getItem("de-settings-coauthmode");

View file

@ -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.localStorage.getBool("de-settings-inputmode"));
Common.Utils.isChrome && this.chInputSogou.setValue(Common.localStorage.getBool("de-settings-inputsogou"));
var value = Common.localStorage.getItem("de-settings-zoom");
value = (value!==null) ? parseInt(value) : (this.mode.customization && this.mode.customization.zoom ? parseInt(this.mode.customization.zoom) : 100);
@ -393,6 +405,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());
/** coauthoring begin **/
Common.localStorage.setItem("de-settings-livecomment", this.chLiveComment.isChecked() ? 1 : 0);
@ -470,7 +483,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({

View file

@ -994,6 +994,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",