RGL Browser: mostly cosmetic improvements

This commit is contained in:
john.j.camilleri
2013-07-24 15:03:48 +00:00
parent 68226a2354
commit 206f8db3e8
5 changed files with 6237 additions and 50 deletions

View File

@@ -148,15 +148,17 @@ function Thing() {
t.initModules(lang);
}
// obj can be just a plain selector or a jQuery object
this.showPanel = function(obj, callback){
// hash should be "#code"
this.showPanel = function(hash, callback){
t.showLoading();
setTimeout(function(){
$(".panel:visible").hide();
$(obj).show(0, callback);
$("a.tab").removeClass('active');
$("a.tab[href='"+hash+"']").addClass('active');
$(hash).show(0, callback);
t.updateScopeCount();
t.hideLoading();
}, 500); // this ensures the loading displays
}, 200); // this ensures the loading displays
}
this.getPanel = function() {
return $('.panel:visible').first();
@@ -176,7 +178,7 @@ function Thing() {
t.showPanel(panel);
return false;
});
t.showPanel(".panel:first");
t.showPanel("#scope");
// Load the index file and populate language & module lists
$.ajax({
@@ -313,33 +315,34 @@ function Thing() {
// Which modules do we include for API?
this.apiModules = [
// api
"Constructors",
"Syntax",
"Constructors", "Cat", "Structural", "Combinators",
// abstract
"Adjective",
"Adverb",
"Backward",
"Cat",
"Common",
"Compatibility",
"Conjunction",
"Extra",
"Grammar",
"Idiom",
"Lang",
"Lexicon",
"Noun",
"Numeral",
"NumeralTransfer",
"Phrase",
"Question",
"Relative",
"Sentence",
"Structural",
"Symbol",
"Tense",
"Text",
"Transfer",
"Verb",
// "Adjective",
// "Adverb",
// "Backward",
// "Cat",
// "Common",
// "Compatibility",
// "Conjunction",
// "Extra",
// "Grammar",
// "Idiom",
// "Lang",
// "Lexicon",
// "Noun",
// "Numeral",
// "NumeralTransfer",
// "Phrase",
// "Question",
// "Relative",
// "Sentence",
// "Structural",
// "Symbol",
// "Tense",
// "Text",
// "Transfer",
// "Verb",
];
this.initAPI = function() {
t.showLoading();