Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Public JavaScript methods

The public JavaScript events are placed on the RefinedWiki API namespace: RWA. This is divided into sub-namespaces based on functionality.

RWA.Category 

 hideUserCategory

/**

* Hides the user category link located in the category menu.

* Also removes all User category dropdowns

* @return void - no return value

 */

RWA.Category.hideUserCategory = function();

 hideInlineUserCategoryDialogs

/**

* Hides all inline user category inline dialogs. Note that this won't hide users associated with a top level

* category, only open dialogs refering to subcategories.

 */

RWA.Category.hideInlineUserCategoryDialogs = function();

 hideCategory

/**

* Hides any open category by closing the category dropdown and any open

* user category dialogs. This function will trigger a 

* 'rw-categories:category-dropdown-closed' event.

* @return the ID selector for the DOM element representing the closed 

* category. On the form rw_category_key_{categoryKey}

 */

RWA.Category.hideCategory = function();

 Click here to expand...

 Click here to expand...

 Click here to expand...

 Click here to expand...






RWA.Page



Events

Refined for Confluence provides various js events you can listen to. These are trigger on the AJS namespace and you can bind on them in the following way:


AJS.bind('rw-categories:category-opened', function(e, $el, category){

  // A collapsed category was just opened. Check if we should append our cool feature ...

});

Below you find a list of events available. You hook in on them using the same syntax as above.

rw-categories events






 

rw-page events

 






  • No labels