[desktop] for bug 59316
This commit is contained in:
parent
eae06bd4c9
commit
659e7cec50
|
@ -67,7 +67,7 @@ define([
|
||||||
if (item) {
|
if (item) {
|
||||||
var panel = this.panels[item.options.action];
|
var panel = this.panels[item.options.action];
|
||||||
if (item.options.action === 'help') {
|
if (item.options.action === 'help') {
|
||||||
if ( panel.usedHelpCenter === true && navigator.onLine ) {
|
if ( panel.noHelpContents === true && navigator.onLine ) {
|
||||||
this.fireEvent('item:click', [this, 'external-help', true]);
|
this.fireEvent('item:click', [this, 'external-help', true]);
|
||||||
window.open(panel.urlHelpCenter, '_blank');
|
window.open(panel.urlHelpCenter, '_blank');
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -2113,7 +2113,7 @@ define([
|
||||||
} else {
|
} else {
|
||||||
if ( Common.Controllers.Desktop.isActive() ) {
|
if ( Common.Controllers.Desktop.isActive() ) {
|
||||||
if ( store.contentLang === '{{DEFAULT_LANG}}' || !Common.Controllers.Desktop.helpUrl() ) {
|
if ( store.contentLang === '{{DEFAULT_LANG}}' || !Common.Controllers.Desktop.helpUrl() ) {
|
||||||
me.usedHelpCenter = true;
|
me.noHelpContents = true;
|
||||||
me.iFrame.src = '../../common/main/resources/help/download.html';
|
me.iFrame.src = '../../common/main/resources/help/download.html';
|
||||||
} else {
|
} else {
|
||||||
store.contentLang = store.contentLang === lang ? '{{DEFAULT_LANG}}' : lang;
|
store.contentLang = store.contentLang === lang ? '{{DEFAULT_LANG}}' : lang;
|
||||||
|
|
|
@ -271,6 +271,7 @@ define([
|
||||||
this.showHistory();
|
this.showHistory();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'external-help': close_menu = true; break;
|
||||||
default: close_menu = false;
|
default: close_menu = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,13 @@ define([
|
||||||
var item = _.findWhere(this.items, {el: event.currentTarget});
|
var item = _.findWhere(this.items, {el: event.currentTarget});
|
||||||
if (item) {
|
if (item) {
|
||||||
var panel = this.panels[item.options.action];
|
var panel = this.panels[item.options.action];
|
||||||
|
if (item.options.action === 'help') {
|
||||||
|
if ( panel.noHelpContents === true && navigator.onLine ) {
|
||||||
|
this.fireEvent('item:click', [this, 'external-help', true]);
|
||||||
|
window.open(panel.urlHelpCenter, '_blank');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
this.fireEvent('item:click', [this, item.options.action, !!panel]);
|
this.fireEvent('item:click', [this, item.options.action, !!panel]);
|
||||||
|
|
||||||
if (panel) {
|
if (panel) {
|
||||||
|
|
|
@ -1505,6 +1505,7 @@ define([
|
||||||
this.menu = options.menu;
|
this.menu = options.menu;
|
||||||
this.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
|
this.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
|
||||||
this.openUrl = null;
|
this.openUrl = null;
|
||||||
|
this.urlHelpCenter = '{{HELP_CENTER_WEB_EDITORS}}';
|
||||||
|
|
||||||
this.en_data = [
|
this.en_data = [
|
||||||
{"src": "ProgramInterface/ProgramInterface.htm", "name": "Introducing Presentation Editor user interface", "headername": "Program Interface"},
|
{"src": "ProgramInterface/ProgramInterface.htm", "name": "Introducing Presentation Editor user interface", "headername": "Program Interface"},
|
||||||
|
@ -1610,9 +1611,10 @@ define([
|
||||||
store.fetch(config);
|
store.fetch(config);
|
||||||
} else {
|
} else {
|
||||||
if ( Common.Controllers.Desktop.isActive() ) {
|
if ( Common.Controllers.Desktop.isActive() ) {
|
||||||
if ( store.contentLang === '{{DEFAULT_LANG}}' || !Common.Controllers.Desktop.helpUrl() )
|
if ( store.contentLang === '{{DEFAULT_LANG}}' || !Common.Controllers.Desktop.helpUrl() ) {
|
||||||
|
me.noHelpContents = true;
|
||||||
me.iFrame.src = '../../common/main/resources/help/download.html';
|
me.iFrame.src = '../../common/main/resources/help/download.html';
|
||||||
else {
|
} else {
|
||||||
store.contentLang = store.contentLang === lang ? '{{DEFAULT_LANG}}' : lang;
|
store.contentLang = store.contentLang === lang ? '{{DEFAULT_LANG}}' : lang;
|
||||||
me.urlPref = Common.Controllers.Desktop.helpUrl() + '/' + store.contentLang + '/';
|
me.urlPref = Common.Controllers.Desktop.helpUrl() + '/' + store.contentLang + '/';
|
||||||
store.url = me.urlPref + 'Contents.json';
|
store.url = me.urlPref + 'Contents.json';
|
||||||
|
|
|
@ -314,6 +314,7 @@ define([
|
||||||
this.showHistory();
|
this.showHistory();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'external-help': close_menu = true; break;
|
||||||
default: close_menu = false;
|
default: close_menu = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,13 @@ define([
|
||||||
var item = _.findWhere(this.items, {el: event.currentTarget});
|
var item = _.findWhere(this.items, {el: event.currentTarget});
|
||||||
if (item) {
|
if (item) {
|
||||||
var panel = this.panels[item.options.action];
|
var panel = this.panels[item.options.action];
|
||||||
|
if (item.options.action === 'help') {
|
||||||
|
if ( panel.noHelpContents === true && navigator.onLine ) {
|
||||||
|
this.fireEvent('item:click', [this, 'external-help', true]);
|
||||||
|
window.open(panel.urlHelpCenter, '_blank');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
this.fireEvent('item:click', [this, item.options.action, !!panel]);
|
this.fireEvent('item:click', [this, item.options.action, !!panel]);
|
||||||
|
|
||||||
if (panel) {
|
if (panel) {
|
||||||
|
|
|
@ -1877,6 +1877,7 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
||||||
this.menu = options.menu;
|
this.menu = options.menu;
|
||||||
this.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
|
this.urlPref = 'resources/help/{{DEFAULT_LANG}}/';
|
||||||
this.openUrl = null;
|
this.openUrl = null;
|
||||||
|
this.urlHelpCenter = '{{HELP_CENTER_WEB_EDITORS}}';
|
||||||
|
|
||||||
this.en_data = [
|
this.en_data = [
|
||||||
{"src": "ProgramInterface/ProgramInterface.htm", "name": "Introducing Spreadsheet Editor user interface", "headername": "Program Interface"},
|
{"src": "ProgramInterface/ProgramInterface.htm", "name": "Introducing Spreadsheet Editor user interface", "headername": "Program Interface"},
|
||||||
|
@ -1984,9 +1985,10 @@ SSE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
||||||
store.fetch(config);
|
store.fetch(config);
|
||||||
} else {
|
} else {
|
||||||
if ( Common.Controllers.Desktop.isActive() ) {
|
if ( Common.Controllers.Desktop.isActive() ) {
|
||||||
if ( store.contentLang === '{{DEFAULT_LANG}}' || !Common.Controllers.Desktop.helpUrl() )
|
if ( store.contentLang === '{{DEFAULT_LANG}}' || !Common.Controllers.Desktop.helpUrl() ) {
|
||||||
|
me.noHelpContents = true;
|
||||||
me.iFrame.src = '../../common/main/resources/help/download.html';
|
me.iFrame.src = '../../common/main/resources/help/download.html';
|
||||||
else {
|
} else {
|
||||||
store.contentLang = store.contentLang === lang ? '{{DEFAULT_LANG}}' : lang;
|
store.contentLang = store.contentLang === lang ? '{{DEFAULT_LANG}}' : lang;
|
||||||
me.urlPref = Common.Controllers.Desktop.helpUrl() + '/' + store.contentLang + '/';
|
me.urlPref = Common.Controllers.Desktop.helpUrl() + '/' + store.contentLang + '/';
|
||||||
store.url = me.urlPref + 'Contents.json';
|
store.url = me.urlPref + 'Contents.json';
|
||||||
|
|
Loading…
Reference in a new issue