summaryrefslogtreecommitdiff
path: root/src/runtime/javascript
AgeCommit message (Collapse)Author
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.
2010-09-05Minibar: PGF server API: pass callback functions directly instead of passing ↵hallgren
function names as strings.
2010-09-05minibar: fix broken link to brushed-metal backgroundhallgren
Solution: include a local copy of brushed-metal.png
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-02feedback list stylinghallgren
2010-06-02minibar feedback: save user_agent, simple feedback viewerhallgren
2010-06-02Feedback form for phrasebook/minibarhallgren
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-28updated documentationhallgren
2010-05-28Add link to Google Translatehallgren
2010-05-28Changes for publication of SALDO demo web appshallgren
Published at http://spraakbanken.gu.se/swe/forskning/saldo/ordspel
2010-05-28support.js: new function span_id, bug fix in function sorthallgren
2010-05-26Add meta tag to avoid horizontal scrolling in Mobile Safarihallgren
With thanks to codinggeekette, http://www.codinggeekette.com/post/Mobile-Safari-40-2b-Horizontal-Scrolling-3d-SUX.aspx
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-26Enable display of abstract syntax in minibarhallgren
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-26Change server to http://www.grammaticalframework.org:41296hallgren
2010-05-21hide the language code if translating to only one target languagehallgren
2010-05-21smaller input fieldhallgren
2010-05-07Amharic transliteration by Markosaarne
2010-04-30Merge phrasebook.js into minibar.jshallgren