| Age | Commit message (Collapse) | Author |
|
"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.
|
|
|
|
|
|
|
|
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
|
|
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.
|
|
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.
|
|
|
|
It is still disabled by default, since some manual configuraiton of
feedback.cgi is required.
|
|
|
|
This provides easier access to minibar internals for people who want to extend
it, but probably also reveals too much of the internal machinery...
|
|
|
|
|
|
|
|
language is chosen in the To: menu, the translation would not be displayed
|
|
grammars
|
|
* 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.)
|
|
dependent types
|
|
|
|
pressing enter in between
It mostly works now, but some minor issues still need to be fixed.
|
|
|
|
enter if it matches one of the possible completions exactly
The current word is also accepted if there is only one remaining possible
completion.
|
|
|
|
possible
This is implemented using the userLanguage field in the grammar info output by
pgf-server.
|
|
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.
|
|
function names as strings.
|
|
Quick fix. More work needed for correct behaviour when multiple words are
entered at once.
|
|
show_groupedtranslations
|
|
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.
|
|
structures output by pgf-server.
The canParse field was removed without notice.
|
|
|
|
|
|
|
|
* 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.
|
|
|
|
|
|
|
|
|
|
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").
|
|
This should make them clickable in more browsers and could improve layout.
|
|
|
|
|
|
1. Menu for choosing target language.
2. Pass options when calling start_minibar.
See about.html for more details.
|
|
|
|
|
|
|
|
|