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 <thiag...@gmail.com> wrote:

On Thu, 27 Nov 2014 09:35:36 -0200, Jan Fryblik <jan.fryb...@ebrothers.cz> 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").with(previewLinesCount);

and
define(["jquery", "t5/core/dom", "jquery/jquery.threedots.min"], function ($, dom) {
   return function (rowsCount) {
       $('.preview').ThreeDots({ max_rows: rowsCount });
   }
});

As Chris said, Tapestry 5.4 uses RequireJS, so you should write your JS modules as valid RequireJS (AMD) >modules, and your code doesn't look valid.

--Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br



--
S pozdravem



Mgr. Jan Fryblík
jednatel
+420 739 094 784
jan.fryb...@ebrothers.cz

eBrothers Software s.r.o. | www.ebrothers.cz

Reply via email to