Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding auto ajax preview to editing #40

Closed

Commits on Apr 25, 2011

  1. Make ajax_lock return JSON instead of plain text

    In preparation of the ajax auto-preview, we make the return value
    of the ajax_lock method a JSON hash/array, so it can return more
    than one named value.
    
    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    87dd194 View commit details
    Browse the repository at this point in the history
  2. Using JSON result in locktimer.refreshed

    As the ajax_lock now returns a JSON result, it needs to be
    parsed and evaluated.
    
    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    cf43482 View commit details
    Browse the repository at this point in the history
  3. Add id preview__area to preview div

    The preview div, needs to be selectable via JavaScript. It is now
    accessable via the id 'preview__area'.
    
    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    281a840 View commit details
    Browse the repository at this point in the history
  4. Change locktimer event from 'keypress' to 'keyup'

    If showing a preview, it seems more sensible to use the 'keyup'
    JavaScript event instead of 'keypress', because then the last
    entered letter is included in the text send to the server.
    We checked http://www.quirksmode.org/dom/events/index.html for
    browser compatibility.
    
    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    34ccbb2 View commit details
    Browse the repository at this point in the history
  5. Add an option 'autopreview'.

    To be able do enable (and disable) the automatic
    rendering of the Preview via AJAX, we introduce an option
    in dokuwiki.php which defaults to off (0).
    
    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    b0c4ab0 View commit details
    Browse the repository at this point in the history
  6. Always show preview area if 'autopreview' is on

    Because the AJAX request needs space to render the preview,
    the preview area div is shown - if 'autopreview' is enabled -
    in the 'edit' and the 'recover' action.
    
    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    ef50ed3 View commit details
    Browse the repository at this point in the history
  7. Do not scroll to preview area on edit or recover

    Because the 'scroll__here' was added to the output, the page did automatically
    jump to the preview, even if edit was clicked. This behaviour is now turned
    of by an additional parameter of html_show(...).
    
    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    671498d View commit details
    Browse the repository at this point in the history
  8. Adding preview HTML to the JSON result

    Adding the rendered wikitext as xhtml to the JSON result
    of ajax_lock() to be able to render the preview.
    
    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    78f1331 View commit details
    Browse the repository at this point in the history
  9. Show preview automatically

    Render the preview from the JSON result, if present.
    So on key up, a live preview of the actual edited wikitext is shown.
    
    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    ebe7deb View commit details
    Browse the repository at this point in the history
  10. Added datetime as preview status to JSON result.

    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    f3cae88 View commit details
    Browse the repository at this point in the history
  11. Add div for display of preview status (datetime)

    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    b0b8784 View commit details
    Browse the repository at this point in the history
  12. Added style for preview update status div

    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    ae5c7c3 View commit details
    Browse the repository at this point in the history
  13. Display of preview status (datetime) in locktimer

    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    587885f View commit details
    Browse the repository at this point in the history
  14. Adding configuration metadata for auto-preview.

    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    b654df1 View commit details
    Browse the repository at this point in the history
  15. Auto preview configuration localization for English

    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    460df56 View commit details
    Browse the repository at this point in the history
  16. Auto preview configuration localization for German and Polish

    Signed-off-by: Johannes Thönes <johannes.thoenes@googlemail.com>
    Lukasz Burdzanowski and Johannes Thönes authored and Johannes Thönes committed Apr 25, 2011
    Configuration menu
    Copy the full SHA
    e927d6a View commit details
    Browse the repository at this point in the history