Wiki source code of Front-end Resources

Last modified by Marius Dumitru Florea on 2020/01/28

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
5 This section 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:
7 * External Libraries
8 * Internal components (based or not on some of the external libraries)
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.
12 Some of the resources presented in here are not included by default with all HTML-rendered wiki pages (it would be too much 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 the date picker, you can write, in [[XWiki Syntax 2.1>>platform:Main.XWikiSyntax]]:
14 {{code}}
15 {{velocity}}
16 $xwiki.jsfx.use('uicomponents/widgets/suggest/suggestPages.js')
17 {{/velocity}}
18 {{/code}}
20 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.
22 = External resources =
24 XWiki contains some third-party libraries bundled by default.
26 Hereunder is a table presenting some of the external libraries XWiki comes with:
28 |=Library Name|=Description
29 | JQuery| [[jQuery>>]] is //"a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript."//
30 | JQuery UI| [[jQuery UI>>]] is //"a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice."//
31 | Bootstrap| [[Bootstrap>>]] is //"the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.""// Bootstrap is bundled with XWiki mainly because the XWiki skin is based on it.
33 See [[Using jQuery and jQuery UI>>platform:DevGuide.UsingJQuery]] for an example of using jQuery and jQuery UI in an XWiki page, and more generally check [[how to integrate JavaScript Libraries in XWiki>>Documentation.DevGuide.FrontendResources.IntegratingJavaScriptLibraries.WebHome]].
35 = Internal resources =
37 == Front-end Components ==
39 * [[Pickers>>Documentation.DevGuide.FrontendResources.Pickers.WebHome]]
40 * [[Suggest Widget>>platform:DevGuide.AutoSuggestWidget]]
41 * [[Live Table>>platform:DevGuide.LiveTable]]
42 * [[XWiki Select>>platform:DevGuide.XWikiSelect]]
43 * [[HTML5 Upload>>platform:DevGuide.HTML5Upload]]
44 * [[Notification Widget>>platform:DevGuide.XWikiNotifications]]
46 * [[Autosave>>platform:DevGuide.Autosave]]
47 * [[Confirmation Box>>platform:DevGuide.ConfirmationBox]]
48 * [[Modal Popup>>platform:DevGuide.ModalPopup]]
49 * [[Table Sorter>>snippets:Extension.Table Sorter]]
51 == JavaScript resources ==
53 * [[platform:DevGuide.JavaScriptAPI]]
54 * [[XWiki RESTFul API>>platform:Features.XWikiRESTfulAPI]]
56 == StyleSheet resources ==
58 * [[Pagination>>platform:DevGuide.Pagination]]
59 * [[Result List>>platform:DevGuide.ListOfResults]]
60 * [[Special CSS Classes>>platform:DevGuide.SpecialCSSClasses]]
61 * [[CSS classes used for icons>>platform:DevGuide.StandardIconClasses]]
62 * Forms Layout Type:
63 ** [[Vertical Layout>>platform:DevGuide.VerticalForms]]
64 ** [[Inline Layout>>platform:DevGuide.InlineForms]]

Get Connected