Merge pull request #15 from ONLYOFFICE/feature/bugfix

Feature/bugfix
This commit is contained in:
Alexey Golubev 2017-10-13 17:41:40 +03:00 committed by GitHub
commit 896978e6a6
15 changed files with 98 additions and 18 deletions

View file

@ -299,6 +299,11 @@ define([
var value;
this.api.SetTextBoxInputMode(Common.localStorage.getBool("de-settings-inputmode"));
if (Common.Utils.isChrome) {
value = Common.localStorage.getBool("de-settings-inputsogou");
this.api.setInputParams({"SogouPinyin" : value});
}
/** 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,11 @@ define([
me.api.SetTextBoxInputMode(Common.localStorage.getBool("de-settings-inputmode"));
if (Common.Utils.isChrome) {
value = Common.localStorage.getBool("de-settings-inputsogou");
me.api.setInputParams({"SogouPinyin" : value});
}
/** coauthoring begin **/
if (me.appOptions.isEdit && !me.appOptions.isOffline && me.appOptions.canCoAuthoring) {
value = Common.localStorage.getItem("de-settings-coauthmode");
@ -1922,9 +1927,10 @@ define([
if (plugins) {
var arr = [], arrUI = [];
plugins.pluginsData.forEach(function(item){
if (uiCustomize!==undefined && _.find(arr, function(arritem) {
if (_.find(arr, function(arritem) {
return (arritem.get('baseUrl') == item.baseUrl || arritem.get('guid') == item.guid);
})) return;
}) || pluginStore.findWhere({baseUrl: item.baseUrl}) || pluginStore.findWhere({guid: item.guid}))
return;
var variationsArr = [],
pluginVisible = false;
@ -1971,7 +1977,7 @@ define([
this.UICustomizePlugins = arrUI;
if ( !uiCustomize ) {
if (pluginStore) pluginStore.reset(arr);
if (pluginStore) pluginStore.add(arr);
this.appOptions.canPlugins = !pluginStore.isEmpty();
}
} else if (!uiCustomize){

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 sogou"></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",

View file

@ -71,7 +71,7 @@ button.notify .btn-menu-comments {background-position: -0*@toolbar-icon-size -60
color: #6e4e00 !important;
white-space: nowrap;
line-height: 20px;
writing-mode: vertical-rl;
writing-mode: tb-rl;
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-webkit-transform: rotate(180deg);

View file

@ -240,6 +240,11 @@ define([
applySettings: function(menu) {
this.api.SetTextBoxInputMode(Common.localStorage.getBool("pe-settings-inputmode"));
if (Common.Utils.isChrome) {
value = Common.localStorage.getBool("pe-settings-inputsogou");
this.api.setInputParams({"SogouPinyin" : value});
}
/** coauthoring begin **/
if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring) {
this.api.asc_SetFastCollaborative(Common.localStorage.getBool("pe-settings-coauthmode", true));

View file

@ -598,6 +598,11 @@ define([
me.api.SetTextBoxInputMode(Common.localStorage.getBool("pe-settings-inputmode"));
if (Common.Utils.isChrome) {
value = Common.localStorage.getBool("pe-settings-inputsogou");
me.api.setInputParams({"SogouPinyin" : value});
}
/** coauthoring begin **/
if (me.appOptions.isEdit && !me.appOptions.isOffline && me.appOptions.canCoAuthoring) {
value = Common.localStorage.getItem("pe-settings-coauthmode");
@ -1691,9 +1696,10 @@ define([
if (plugins) {
var arr = [], arrUI = [];
plugins.pluginsData.forEach(function(item){
if (uiCustomize!==undefined && _.find(arr, function(arritem) {
if (_.find(arr, function(arritem) {
return (arritem.get('baseUrl') == item.baseUrl || arritem.get('guid') == item.guid);
})) return;
}) || pluginStore.findWhere({baseUrl: item.baseUrl}) || pluginStore.findWhere({guid: item.guid}))
return;
var variationsArr = [],
pluginVisible = false;
@ -1739,7 +1745,7 @@ define([
this.UICustomizePlugins = arrUI;
if ( !uiCustomize ) {
if (pluginStore) pluginStore.reset(arr);
if (pluginStore) pluginStore.add(arr);
this.appOptions.canPlugins = !pluginStore.isEmpty();
}
} else if (!uiCustomize){

View file

@ -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 sogou"></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.localStorage.getBool("pe-settings-spellcheck", true));
this.chInputMode.setValue(Common.localStorage.getBool("pe-settings-inputmode"));
Common.Utils.isChrome && this.chInputSogou.setValue(Common.localStorage.getBool("pe-settings-inputsogou"));
var value = Common.localStorage.getItem("pe-settings-zoom");
value = (value!==null) ? parseInt(value) : (this.mode.customization && this.mode.customization.zoom ? parseInt(this.mode.customization.zoom) : -1);
@ -326,6 +338,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());
/** coauthoring begin **/
if (this.mode.isEdit && !this.mode.isOffline && this.mode.canCoAuthoring) {
@ -376,7 +389,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({

View file

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

View file

@ -462,7 +462,7 @@
color: #6e4e00 !important;
white-space: nowrap;
line-height: @app-header-height;
writing-mode: vertical-rl;
writing-mode: tb-rl;
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-webkit-transform: rotate(180deg);

View file

@ -264,6 +264,11 @@ define([
applySettings: function(menu) {
this.api.asc_setFontRenderingMode(parseInt(Common.localStorage.getItem("sse-settings-fontrender")));
if (Common.Utils.isChrome) {
value = Common.localStorage.getBool("sse-settings-inputsogou");
this.api.setInputParams({"SogouPinyin" : value});
}
/** coauthoring begin **/
var value = Common.localStorage.getItem("sse-settings-livecomment");
var resolved = Common.localStorage.getItem("sse-settings-resolvedcomment");

View file

@ -149,6 +149,11 @@ define([
});
this.api.asc_setFontRenderingMode(parseInt(value));
if (Common.Utils.isChrome) {
value = Common.localStorage.getBool("sse-settings-inputsogou");
this.api.setInputParams({"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));
@ -1886,9 +1891,10 @@ define([
if (plugins) {
var arr = [], arrUI = [];
plugins.pluginsData.forEach(function(item){
if (uiCustomize!==undefined && _.find(arr, function(arritem) {
if (_.find(arr, function(arritem) {
return (arritem.get('baseUrl') == item.baseUrl || arritem.get('guid') == item.guid);
})) return;
}) || pluginStore.findWhere({baseUrl: item.baseUrl}) || pluginStore.findWhere({guid: item.guid}))
return;
var variationsArr = [],
pluginVisible = false;
@ -1934,7 +1940,7 @@ define([
this.UICustomizePlugins = arrUI;
if (!uiCustomize) {
if (pluginStore) pluginStore.reset(arr);
if (pluginStore) pluginStore.add(arr);
this.appOptions.canPlugins = !pluginStore.isEmpty();
}
} else if (!uiCustomize){

View file

@ -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 sogou"></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) {
@ -710,6 +720,8 @@ define([
/** coauthoring end **/
value = Common.localStorage.getItem("sse-settings-fontrender");
Common.Utils.isChrome && this.chInputSogou.setValue(Common.localStorage.getBool("sse-settings-inputsogou"));
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));
@ -758,6 +770,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);
@ -838,7 +851,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({

View file

@ -1100,6 +1100,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: ",
@ -1120,6 +1121,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",

View file

@ -531,7 +531,7 @@
color: #6e4e00 !important;
white-space: nowrap;
line-height: @app-header-height;
writing-mode: vertical-rl;
writing-mode: tb-rl;
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-webkit-transform: rotate(180deg);