From 44d1a5a9f71b03d9aceeccd760a63fcdc45f8bad Mon Sep 17 00:00:00 2001 From: hallgren Date: Wed, 12 Oct 2011 17:03:54 +0000 Subject: Improvements of "gf -server" mode and related setup "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. --- src/www/minibar/minibar_support.js | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/www/minibar/minibar_support.js (limited to 'src/www/minibar/minibar_support.js') diff --git a/src/www/minibar/minibar_support.js b/src/www/minibar/minibar_support.js new file mode 100644 index 000000000..a3fc078f7 --- /dev/null +++ b/src/www/minibar/minibar_support.js @@ -0,0 +1,46 @@ + +/* --- Auxiliary functions -------------------------------------------------- */ + +function langpart(conc,abs) { // langpart("FoodsEng","Foods") == "Eng" + return hasPrefix(conc,abs) ? conc.substr(abs.length) : conc; +} + +function update_language_menu(menu,grammar) { + // Replace the options in the menu with the languages in the grammar + var lang=grammar.languages; + menu.innerHTML=""; + + for(var i=0; i