summaryrefslogtreecommitdiff
path: root/src/runtime/javascript/minibar/support.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-06-21minibar support.js: add function ajax_http_post for posting FormDatahallgren
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.
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-01support.js: add function bind (JS OOP trick)hallgren
2010-11-05support.js: two new functions: commonPrefix & insertFirsthallgren
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-09-10support.js: create buttons with access keyshallgren
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-05-28support.js: new function span_id, bug fix in function sorthallgren
2010-04-30Merge phrasebook.js into minibar.jshallgren
2010-04-28Some work on the Saldo gamehallgren
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-15Code simplificationhallgren
2010-04-15Omit redundant trailing "&" in jsonp urlhallgren
2010-04-09Some documentationhallgren
2010-04-09Adding the Minibar files to the darcs repository.hallgren