1
0
forked from GitHub/gf-core
Commit Graph

18 Commits

Author SHA1 Message Date
hallgren
ca16782d06 minibar support.js: add function ajax_http_post for posting FormData 2011-06-21 16:10:44 +00:00
hallgren
da740b51c2 minibar/support.js: recognize relative URLs as locations on the same server
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-01 14:47:20 +00:00
hallgren
fb807d307c minibar/support.js: fix comment typos and add links 2010-12-17 16:42:08 +00:00
hallgren
847561d2f6 minibar/support.js: add an errorcallback parameter to ajax_http_get 2010-12-09 16:38:16 +00:00
hallgren
3a432f80fe support.js: add function bind (JS OOP trick) 2010-12-01 16:20:28 +00:00
hallgren
48effe4922 support.js: two new functions: commonPrefix & insertFirst 2010-11-05 15:41:06 +00:00
hallgren
41edd0a84f support.js: some enhancements and new functions
+ 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-26 11:52:04 +00:00
hallgren
fa65026136 support.js: create buttons with access keys 2010-09-10 12:20:07 +00:00
hallgren
f5f8369d97 minibar: use AJAX instead of JSONP when possible
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-10 08:38:11 +00:00
hallgren
c662d116f6 Minibar: PGF server API: pass callback functions directly instead of passing function names as strings. 2010-09-05 18:06:45 +00:00
hallgren
1fd4ed7421 support.js: new function span_id, bug fix in function sort 2010-05-28 14:41:30 +00:00
hallgren
87cc4d7624 Merge phrasebook.js into minibar.js 2010-04-30 14:55:56 +00:00
hallgren
4fd94cc5c1 Some work on the Saldo game 2010-04-28 12:58:17 +00:00
hallgren
14a053a81b Some work on minibar:
1. Menu for choosing target language.
2. Pass options when calling start_minibar.
See about.html for more details.
2010-04-19 16:48:26 +00:00
hallgren
6e24b79dcd Code simplification 2010-04-15 15:41:30 +00:00
hallgren
603536a2f2 Omit redundant trailing "&" in jsonp url 2010-04-15 13:48:28 +00:00
hallgren
b3c8cf315a Some documentation 2010-04-09 14:04:18 +00:00
hallgren
df6ab55915 Adding the Minibar files to the darcs repository. 2010-04-09 13:51:34 +00:00