Re: requireJS modules in T5 library

2014-11-27 Thread Jan Fryblik
Thank you both for answers, I've made adjustments and now it works and looks fine. Great! On Thu, 27 Nov 2014 18:06:20 +0100, Thiago H de Paula Figueiredo wrote: On Thu, 27 Nov 2014 09:35:36 -0200, Jan Fryblik wrote: Hello guys, Hi! scriptSupport.require("LastArticle").invoke

Re: requireJS modules in T5 library

2014-11-27 Thread Thiago H de Paula Figueiredo
On Thu, 27 Nov 2014 09:35:36 -0200, Jan Fryblik wrote: Hello guys, Hi! scriptSupport.require("LastArticle").invoke("init").with(previewLinesCount); I'm not sure why people want to use .invoke() for simple initializations like this. I'd do just: scriptSupport.require("LastArticle").w

Re: requireJS modules in T5 library

2014-11-27 Thread Geoff Callender
Your module is not returning anything and init is invisible outside the module's function. After the init function add this... return { init : init }; The rest looks fine, assuming that you've checked that threedots is AMD compliant. if it isn't then you'

requireJS modules in T5 library

2014-11-27 Thread Jan Fryblik
Hello guys, I'm fighting a bit with RequireJS modules. So... I have Tapestry library 'cms' with 'LastArticle' component. So I have simple RequireJS module in resources/META-INF/modules/cms folder with following code define(["jquery", "t5/core/dom", "jquery/jquery.threedots.min"], function