Skip to content

Commit 5a9a700

Browse files
committed
general help section
1 parent 5e11089 commit 5a9a700

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

clients/web/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
language: _ei_data.language,
124124
outlineapp: _ei_data.outlineapp,
125125
outlineserver: _ei_data.outlineserver,
126+
generalHelp: _ei_data.generalHelp
126127
});
127128
});
128129
</script>

clients/web/js/easyinterface.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ window.EasyInterface = (function() {
5858
this.initCodeAreaWidget();
5959
this.initFileManagerWidget();
6060
this.initParametersWidget();
61-
this.initHelpWidget();
61+
this.initHelpWidget(options.generalHelp);
6262
// this.initGeneralSetting();
6363
this.initConsoleWidget();
6464
this.initToolSelectorWidget();
@@ -221,7 +221,8 @@ window.EasyInterface = (function() {
221221

222222
//
223223
initHelpWidget:
224-
function() {
224+
function(generalHelp) {
225+
225226
var self = this;
226227
this.helps = new Helps(this.helpsHolder, {});
227228

@@ -246,7 +247,10 @@ window.EasyInterface = (function() {
246247
}
247248
}
248249
});
249-
250+
if(generalHelp){
251+
var general = $.parseXML(generalHelp);
252+
this.helps.addSection("General Help", "generalhelp",$(general).find("apphelp"));
253+
}
250254
},
251255

252256
//

clients/web/js/helps.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ window.Helps = (function() {
55
var helpsId = 0;
66

77
function Helps(place,options) {
8-
98
helpsId++;
109

1110
this.helpId = "OPTS-"+helpsId;
@@ -28,7 +27,7 @@ window.Helps = (function() {
2827

2928
//
3029
setOptions:
31-
function() {
30+
function(options) {
3231
},
3332

3433
//
@@ -43,6 +42,7 @@ window.Helps = (function() {
4342
active: 0,
4443
icons: { header: "ui-icon-circle-arrow-e", activeHeader: "ui-icon-circle-arrow-s" }
4544
});
45+
4646
},
4747

4848
//
@@ -63,7 +63,6 @@ window.Helps = (function() {
6363

6464
this.sectionInfoById[sectionId] = sectionInfo;
6565
this.secId++;
66-
6766
if ( XML && XML.length > 0 ) this.addHelpFromXML(sectionId,XML);
6867

6968

@@ -75,10 +74,12 @@ window.Helps = (function() {
7574
var sectionInfo = this.sectionInfoById[sectionId];
7675
var outclass = help.attr( _ei.outlang.syntax.outclass ) || "info";
7776
var contentXML = help.find("> "+_ei.outlang.syntax.content);
77+
7878
if (contentXML.length ==0){
7979
help.append($("<content format='text'>No Help</content>"));
8080
contentXML = help.find("> "+_ei.outlang.syntax.content);
8181
}
82+
8283
var content = new DocContent({
8384
content: contentXML,
8485
outclass: outclass

clients/web/webclient.default.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"outlineapp": "coutline",
33
"title": "Easy Interface",
4-
"language":"text/x-csrc"
4+
"language":"text/x-csrc",
5+
"generalHelp":"<apphelp> <content format='html'>No general info.</content> </apphelp>"
56
}

0 commit comments

Comments
 (0)