minibar: abstract syntax trees are now shown with or without category names

Function names are always shown.
This commit is contained in:
hallgren
2013-04-02 11:56:10 +00:00
parent e56bfe8811
commit 4e40fd5697
2 changed files with 15 additions and 15 deletions

View File

@@ -213,22 +213,22 @@ Translations.prototype.show_groupedtranslations=function(translationsResult) {
}
function tree_button(img_url) {
var imgs=[tree_icon,img_url+"&nofun=true",img_url]
var current=0;
function cycle() {
current++;
if(current>=imgs.length) current=0;
i.src=imgs[current]
}
var i=button_img(tree_icon,cycle);
return i
function tree_button(img_url,opt) {
var imgs=[tree_icon,img_url+(opt||"&nofun=true"),img_url]
var current=0;
function cycle() {
current++;
if(current>=imgs.length) current=0;
i.src=imgs[current]
}
var i=button_img(tree_icon,cycle);
return i
}
Translations.prototype.abstree_button=function(abs) {
var f=this.options.tree_img_format;
var img=this.server.current_grammar_url+"?command=abstrtree&format="+f+"&tree="+encodeURIComponent(abs)
var btn=tree_button(img);
var btn=tree_button(img,"&nocat=true");
btn.title="Click to display abstract syntax tree"
return btn
}