diff options
| author | hallgren <hallgren@chalmers.se> | 2011-08-03 15:21:38 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2011-08-03 15:21:38 +0000 |
| commit | ab8ec58e08d6766b5504a4116b8699ded17854bc (patch) | |
| tree | 589fb1809ccfa784050dee5b2996a06f85764ff1 /src/runtime/javascript/minibar/minibar.js | |
| parent | a0ec59ccdad4507c7ff63317d8aad70394f927e5 (diff) | |
minibar: improve pgf_online.js
pgf_online.js has been simplified and generalized to support the full
GF Web Service API. The changes are backwards incompatible, unfortunately.
The documentation and minibar.js have been updated accordingly.
Diffstat (limited to 'src/runtime/javascript/minibar/minibar.js')
| -rw-r--r-- | src/runtime/javascript/minibar/minibar.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/runtime/javascript/minibar/minibar.js b/src/runtime/javascript/minibar/minibar.js index 83cf7d5d1..8580037eb 100644 --- a/src/runtime/javascript/minibar/minibar.js +++ b/src/runtime/javascript/minibar/minibar.js @@ -157,7 +157,8 @@ Minibar.prototype.get_completions=function() { with(this) { //debug("get_completions "); words.innerHTML="..."; - server.complete(current.from,current.input,bind(show_completions,this)); + server.complete({from:current.from,input:current.input}, + bind(show_completions,this)); } } @@ -232,9 +233,11 @@ Minibar.prototype.get_translations=function() { with(this) { var c=current; if(options.show_grouped_translations) - server.translategroup(c.from,c.input,bind(show_groupedtranslations,this)); + server.translategroup({from:c.from,input:c.input}, + bind(show_groupedtranslations,this)); else - server.translate(c.from,c.input,bind(show_translations,this)); + server.translate({from:c.from,input:c.input}, + bind(show_translations,this)); } } @@ -291,9 +294,9 @@ Minibar.prototype.generate_random=function() { } function lin_random(abs) { - t.server.linearize(abs[0].tree,t.current.from,show_random); + t.server.linearize({tree:abs[0].tree,to:t.current.from},show_random); } - t.server.get_random(lin_random); + t.server.get_random({},lin_random); } Minibar.prototype.add_words=function(s) { |
