minibar: adding a start category menu

+ The start category menu can be turned off by passing the option
  {startcat_menu:false} when starting the minibar.
+ Documentation updates.
This commit is contained in:
hallgren
2011-10-18 15:21:49 +00:00
parent d63724ed50
commit 26b8df5cf5
4 changed files with 32 additions and 8 deletions

View File

@@ -38,8 +38,9 @@ Translations.prototype.clear=function() {
this.main.innerHTML="";
}
Translations.prototype.translateFrom=function(current) {
Translations.prototype.translateFrom=function(current,startcat) {
this.current=current;
this.startcat=startcat;
this.get_translations();
}
@@ -47,10 +48,10 @@ Translations.prototype.get_translations=function() {
with(this) {
var c=current;
if(options.show_grouped_translations)
server.translategroup({from:c.from,input:c.input},
server.translategroup({from:c.from,input:c.input,cat:startcat},
bind(show_groupedtranslations,this));
else
server.translate({from:c.from,input:c.input},
server.translate({from:c.from,input:c.input,cat:startcat},
bind(show_translations,this));
}
}