summaryrefslogtreecommitdiff
path: root/src/runtime/javascript
AgeCommit message (Collapse)Author
2011-08-09minibar: more documentation (in minibar-api.html)hallgren
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-08minibar: resolve conflicthallgren
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
2011-08-08minibar: recording old configuration changeshallgren
2011-07-21GenIP, GenRP in Extra and any_Quant in ExtraEngaarne
2011-06-21minibar support.js: add function ajax_http_post for posting FormDatahallgren
2011-04-11minibar: fix typohallgren
2011-04-11minibar: small documentation updates and correctionshallgren
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-22minibar: add trailing slash in suggested grammar URLshallgren
2011-03-03minibar: add icon for word alignment buttonhallgren
2011-03-03minibar: add a button to display word alignmenthallgren
2011-03-01minibar/support.js: recognize relative URLs as locations on the same serverhallgren
This means that the relative grammar directory location in the default configuration will result in AJAX requests rather than the less efficient JSONP requests.
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.
2011-01-27minibar: a small change to make easy to select an alternate grammar directoryhallgren
2011-01-11minibar: update my home page link (cs->cse)hallgren
2010-12-17minibar.html: omit explicit grammars_url optionhallgren
The grammars will then by default be fetched from the same server as minibar.html. This means that everything will be served locally when accessing minibar through a locally running pgf-http.
2010-12-17minibar/support.js: fix comment typos and add linkshallgren
2010-12-09minibar/support.js: add an errorcallback parameter to ajax_http_gethallgren
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-12-01support.js: add function bind (JS OOP trick)hallgren
2010-11-28minibar/about.html: minor adjustmentshallgren
2010-11-23minibar/about.html: document recent developmenthallgren
2010-11-17fixed some bugs in translation quizaarne
2010-11-09Some pgf-server API documentationhallgren
2010-11-09pgf_online.js: if a grammar list is supplied, you don't have to call ↵hallgren
switch_grammar.
2010-11-09minibar.js: code simplificationhallgren
2010-11-05support.js: two new functions: commonPrefix & insertFirsthallgren
2010-10-25trying to find some inefficiencies in Finnish resourceaarne
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-26support.js: some enhancements and new functionshallgren
+ ajax_http_get(url,callback) now checks the HTTP response status and shows an error message if the status is not OK (is not 200) + New function node(tag,attrs,children) to create document nodes with arbitraty attributes and children. The functions node() and text() should now be enough to construct arbitrary document trees in an easy, functional way, and many of the more specialized functions could be removed. + When calling the function button(label,action,key), the action can be a function instead of a string, so you can use local/anonymous functions. + New function debug(str) adds text to the element with id=debug, if it exists.
2010-10-23minibar.html: add a <noscript> element with a note that the page doesn't ↵hallgren
work unless JavaScript is enabled
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-28minibar: update about.html with description of recent changeshallgren
2010-09-24minibar/about.html: fix typos and formattinghallgren
2010-09-24minibar.html: specify charset, move initializationhallgren
Added a meta tag to specify that the file is in UTF-8. This makes the browser (at least Firefox) assume that the JavaScript files are also in UTF-8, it seems. Moved the call to start_minibar() from the <body onload="..."> to the end of the file. The onload action is not executed until all images in the document has been loaded, while javascipt at the end of the file is executed as soon as the HTML file has been loaded. (Calling start_minibar() from the head of the document would be too soon, since it refers to elements in the body, which hasn't been loaded yet.)
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-10support.js: create buttons with access keyshallgren
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.