summaryrefslogtreecommitdiff
path: root/src/runtime/javascript/minibar/pgf_online.js
AgeCommit message (Collapse)Author
2011-10-12Improvements of "gf -server" mode and related setuphallgren
"gf -server" mode now contains everything needed to run the minibar and the grammar editor (including example-based grammar writing). The Setup.hs script installs the required files where gf -server can find them. These files have been moved to a new directory: src/www. The separate server program pgf-http is now obsolete.
2011-10-10minibar/support.js: added function encodeArgs.hallgren
2011-08-03minibar: improve pgf_online.jshallgren
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.
2011-08-03minibar: small code and documentation tweakshallgren
2010-11-09pgf_online.js: if a grammar list is supplied, you don't have to call ↵hallgren
switch_grammar.
2010-10-26minibar: restructured code and improved user interfacehallgren
* Keyboard input and completion should now work much more smoothly: + When you press space, the current word will be completed (if incomplete) and a new magnet will be created. If there is more than one possible completion, no magnet is created, but the common prefix of the possible completions is added to the text box. + Instead of asking the server for possible completions every time a new letter is added to the curent word, minibar only ask for completions for whole words and then filters the list locally when more letters are entered, speeding things up when server responses are slow. * Code restructuring: + The PGF server API has been moved to its own file: pgf_online.js. This allows it to be reused in other applicaitons without importing the entire minibar. It also allows minibar to be used with different server interfaces. + The minibar code has been rewritten to avoid storing state information in the document tree and accessing it by referring to named document elements. The code now also avoids using string literals contaning the names of top-level functions to specify event handlers for buttons and menus. (The code is no longer introspective, so alpha conversion will not change its meaning.)