Tuesday, August 20, 2013

Some dynamic editing for annotations

There are words like "water" that have plenty of translations at OmegaWiki. Each translation might have annotations (part of speech, gender, pronunciation, etc.) that can be directly viewed from the page "water" without having to click the translation and open a new page. This is not new.

What is new is that if you click on edit on such a page with a huge list of translation, it will load in an acceptable time and will not crash your browser.

The reason is that the annotations for the translations are not loaded on page load anymore, but only when the user clicks on "show/hide". It only loads what you need.

You can also now edit the annotations directly from the annotation panel itself, without editing and saving the entire page. This is Ajax magic :)

A few screenshots to explain the situation:

The annotation panel is loaded only when you click on "show". There are no annotations yet... Click "edit" to add some.

Here adding IPA, gender and part of speech. There are buttons for "save" and "cancel" on top and bottom of the annotation panel.
After clicking save, the annotations appear.