summaryrefslogtreecommitdiff
path: root/src/runtime/javascript/minibar/minibar.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-08-19minibar: bug fix for "Try Google Translate" buttonhallgren
2011-08-11minibar: documentation and API workhallgren
2011-08-11minibar: some functions were in the wrong filehallgren
2011-08-08minibar: refactoring for improved modularityhallgren
Two smaller objects have been factored out from the Minibar object: Input and Translations. These have been placed in two separate files: minibar_input.js and minibar_translations.js. Some common auxiliary functions have also been moved to a separate file: minibar_support.js
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-03-22minibar: don't force focus to the typed input field after every wordhallgren
On touch-based devices, the on-screen keyboard kept popping up after every word, which was very annoying if you were entering a sentence by tapping on the magnets.
2011-03-03minibar: add a button to display word alignmenthallgren
2011-03-01minibar: make the feedback form work in the generic minibarhallgren
It is still disabled by default, since some manual configuraiton of feedback.cgi is required.
2010-12-07minibar.js: restore start_miniabr function for backward compatibilityhallgren
2010-12-01minibar: rewrite minibar.js in a more idiomatic JS OOP stylehallgren
This provides easier access to minibar internals for people who want to extend it, but probably also reveals too much of the internal machinery...
2010-12-01Let minibar keep its own copy of tree-btn.pnghallgren
2010-11-17fixed some bugs in translation quizaarne
2010-11-09minibar.js: code simplificationhallgren
2010-10-28minibar.js: bug fix: when not using group translation, and a particular ↵hallgren
language is chosen in the To: menu, the translation would not be displayed
2010-10-28minibar.js: bug fix: the To: menu wasn't updated properly when switching ↵hallgren
grammars
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.)
2010-10-18minibar.js: show the type error messages that can occur for grammars with ↵hallgren
dependent types
2010-10-17minibar.js: add an option to enable/disable the Random buttonhallgren
2010-09-29minibar: work on adding back support for typing multiple words without ↵hallgren
pressing enter in between It mostly works now, but some minor issues still need to be fixed.
2010-09-14minibar.js: server API code cleanuphallgren
2010-09-14minibar.js: bug fix: the current word should be accepted when you press ↵hallgren
enter if it matches one of the possible completions exactly The current word is also accepted if there is only one remaining possible completion.
2010-09-14minibar.js: add access keys to some of the buttonshallgren
2010-09-10minibar: default input language is now the user's preferred language, if ↵hallgren
possible This is implemented using the userLanguage field in the grammar info output by pgf-server.
2010-09-10minibar: use AJAX instead of JSONP when possiblehallgren
Using AJAX instead of JSONP can give better caching in the browser, since the URL doesn't need to contain a (dynamically generated) callback function name. But because of the same origin policy in JavaScript, AJAX can only be used when the HTML file is served from the same server as the PGF. The new function http_get_json in support.js uses AJAX if this is the case, and falls back to JSONP otherwise.
2010-09-05Minibar: PGF server API: pass callback functions directly instead of passing ↵hallgren
function names as strings.
2010-08-27Adapt minibar.js to the current GF web service APIhallgren
Quick fix. More work needed for correct behaviour when multiple words are entered at once.
2010-07-13Add missing <td> tags in the HTML constructed by functio ↵hallgren
show_groupedtranslations
2010-07-13Bug fix in minibar.js: no translations where shown when using option ↵hallgren
show_grouped_translations: false This affected minibar.html but not phrasebook.html and was caused by accidental shadowing of function tr in function show_translations.
2010-07-13Make minibar.js work again after backwards incompatible changes to the data ↵hallgren
structures output by pgf-server. The canParse field was removed without notice.
2010-07-08FridgeApp and TranslateApp now show the type errorskrasimir
2010-07-06Access keys for input fields in minibar and feedback formhallgren
2010-06-02New minibar option: default_source_languagehallgren
2010-06-02Some minibar/phrasebook button and style changeshallgren
* Add help button at top of page. * Change style of word buttons to look like fridge magnets again. * New options to specify locations of other pages: feedback_url, help_url. If they are left undefined, no Help/Feedback buttons will be created. * Shorter test in Google Translate button.
2010-06-02Improved Goolge Translate buttonhallgren
2010-06-01Work on the feedback button for the minibarhallgren
2010-05-29Always show link to Google Translate, and open it in a new window.hallgren
2010-05-28Add link to Google Translatehallgren
2010-05-26Improved keyboard input handling in minibar/phrasebookhallgren
1. The text input field is shown form the start, no need to click. 2. The text input field is removed when no more words can be added to the sentence. 3. When you press Enter, a word is added to the sentence (1) if there is only one possible completion left (e.g. if you typed "airp" and the only completion is "airport"), or (2) if what you typed exactly matches one of the completions (e.g. if you typed "the" and the completions are "the", "theatre" and "these").
2010-05-26Use <input type=button ...> instead of <div ...> tags for the word magnets. ↵hallgren
This should make them clickable in more browsers and could improve layout.
2010-05-21hide the language code if translating to only one target languagehallgren
2010-04-30Merge phrasebook.js into minibar.jshallgren
2010-04-19Some work on minibar:hallgren
1. Menu for choosing target language. 2. Pass options when calling start_minibar. See about.html for more details.
2010-04-15Work in progress on keyboard input in minibarhallgren
2010-04-15Fix bug in get_grammarlist. Some code simplificaiton.hallgren
2010-04-09Abstract out grammar access methodhallgren
2010-04-09Adding the Minibar files to the darcs repository.hallgren