Wiki source code of FrontendResources
Version 16.1 by Silvia Macovei on 2010/02/25
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
16.1 | 1 | = Front-end Resources = |
![]() |
1.1 | 2 | |
![]() |
16.1 | 3 | {{info}}This section is a work in progress.{{/info}} |
![]() |
4.1 | 4 | |
![]() |
6.1 | 5 | This sections aims to document all the front-end resources available in XWiki for application developers and for developers of the XWiki products. Front-end resources are of two main types: |
![]() |
16.1 | 6 | |
![]() |
6.1 | 7 | * External Libraries |
8 | * Internal components (Based or not on some of the external libraries) | ||
![]() |
5.1 | 9 | |
![]() |
6.1 | 10 | Front-end resources are mainly composed of JavaScript libraries, CSS stylesheets and their corresponding HTML reusable snippets (or velocity macro to output this snippet), and velocity macros. |
11 | |||
![]() |
16.1 | 12 | Some of the resources presented in here are not included by default with all HTML-rendered wiki pages (it would be a lot too much things to send to the client!), you have to request their inclusion from a skin template or from the wiki page itself using the ##jsfx## plugin. For example, to request the inclusion of scriptaculous slider library, you can write, in [[XWiki Syntax 1.0>>Main.XWikiSyntax]]: |
![]() |
11.1 | 13 | |
![]() |
16.1 | 14 | {{code}}$xwiki.jsfx.use("js/scriptaculous/slider.js"){{/code}} |
![]() |
11.1 | 15 | |
![]() |
16.1 | 16 | In [[XWiki Syntax 2.0>>Main.XWikiSyntax]]: |
![]() |
11.1 | 17 | |
![]() |
16.1 | 18 | {{code}} |
![]() |
11.1 | 19 | {{velocity}} |
20 | $xwiki.jsfx.use("js/scriptaculous/slider.js") | ||
21 | {{/velocity}} | ||
![]() |
16.1 | 22 | {{/code}} |
![]() |
11.1 | 23 | |
![]() |
16.1 | 24 | The path you indicate to the ##jsfx## plugin is the relative path where the library can be found under the ##resources## directory of the XWiki webapp. Similarly to the ##jsfx## plugin, there is a ##ssfx## plugin that can be used to request the inclusion of CSS stylesheets files. |
![]() |
11.1 | 25 | |
![]() |
16.1 | 26 | == External resources == |
![]() |
6.1 | 27 | |
![]() |
11.1 | 28 | External resources are third party libraries bundled with the XWiki webapp as resources developers can use for their in-wiki applications or to enhance the wiki itself. Almost all of the (except prototype.js) are not included by default in HTML-rendered wiki pages. |
29 | |||
30 | Hereunder is a table presenting some of the external libraries XWiki comes with: | ||
31 | |||
![]() |
16.1 | 32 | {{velocity filter="none"}} |
33 | {{html clean="false" wiki="true"}} | ||
![]() |
9.1 | 34 | <table> |
35 | <tbody> | ||
36 | <tr> | ||
![]() |
10.1 | 37 | <td width="50%"> |
![]() |
9.1 | 38 | <img src="$doc.getAttachmentURL('prototype.gif')" /><br /> |
![]() |
16.1 | 39 | [[Prototype>>http://prototypejs.org||target=_blank]] is a <em>"JavaScript framework that aims to ease development of web applications"</em>. It extends the JavaScript native objects and browser objects providing utilities for Ajax, OOP-style classes, and so much more. Prototype is the only JavaScript library that is systematically shipped with any wiki page in XWiki. |
![]() |
9.1 | 40 | </td> |
41 | <td> | ||
42 | <img src="$doc.getAttachmentURL('smartclient.png')" /><br /> | ||
![]() |
16.1 | 43 | [[Smartclient>>http://www.smartclient.com/]] is an AJAX RIA system to easily develop rich interface components. Using it in XWiki, you can build powerful front-end widgets that can leverage [[XWiki's RESTful API>>Features.XWikiRESTfulAPI]]. |
![]() |
9.1 | 44 | </td> |
45 | </tr> | ||
46 | </tbody> | ||
47 | </table> | ||
![]() |
16.1 | 48 | {{/html}} |
49 | {{/velocity}} | ||
![]() |
9.1 | 50 | |
![]() |
6.1 | 51 | * Scriptaculous |
![]() |
5.1 | 52 | * YUI |
53 | |||
![]() |
16.1 | 54 | == Internal resources == |
![]() |
1.1 | 55 | |
![]() |
16.1 | 56 | === Front-end Components === |
![]() |
12.2 | 57 | |
![]() |
16.1 | 58 | * [[Modal Popup>>ModalPopup]] |
59 | * [[Confirmation Box>>ConfirmationBox]] | ||
60 | * [[LiveTable]] | ||
61 | * [[Auto Suggest Widget>>DevGuide.AutoSuggestWidget]] | ||
![]() |
12.2 | 62 | |
![]() |
16.1 | 63 | === JavaScript resources === |
![]() |
11.2 | 64 | |
![]() |
16.1 | 65 | * [[JavaScriptAPI]] |
66 | * [[XWiki RESTFul API>>Features.XWikiRESTfulAPI]] | ||
![]() |
11.2 | 67 | |
![]() |
16.1 | 68 | === StyleSheet resources === |
![]() |
11.2 | 69 | |
![]() |
16.1 | 70 | * [[Pagination>>Pagination]] |
71 | * [[Result List>>ListOfResults]] | ||
72 | * [[Search Box>>SearchBox]] | ||
73 | * [[Suggest Box>>SuggestBox]] |