I’ve tried to improve a bit 
http://platform.xwiki.org/xwiki/bin/view/DevGuide/FrontendResources but I’m 
sure I’ve forgotten some.

We also need to update that page to explain requirejs and the webjar mechanisms 
I think.

Thanks
-Vincent


On 12 Aug 2015 at 16:50:47, vinc...@massol.net 
(vinc...@massol.net(mailto:vinc...@massol.net)) wrote:

> Hi Bryn,
>  
> On 12 Aug 2015 at 12:09:56, Bryn Jeffries 
> (bryn.jeffr...@sydney.edu.au(mailto:bryn.jeffr...@sydney.edu.au)) wrote:
>  
> > Hi,
> >
> > I'm experimenting with including some jQuery UI elements into some wiki 
> > pages using XWiki 7.1. As a test, I've been trying to get the spinner 
> > example from http://api.jqueryui.com/spinner/ to work:
> >
> > I have constructed a minimal page, with content body:
> > {{velocity}}
> > {{html}}
> >  
>  
> > {{/html}}
> > {{/velocity}}
> >
> > And for the page I've added an objects of type XWiki.JavaScriptExtension 
> > containing code:
> > require(['jquery'], function($) {
> > $( "#spinner" ).spinner();
> > });
> >
> > However, viewing the page yields an error
> > TypeError: a(...).spinner is not a function
> > "require(["jquery"],function(a){a("#spinner").spinner()});"
> >
> > So it looks as though the spinner UI code is missing, so I'm guessing I 
> > need to include the jQuery UI library somehow. I'm a little confused 
> > because there is a jquery-ui-1.11.1.jar file in /usr/lib/xwiki/WEB-INF/lib/ 
> > which led me to believe that it was already bundled with XWiki.
> > http://platform.xwiki.org/xwiki/bin/view/DevGuide/FrontendResources says 
> > "Prototype is the only JavaScript library that is systematically shipped 
> > with any wiki page in XWiki." But it's a bit old.
> >
> > Any pointers?  
>  
> I’m far from a JS expert, but it seems your code is saying that it depends on 
> jquery but not on jquery-ui and https://api.jqueryui.com/spinner/ seems to 
> indicate that the spinner is located in jquery-ui…  
>  
> Try depending on jquery-ui maybe?  
>  
> Thanks  
> -Vincent
>  
> > Thanks,
> >
> > Bryn

_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to