DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:ajaxedit

This is an old revision of the document!


Ajaxedit Plugin

Compatible with DokuWiki

Weatherwax

plugin Framework for easy ajax editing

Last updated on
2013-10-24
Provides
Helper, Action
Repository
Source

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to rowmove

Tagged with ajax

Needed for datepicker, inlineedit, likeit, multiselect, rowmove, tagadd

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Examples/Usage

JavaScript Funktionen

/**
 * ajaxedit_send is a wrapper for jQuery's post function 
 * it automatically adds the current pageid, lastmod and the security token
 * 
 * @param string   plugin plugin name
 * @param int      idx_tag the id counter
 * @param function fcnSuccess callback function
 * @param hash     data additional data
 */
function ajaxedit_send(plugin,idx_tag,fcnSuccess,data)
 
/**
 * ajaxedit_parse is a simple function which parses the json response
 * 
 * @param json   data
 * @return mixed false if there is no data/ the response
 */
function ajaxedit_parse(data)
 
/**
 * ajaxedit_checkResponse checks if the server error flag is set and displays a jQuery Dialog, with the Message
 * 
 * @param  hash    response the parsed @see ajaxedit_parse server response 
 * @return boolean false on error
 */
function ajaxedit_checkResponse(response)

PHP Funktionen

/**
 * error throw an error and leave
 * @param string $msg 
 * @param integer $type error type 
 * @param boolean $exit leave or not
 **/
function error($msg,$type=self::ERROR_OTHER,$exit = true)
 
/**
 * getWikiPage returns the raw wiki data
 * @return string
 */
function getWikiPage()
 
/**
 * success sends the success message
 * automatically sends error,msg,lastmod,index(id counter) 
 *
 * @param array $data additional data
 */
function success($data=array())
 
/**
 * saveWikiPage saves the wiki page
 * 
 * @param string $data wiki page
 * @param string $summary
 * @param boolean $minor 
 * @param array $param will go to @see success
 * @param boolean $autosubmit if set will call success
 */
function saveWikiPage($data,$summary,$minor = false,$param=array(),$autosubmit=true)

Configuration and Settings

no configuration needed, yet.

Development

Change Log

  • 2013-10-24
    • Initial release

Known Bugs and Issues

ToDo/Wish List

  • More languages
  • queue scheduler

FAQ

This is only a helper/framework plugin

Discussion

plugin/ajaxedit.1382625700.txt.gz · Last modified: 2013-10-24 16:41 by 212.185.31.9