Thanks Eduard, you are the best!
Regards,
Danilo
2014-08-14 5:34 GMT-03:00 Eduard Moraru <enygma2002(a)gmail.com>om>:
On Thu, Aug 14, 2014 at 1:56 AM, Danilo Oliveira <
daniloa.oliveira(a)gmail.com
wrote:
Thanks for the suggestions!
Yes Eduard, I was using the require method.
I tested the lightbox and modal component however I could handle the
modal
necessity with the colorbox ( I found it very
beautiful and
customizable) (
http://www.jacklmoore.com/colorbox/).
Now I am been challenge by other problem... The extension is set to be
used
"always", however sometime between
pages refreshes and navifation the
colorbox does not load, so the user get "colourbox undefined error. How
can I solve it? I need to guarantee that the js is loaded before the user
to start to use the application.
You can use webjars [1] to draw your dependencies and then use require JS
to make sure they are all loaded before your code starts using them.
I notice that jquer-colorbox is available [2] as a webjar.
Hope this helps,
Eduard
----------
[1]
http://extensions.xwiki.org/xwiki/bin/view/Extension/WebJars+Integration
[2]
http://maven-repository.com/artifact/org.webjars/jquery-colorbox/
Thanks!
Danilo
2014-08-13 16:43 GMT-03:00 Jeremie BOUSQUET <jeremie.bousquet(a)gmail.com
:
> Well, it displays html from url you provide, so if the latter contains
an
> iframe, it will show it.
> But I don't know if it uses an iframe to display this html...
>
> Le 13 août 2014 21:11, "Danilo Oliveira"
<daniloa.oliveira(a)gmail.com>
a
écrit :
>
> Thanks guys,
>
> Jeremie, this lightbox supports iframe content?
>
> thanks!
>
>
> 2014-08-13 13:15 GMT-03:00 Jeremie BOUSQUET <
jeremie.bousquet(a)gmail.com
>:
>
> > Hi,
> >
> > Personnally I use a bit everywhere:
> >
> > #set($ok = $xwiki.jsfx.use("/js/xwiki/lightbox/lightbox.js", true))
> > #set($ok = $xwiki.ssfx.use("js/xwiki/lightbox/lightbox.css", true))
> >
> > Then from javascript:
> >
> > window.lb = new Lightbox(createurl,saveurl,redirecturl);
> >
> > It creates a modal popup showing content from "createurl", and
buttons
> to
> > > save/cancel and redirect appropriately. A sample of use can be
found
in
> > > page XWiki.AdminUsersSheet, that's the modal used to add a user or
a
group
> > from admin section.
> > ... but I only ever used it with colibri and never with bootstrap,
and
I
> don't know how "official" it
is. Until 5.3 at least, that "works".
> I find this lightbox very useful.
>
> BR,
> Jeremie
>
>
>
> 2014-08-13 10:11 GMT+02:00 Eduard Moraru <enygma2002(a)gmail.com>om>:
>
> > Hi Danilo,
> >
> > Perhaps you forgot to do this
> >
> >
>
http://platform.xwiki.org/xwiki/bin/view/DevGuide/JavaScriptAPI#HRequireJSa…
> > > > > when working with jQuery in XWiki?
> > > > >
> > > > > Thanks,
> > > > > Eduard
> > > > >
> > > > >
> > > > > On Wed, Aug 13, 2014 at 10:58 AM, Ecaterina Moraru (Valica)
<
> > > > > valicac(a)gmail.com> wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > >
http://platform.xwiki.org/xwiki/bin/view/DevGuide/ModalPopup
> > > > > >
> > > > > > Thanks,
> > > > > > Caty
> > > > > >
> > > > > >
> > > > > > On Wed, Aug 13, 2014 at 2:55 AM, Danilo Oliveira <
> > > > > > daniloa.oliveira(a)gmail.com
> > > > > >
wrote:
>
> > > > >
> > > > > > > Hello Devs,
> > > > > > >
> > > > > > > I am developing an application with bootstrap and
XWiki 6.1,
> > however
> > > > as
> > > > > > you
> > > > > > > mentioned before, the bootstrap is not in production
yet.
> > > > > > >
> > > > > > > The jquery+bootstrap is having a very unstable
behavior,
after
some
> > > > interaction of the user with
the application trying to open a
modal,
> > the
> > > > xwiki returns the errors:
> > > > "Uncaught TypeError: undefined is not a function" or
> > > > "TypeError: $ is not a function
> > > > <
> > > >
> > >
> >
>
http://stackoverflow.com/questions/12343714/typeerror-is-not-a-function-whe…
> >
> > > >"
> > > > > (firebug points to: the line 98 on the javascript.vm:"
return
> > > > > $.noConflict();")
> > > > >
> > > > > So I decided to back to colibri, but I did not fine how to
create
a
> > popup
> > > > like modal bootstrap. Is there a way?
> > > >
> > > > Thanks.
> > > > --
> > > > Danilo Amaral de Oliveira
> > > > Engenheiro de Computação
> > > > celular (32) 9111 - 6867
> > > > _______________________________________________
> > > > devs mailing list
> > > > devs(a)xwiki.org
> > > >
http://lists.xwiki.org/mailman/listinfo/devs
> > > >
> > > _______________________________________________
> > > devs mailing list
> > > devs(a)xwiki.org
> > >
http://lists.xwiki.org/mailman/listinfo/devs
> > >
> > _______________________________________________
> > devs mailing list
> > devs(a)xwiki.org
> >
http://lists.xwiki.org/mailman/listinfo/devs
> >
> _______________________________________________
> devs mailing list
> devs(a)xwiki.org
>
http://lists.xwiki.org/mailman/listinfo/devs
>
--
Danilo Amaral de Oliveira
Engenheiro de Computação
celular (32) 9111 - 6867
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Danilo Amaral de Oliveira
Engenheiro de Computação
celular (32) 9111 - 6867
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Danilo Amaral de Oliveira
Engenheiro de Computação
celular (32) 9111 - 6867