From mymir.org at googlemail.com Wed Sep 3 20:27:32 2008 From: mymir.org at googlemail.com (Vladislav Vorobiev) Date: Wed, 3 Sep 2008 20:27:32 +0200 Subject: [Kss-devel] attach text on existing text in input tag Message-ID: <604c02230809031127k4071388k11d44f60bba5896@mail.gmail.com> Hello, There are insertHTMLAsLastChild to insert html to existing html. I need to attach text on existing text in input tag, value. Becose there are no setAttributeAsLastChild or something I tried to construct something like this: .greenActive:click{ evt-click-preventdefault: true; evt-click-allowbubbling: true; action-client: setAttribute; setAttribute-kssSelector: htmlid(ps); setAttribute-name: value; setAttribute-value: nodeContent() + ' ' + formVar(search, ps); } Exception... "'KssParsingError: Error parsing KSS at http://pfadfinder.goldaxe.com/a.kss [Only one [string] value is allowed in the action parameter [value]., at row 1, column 19]' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "" data: no] but it doesn't work. How I can do there? From hedleyroos at gmail.com Wed Sep 3 20:31:35 2008 From: hedleyroos at gmail.com (Hedley Roos) Date: Wed, 3 Sep 2008 20:31:35 +0200 Subject: [Kss-devel] attach text on existing text in input tag In-Reply-To: <604c02230809031127k4071388k11d44f60bba5896@mail.gmail.com> References: <604c02230809031127k4071388k11d44f60bba5896@mail.gmail.com> Message-ID: <776caf8b0809031131r714db573xd9d0f5b1030e3fdd@mail.gmail.com> The easiest way is to use replaceHTML or replaceInnerHTML to replace the entire with a new value attribute. If your input had focus then it is more difficult, since replacing the tag will mean losing focus. In such a case you will have to write your own plugin. Hedley From gotcha at bubblenet.be Thu Sep 4 10:03:07 2008 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Thu, 04 Sep 2008 10:03:07 +0200 Subject: [Kss-devel] attach text on existing text in input tag In-Reply-To: <776caf8b0809031131r714db573xd9d0f5b1030e3fdd@mail.gmail.com> References: <604c02230809031127k4071388k11d44f60bba5896@mail.gmail.com> <776caf8b0809031131r714db573xd9d0f5b1030e3fdd@mail.gmail.com> Message-ID: <48BF963B.3010603@bubblenet.be> Hedley Roos wrote: > The easiest way is to use replaceHTML or replaceInnerHTML to replace > the entire with a new value attribute. Right. But this should happen server-side. There is no way to do computation with KSS. > > If your input had focus then it is more difficult, since replacing the > tag will mean losing focus. In such a case you will have to write your > own plugin. > > Hedley There is a 'focus' action that you add as a second action : it will be executed after the replaceHTML. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From mymir.org at googlemail.com Thu Sep 4 17:32:11 2008 From: mymir.org at googlemail.com (Vladislav Vorobiev) Date: Thu, 4 Sep 2008 17:32:11 +0200 Subject: [Kss-devel] execute javascript in answer Message-ID: <604c02230809040832x7fc2fcefg773322138e4f6d22@mail.gmail.com> Hi, I am looking for feasibility to load and execute javascript. My kss #myEditor:click { action-server: textEditKss; } myScript con="""aaaaaaaaaaaaaa""" core=getKSSCommandSet('core').replaceInnerHTML('#myEditor, container.toUnicode(con)) return renderKSSCommands() my answer alert('sasa');aaaaaaaaa]]>True But alert() will not executing by Browser. I need it for initialisation of Epoz editor. Best regards Vlad From gotcha at bubblenet.be Thu Sep 4 23:07:03 2008 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Thu, 04 Sep 2008 23:07:03 +0200 Subject: [Kss-devel] execute javascript in answer In-Reply-To: <604c02230809040832x7fc2fcefg773322138e4f6d22@mail.gmail.com> References: <604c02230809040832x7fc2fcefg773322138e4f6d22@mail.gmail.com> Message-ID: <48C04DF7.5070305@bubblenet.be> Vladislav Vorobiev wrote: > Hi, > > I am looking for feasibility to load and execute javascript. > > My kss > > #myEditor:click { > action-server: textEditKss; > } > > myScript > con="""aaaaaaaaaaaaaa""" > core=getKSSCommandSet('core').replaceInnerHTML('#myEditor, > container.toUnicode(con)) > return renderKSSCommands() > > my answer > > > > > alert('sasa');aaaaaaaaa]]> name="withKssSetup">True > > > > > But alert() will not executing by Browser. > I need it for initialisation of Epoz editor. > > Best regards > Vlad When you need to execute specific JS code, you can register an action/command with KSS. look in kss/core/kukit/kukit/plugin.js how the core actions are registered. Or rather, read the following tutorial http://kssproject.org/documentation/tutorials/creating-a-kss-plugin -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From mymir.org at googlemail.com Fri Sep 5 00:21:35 2008 From: mymir.org at googlemail.com (Vladislav Vorobiev) Date: Fri, 5 Sep 2008 00:21:35 +0200 Subject: [Kss-devel] execute javascript in answer In-Reply-To: <48C04DF7.5070305@bubblenet.be> References: <604c02230809040832x7fc2fcefg773322138e4f6d22@mail.gmail.com> <48C04DF7.5070305@bubblenet.be> Message-ID: <604c02230809041521s7efb4e0ew7a6c5b831f27921b@mail.gmail.com> It's time to write plugins. I try it. Thanks Vlad 2008/9/4 Godefroid Chapelle : > Vladislav Vorobiev wrote: >> >> Hi, >> >> I am looking for feasibility to load and execute javascript. >> >> My kss >> >> #myEditor:click { >> action-server: textEditKss; >> } >> >> myScript >> con="""aaaaaaaaaaaaaa""" >> core=getKSSCommandSet('core').replaceInnerHTML('#myEditor, >> container.toUnicode(con)) >> return renderKSSCommands() >> >> my answer >> >> >> >> >> > name="html">alert('sasa');aaaaaaaaa]]>> name="withKssSetup">True >> >> >> >> >> But alert() will not executing by Browser. >> I need it for initialisation of Epoz editor. >> >> Best regards >> Vlad > > When you need to execute specific JS code, you can register an > action/command with KSS. > > look in kss/core/kukit/kukit/plugin.js how the core actions are registered. > > Or rather, read the following tutorial > > http://kssproject.org/documentation/tutorials/creating-a-kss-plugin > > -- > Godefroid Chapelle (aka __gotcha) http://bubblenet.be > -- Best Regards Vlad Vorobiev http://www.mymir.org From mymir.org at googlemail.com Fri Sep 5 03:46:26 2008 From: mymir.org at googlemail.com (Vladislav Vorobiev) Date: Fri, 5 Sep 2008 03:46:26 +0200 Subject: [Kss-devel] execute javascript in answer In-Reply-To: <604c02230809041521s7efb4e0ew7a6c5b831f27921b@mail.gmail.com> References: <604c02230809040832x7fc2fcefg773322138e4f6d22@mail.gmail.com> <48C04DF7.5070305@bubblenet.be> <604c02230809041521s7efb4e0ew7a6c5b831f27921b@mail.gmail.com> Message-ID: <604c02230809041846u72d8fc3ci6ed8f8bcb2796b4c@mail.gmail.com> Hello, I tryed to create a kssplugintutorial. It seems to be allright, but onload I get an error: Firebug say # Loading KSS engine. uncaught exception: [Exception... "Could not convert JavaScript argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://localhost/++resource++kukit-src.js :: anonymous :: line 569" data: no] # What does it mean in my situation? I use no plone. My software: python2.4.5 and Zope2.11. Vlad 2008/9/5 Vladislav Vorobiev : > It's time to write plugins. > I try it. > Thanks > Vlad > > 2008/9/4 Godefroid Chapelle : >> Vladislav Vorobiev wrote: >>> >>> Hi, >>> >>> I am looking for feasibility to load and execute javascript. >>> >>> My kss >>> >>> #myEditor:click { >>> action-server: textEditKss; >>> } >>> >>> myScript >>> con="""aaaaaaaaaaaaaa""" >>> core=getKSSCommandSet('core').replaceInnerHTML('#myEditor, >>> container.toUnicode(con)) >>> return renderKSSCommands() >>> >>> my answer >>> >>> >>> >>> >>> >> name="html">alert('sasa');aaaaaaaaa]]>>> name="withKssSetup">True >>> >>> >>> >>> >>> But alert() will not executing by Browser. >>> I need it for initialisation of Epoz editor. >>> >>> Best regards >>> Vlad >> >> When you need to execute specific JS code, you can register an >> action/command with KSS. >> >> look in kss/core/kukit/kukit/plugin.js how the core actions are registered. >> >> Or rather, read the following tutorial >> >> http://kssproject.org/documentation/tutorials/creating-a-kss-plugin >> >> -- >> Godefroid Chapelle (aka __gotcha) http://bubblenet.be >> > > > > -- > Best Regards > Vlad Vorobiev > http://www.mymir.org > -- Best Regards Vlad Vorobiev http://www.mymir.org From mymir.org at googlemail.com Fri Sep 5 03:52:11 2008 From: mymir.org at googlemail.com (Vladislav Vorobiev) Date: Fri, 5 Sep 2008 03:52:11 +0200 Subject: [Kss-devel] execute javascript in answer In-Reply-To: <604c02230809041846u72d8fc3ci6ed8f8bcb2796b4c@mail.gmail.com> References: <604c02230809040832x7fc2fcefg773322138e4f6d22@mail.gmail.com> <48C04DF7.5070305@bubblenet.be> <604c02230809041521s7efb4e0ew7a6c5b831f27921b@mail.gmail.com> <604c02230809041846u72d8fc3ci6ed8f8bcb2796b4c@mail.gmail.com> Message-ID: <604c02230809041852h733e93b7h22527ee0ba86bd0b@mail.gmail.com> Maybe there are mistakes in the tutorial? For example Tutorial say Paste the following code into ksstutorial-configure.zcml: ksstutorial zope can't find I write in my ksstutorial-configure.zcml 2008/9/5 Vladislav Vorobiev : > Hello, > > I tryed to create a kssplugintutorial. > It seems to be allright, but onload I get an error: > > Firebug say > > # > Loading KSS engine. > uncaught exception: [Exception... "Could not convert JavaScript > argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" > location: "JS frame :: http://localhost/++resource++kukit-src.js :: > anonymous :: line 569" data: no] > # > > What does it mean in my situation? I use no plone. > My software: python2.4.5 and Zope2.11. > > Vlad > > 2008/9/5 Vladislav Vorobiev : >> It's time to write plugins. >> I try it. >> Thanks >> Vlad >> >> 2008/9/4 Godefroid Chapelle : >>> Vladislav Vorobiev wrote: >>>> >>>> Hi, >>>> >>>> I am looking for feasibility to load and execute javascript. >>>> >>>> My kss >>>> >>>> #myEditor:click { >>>> action-server: textEditKss; >>>> } >>>> >>>> myScript >>>> con="""aaaaaaaaaaaaaa""" >>>> core=getKSSCommandSet('core').replaceInnerHTML('#myEditor, >>>> container.toUnicode(con)) >>>> return renderKSSCommands() >>>> >>>> my answer >>>> >>>> >>>> >>>> >>>> >>> name="html">alert('sasa');aaaaaaaaa]]>>>> name="withKssSetup">True >>>> >>>> >>>> >>>> >>>> But alert() will not executing by Browser. >>>> I need it for initialisation of Epoz editor. >>>> >>>> Best regards >>>> Vlad >>> >>> When you need to execute specific JS code, you can register an >>> action/command with KSS. >>> >>> look in kss/core/kukit/kukit/plugin.js how the core actions are registered. >>> >>> Or rather, read the following tutorial >>> >>> http://kssproject.org/documentation/tutorials/creating-a-kss-plugin >>> >>> -- >>> Godefroid Chapelle (aka __gotcha) http://bubblenet.be >>> >> >> >> >> -- >> Best Regards >> Vlad Vorobiev >> http://www.mymir.org >> > > > > -- > Best Regards > Vlad Vorobiev > http://www.mymir.org > -- Best Regards Vlad Vorobiev http://www.mymir.org From gotcha at bubblenet.be Fri Sep 5 10:25:24 2008 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Fri, 05 Sep 2008 10:25:24 +0200 Subject: [Kss-devel] execute javascript in answer In-Reply-To: <604c02230809041846u72d8fc3ci6ed8f8bcb2796b4c@mail.gmail.com> References: <604c02230809040832x7fc2fcefg773322138e4f6d22@mail.gmail.com> <48C04DF7.5070305@bubblenet.be> <604c02230809041521s7efb4e0ew7a6c5b831f27921b@mail.gmail.com> <604c02230809041846u72d8fc3ci6ed8f8bcb2796b4c@mail.gmail.com> Message-ID: <48C0ECF4.6000405@bubblenet.be> Vladislav Vorobiev wrote: > Hello, > > I tryed to create a kssplugintutorial. > It seems to be allright, but onload I get an error: > > Firebug say > > # > Loading KSS engine. > uncaught exception: [Exception... "Could not convert JavaScript > argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" > location: "JS frame :: http://localhost/++resource++kukit-src.js :: > anonymous :: line 569" data: no] > # > > What does it mean in my situation? I use no plone. > My software: python2.4.5 and Zope2.11. > > Vlad Are you working with FF3 ? -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From mymir.org at googlemail.com Fri Sep 5 11:09:04 2008 From: mymir.org at googlemail.com (Vladislav Vorobiev) Date: Fri, 5 Sep 2008 11:09:04 +0200 Subject: [Kss-devel] execute javascript in answer In-Reply-To: <48C0ECF4.6000405@bubblenet.be> References: <604c02230809040832x7fc2fcefg773322138e4f6d22@mail.gmail.com> <48C04DF7.5070305@bubblenet.be> <604c02230809041521s7efb4e0ew7a6c5b831f27921b@mail.gmail.com> <604c02230809041846u72d8fc3ci6ed8f8bcb2796b4c@mail.gmail.com> <48C0ECF4.6000405@bubblenet.be> Message-ID: <604c02230809050209u653fac35vd029cb1a63727bca@mail.gmail.com> > Are you working with FF3 ? Yes From ree at ree.hu Fri Sep 5 12:04:53 2008 From: ree at ree.hu (Balazs Ree) Date: Fri, 5 Sep 2008 12:04:53 +0200 Subject: [Kss-devel] execute javascript in answer References: <604c02230809040832x7fc2fcefg773322138e4f6d22@mail.gmail.com> <48C04DF7.5070305@bubblenet.be> <604c02230809041521s7efb4e0ew7a6c5b831f27921b@mail.gmail.com> <604c02230809041846u72d8fc3ci6ed8f8bcb2796b4c@mail.gmail.com> <48C0ECF4.6000405@bubblenet.be> Message-ID: On Fri, 05 Sep 2008 10:25:24 +0200, Godefroid Chapelle wrote: > Vladislav Vorobiev wrote: >> Hello, >> >> I tryed to create a kssplugintutorial. It seems to be allright, but >> onload I get an error: >> >> Firebug say >> >> # >> Loading KSS engine. >> uncaught exception: [Exception... "Could not convert JavaScript >> argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" >> location: "JS frame :: http://localhost/++resource++kukit-src.js :: >> anonymous :: line 569" data: no] >> # >> >> What does it mean in my situation? I use no plone. My software: >> python2.4.5 and Zope2.11. First I suggest you use kukit.js as a production version, and kukit- devel.js in development. I would not use kukit-src.js, we should actually have deprecated it long ago. If the error still persists with kukit.js / kukit-devel.js, please let us know. If you can run the page with kukit-devel.js, you will receive a sane traceback in FireBug that we can use to find out your problem, or ask more information. Best wishes, -- Balazs Ree From ree at ree.hu Sat Sep 6 09:26:12 2008 From: ree at ree.hu (Balazs Ree) Date: Sat, 6 Sep 2008 09:26:12 +0200 Subject: [Kss-devel] browser compatibility of IE8 beta2 and Chrome Message-ID: Hi All! This morning I run two browser tests against kss 1.4: IE8 beta2 (8.06001.08241) runs all tests green. Google Chrome (Official Build 1583, Chrome/0.2.149.27 Safari/525.13) is broken with the same issue what we have on Safari 3.1. This is caused by a case sensitivity bug in base2 and/or Safari, and we currently only can offer the workaround of using the old cssQuery on these browsers. The bug only manifests if you use any uppercase letter in the css classes. Best wishes, -- Balazs Ree From mymir.org at googlemail.com Wed Sep 10 14:42:48 2008 From: mymir.org at googlemail.com (Vladislav Vorobiev) Date: Wed, 10 Sep 2008 14:42:48 +0200 Subject: [Kss-devel] execute javascript in answer In-Reply-To: References: <604c02230809040832x7fc2fcefg773322138e4f6d22@mail.gmail.com> <48C04DF7.5070305@bubblenet.be> <604c02230809041521s7efb4e0ew7a6c5b831f27921b@mail.gmail.com> <604c02230809041846u72d8fc3ci6ed8f8bcb2796b4c@mail.gmail.com> <48C0ECF4.6000405@bubblenet.be> Message-ID: <604c02230809100542m1e202f00k6b4f845fb6c5cada@mail.gmail.com> Thanks, it works now Vlad 2008/9/5 Balazs Ree : > On Fri, 05 Sep 2008 10:25:24 +0200, Godefroid Chapelle wrote: > >> Vladislav Vorobiev wrote: >>> Hello, >>> >>> I tryed to create a kssplugintutorial. It seems to be allright, but >>> onload I get an error: >>> >>> Firebug say >>> >>> # >>> Loading KSS engine. >>> uncaught exception: [Exception... "Could not convert JavaScript >>> argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" >>> location: "JS frame :: http://localhost/++resource++kukit-src.js :: >>> anonymous :: line 569" data: no] >>> # >>> >>> What does it mean in my situation? I use no plone. My software: >>> python2.4.5 and Zope2.11. > > First I suggest you use kukit.js as a production version, and kukit- > devel.js in development. I would not use kukit-src.js, we should actually > have deprecated it long ago. > > If the error still persists with kukit.js / kukit-devel.js, please let us > know. If you can run the page with kukit-devel.js, you will receive a > sane traceback in FireBug that we can use to find out your problem, or > ask more information. > > Best wishes, > > > -- > Balazs Ree > > _______________________________________________ > Kss-devel mailing list > Kss-devel at codespeak.net > http://codespeak.net/mailman/listinfo/kss-devel > -- Best Regards Vlad Vorobiev http://www.mymir.org From ree at ree.hu Mon Sep 15 08:45:06 2008 From: ree at ree.hu (Balazs Ree) Date: Mon, 15 Sep 2008 08:45:06 +0200 Subject: [Kss-devel] Safari 3.1 / Chrome problem followup Message-ID: Hi, a followup on the Safari 3.1 (and Chrome) problem. This seems to be connected with base2 or the browser, and it effects in kss broken in case any of the selectors contain an uppercase letter. We currently suggest to use the old cssQuery library in these browsers, as the problem does not occur there. I filed the following bugreport to base2: http://code.google.com/p/base2/issues/detail?id=100 This shows that the problem also needs other conditions than the uppercase letters to manifest: most notably if the page has a declaration, the error does not occur. It does occur in all the kss tests, since the demo pages don't have a , hence the reason we know about the problem at all. This also means that if your pages have a , you don't need to fallback to cssQuery as a workaround. This makes, for example, vanilla Plone sites immune to the problem. If you want to experiment more, the bugreport contains a static html test page that shows the issue without kss. I also made this page temporarily available on the web at: http://greenfinity.hu/pub/base2/test/DOM/selectors-api/safari-31-test.html The same html with the of transitional xhtml present, is: http://greenfinity.hu/pub/base2/test/DOM/selectors-api/safari-31-test-transitional.html Best wishes, -- Balazs Ree From simon at zestsoftware.nl Mon Sep 15 11:42:37 2008 From: simon at zestsoftware.nl (Simon Hildebrandt) Date: Mon, 15 Sep 2008 11:42:37 +0200 (CEST) Subject: [Kss-devel] Blocking until the server responds in KSS Message-ID: <50950.82.94.112.106.1221471757.squirrel@webmail.zestsoftware.nl> Hi everyone - I'm an experienced JavaScript developer relatively new to KSS, with a question about managing KSS requests properly. I'm getting some conflicts when users pump several overlapping KSS requests to the server from the same page (YUI drag/drop to move objects between folders.) I'm wondering if it's possible to block the interface somehow to stop users starting a new request before the last has finished. I know I could modify the classes on the objects so that they're no longer found - that seems a little clumsy though, and I'm not sure it would handle errors gracefully. Any suggestions? Thanks for your time, Simon Hildebrandt - the new guy @ Zest Software From mikko at redinnovation.com Mon Sep 15 12:07:56 2008 From: mikko at redinnovation.com (Mikko Ohtamaa) Date: Mon, 15 Sep 2008 13:07:56 +0300 Subject: [Kss-devel] Loading HTML code outside the normal flow Message-ID: <7b5b293c0809150307n79df4c1ew7c6ff56492f3f5ae@mail.gmail.com> Hi, I have been writing custom form management stuff for medical forms containing hundreds (sic) fields. Due to sheer size of the form, it is splitted to several tabs ? la Plone. HTML for each tab is lazily loaded when the tab is clicked for the first time. Forms use Archetypes KSS - Basically I have added some hacks to formtabbing.js in Plone. The problem is that when HTML is loaded this way, KSS events don't get bind and :load() event is not executed for the dynamically loaded HTML code. I assume that KSS boosttraps itself for DOM document on load event. The same bootstrapping code should be executed via plain Javascript for certain dynamically created DOM nodes. If you can give me any pointers how I should approach the problem I'd be glad. Ps. If the following links are still relevant they could be moved to the new KSS documentation center. They contain very useful information. http://kssproject.org/notes/manually-triggering-actions-for-a-rule/ http://kssproject.org/notes/manually-calling-a-server-action/ -- Mikko Ohtamaa Every problem is solvable if you can throw enough energy drinks at it -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kss-devel/attachments/20080915/aa596e5c/attachment.htm From hedley at upfrontsystems.co.za Mon Sep 15 12:18:58 2008 From: hedley at upfrontsystems.co.za (Hedley Roos) Date: Mon, 15 Sep 2008 12:18:58 +0200 Subject: [Kss-devel] Loading HTML code outside the normal flow In-Reply-To: <7b5b293c0809150307n79df4c1ew7c6ff56492f3f5ae@mail.gmail.com> References: <7b5b293c0809150307n79df4c1ew7c6ff56492f3f5ae@mail.gmail.com> Message-ID: <48CE3692.80901@upfrontsystems.co.za> I've been struggling with this as well, but I do have a workaround. Here is an example to fix the schemata tabs on dynamic form loading. The presumably correct way which does not work ---------------------------------------------- jq('form').each(function(i,o){ var binderinfo = kukit.engine.binderInfoRegistry.getSingletonBinderInfoByName(null, 'load'); binderinfo.getBinder().continueEvent('load', o); }); Workaround for tabbing ---------------------- jq('form').each(ploneFormTabbing.initializeForm); The jquery selectors will probably be different for you. Hedley Mikko Ohtamaa wrote: > Hi, > > I have been writing custom form management stuff for medical forms > containing hundreds (sic) fields. Due to sheer size of the form, it is > splitted to several tabs ? la Plone. HTML for each tab is lazily loaded > when the tab is clicked for the first time. Forms use Archetypes KSS - > Basically I have added some hacks to formtabbing.js in Plone. > > The problem is that when HTML is loaded this way, KSS events don't get > bind and :load() event is not executed for the dynamically loaded HTML > code. I assume that KSS boosttraps itself for DOM document on load > event. The same bootstrapping code should be executed via plain > Javascript for certain dynamically created DOM nodes. > > If you can give me any pointers how I should approach the problem I'd be > glad. > > Ps. If the following links are still relevant they could be moved to the > new KSS documentation center. They contain very useful information. > > http://kssproject.org/notes/manually-triggering-actions-for-a-rule/ > > http://kssproject.org/notes/manually-calling-a-server-action/ > > -- > Mikko Ohtamaa > Every problem is solvable if you can throw enough energy drinks at it > > > ------------------------------------------------------------------------ > > _______________________________________________ > Kss-devel mailing list > Kss-devel at codespeak.net > http://codespeak.net/mailman/listinfo/kss-devel From hedley at upfrontsystems.co.za Mon Sep 15 12:29:00 2008 From: hedley at upfrontsystems.co.za (Hedley Roos) Date: Mon, 15 Sep 2008 12:29:00 +0200 Subject: [Kss-devel] Loading HTML code outside the normal flow In-Reply-To: <48CE3692.80901@upfrontsystems.co.za> References: <7b5b293c0809150307n79df4c1ew7c6ff56492f3f5ae@mail.gmail.com> <48CE3692.80901@upfrontsystems.co.za> Message-ID: <48CE38EC.1040606@upfrontsystems.co.za> I should clarify. I do not know if there is an action which I can call server side to fire a load event for forms. Maybe there is one - Balazs will know. The javascript code I supplied must be made available in a kss action plugin. You call that plugin server side after you've done replaceHTML to load the form into the DOM. H Hedley Roos wrote: > I've been struggling with this as well, but I do have a workaround. Here > is an example to fix the schemata tabs on dynamic form loading. > > The presumably correct way which does not work > ---------------------------------------------- > jq('form').each(function(i,o){ > var binderinfo = > kukit.engine.binderInfoRegistry.getSingletonBinderInfoByName(null, 'load'); > binderinfo.getBinder().continueEvent('load', o); > }); > > Workaround for tabbing > ---------------------- > jq('form').each(ploneFormTabbing.initializeForm); > > The jquery selectors will probably be different for you. > > Hedley > > From mikko at redinnovation.com Mon Sep 15 18:56:19 2008 From: mikko at redinnovation.com (Mikko Ohtamaa) Date: Mon, 15 Sep 2008 19:56:19 +0300 Subject: [Kss-devel] Loading HTML code outside the normal flow In-Reply-To: <48CE38EC.1040606@upfrontsystems.co.za> References: <7b5b293c0809150307n79df4c1ew7c6ff56492f3f5ae@mail.gmail.com> <48CE3692.80901@upfrontsystems.co.za> <48CE38EC.1040606@upfrontsystems.co.za> Message-ID: <7b5b293c0809150956v7b977a55n406ff1ef11c9a19f@mail.gmail.com> On Mon, Sep 15, 2008 at 1:29 PM, Hedley Roos wrote: > I should clarify. > > I do not know if there is an action which I can call server side to fire > a load event for forms. Maybe there is one - Balazs will know. > > The javascript code I supplied must be made available in a kss action > plugin. You call that plugin server side after you've done replaceHTML > to load the form into the DOM. Thank you very much Hedley! I am not quite following you here. I am mostly looking client side pure Javascript solution... is there a specific reason why things must be done on the server side? ---------------------------------------------- >jq('form').each(function(i,o){ > var binderinfo = >kukit.engine.binderInfoRegistry.getSingletonBinderInfoByName(null, 'load'); > binderinfo.getBinder().continueEvent('load', o); > }); Workaround for tabbing ---------------------- >jq('form').each(ploneFormTabbing.initializeForm); Also, do calling ploneFormTabbing or binding load event twice for DOM node cause any problems? Cheers, Mikko > > > H > > Hedley Roos wrote: > > I've been struggling with this as well, but I do have a workaround. Here > > is an example to fix the schemata tabs on dynamic form loading. > > > > The presumably correct way which does not work > > ---------------------------------------------- > > jq('form').each(function(i,o){ > > var binderinfo = > > kukit.engine.binderInfoRegistry.getSingletonBinderInfoByName(null, > 'load'); > > binderinfo.getBinder().continueEvent('load', o); > > }); > > > > Workaround for tabbing > > ---------------------- > > jq('form').each(ploneFormTabbing.initializeForm); > > > > The jquery selectors will probably be different for you. > > > > Hedley > > > > > _______________________________________________ > Kss-devel mailing list > Kss-devel at codespeak.net > http://codespeak.net/mailman/listinfo/kss-devel > -- Mikko Ohtamaa Managing director, Red Innovation Ltd. +358 40 743 9707 www.redinnovation.com Every problem is solvable if you can throw enough energy drinks at it -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kss-devel/attachments/20080915/604cca27/attachment.htm From hedleyroos at gmail.com Mon Sep 15 20:22:06 2008 From: hedleyroos at gmail.com (Hedley Roos) Date: Mon, 15 Sep 2008 20:22:06 +0200 Subject: [Kss-devel] Loading HTML code outside the normal flow In-Reply-To: <7b5b293c0809150956v7b977a55n406ff1ef11c9a19f@mail.gmail.com> References: <7b5b293c0809150307n79df4c1ew7c6ff56492f3f5ae@mail.gmail.com> <48CE3692.80901@upfrontsystems.co.za> <48CE38EC.1040606@upfrontsystems.co.za> <7b5b293c0809150956v7b977a55n406ff1ef11c9a19f@mail.gmail.com> Message-ID: <776caf8b0809151122i1587c107q38d474a714965c46@mail.gmail.com> Hi The javascript is client side, but you need a way to call it. I'll explain the process. 1. You click a link in your browser which causes an ajax call. 2. The server processes the request. In your case it's job is to dynamically load a form into the DOM in your browser. 3. You probably issue replaceInnerHTML server side. This command in fact causes javascript to be executed in your browser. This means that kss implements a replaceInnerHTML in its javascript libraries. A command issued on the server (replaceInnerHTML) causes a javascript function (replaceInnerHTML) to be execud in your browser. 4. Your DOM now has the new form loaded, but the blue tabs for navigating between the schematas is missing. Some javascript must execute for this to happen. This javascript is normally executed thanks to a load event binding on the form, but since just dynamically inserting a form into the DOM will not trigger a load event you must somehow trigger this. 5. The correct place to trigger that load event is from the server. It will eventually just mean that a piece of javascript executes on your browser. 6. The code I supplied will fix the form tabbing, but since kss does not provide a command to do that you must wire it in. This is accomplished by writing a little javascript function (a plugin) and registering it with kss's action registry with a zcml slug. Youl'll find examples on the kss project homepage. 7. You issue your new command server side in Python code, and your form will now be "loaded". HTH Hedley > > Thank you very much Hedley! > I am not quite following you here. I am mostly looking client side pure > Javascript solution... is there a specific reason why things must be done on > the server side? From mikko at redinnovation.com Tue Sep 16 01:01:34 2008 From: mikko at redinnovation.com (Mikko Ohtamaa) Date: Tue, 16 Sep 2008 02:01:34 +0300 Subject: [Kss-devel] Loading HTML code outside the normal flow In-Reply-To: <776caf8b0809151122i1587c107q38d474a714965c46@mail.gmail.com> References: <7b5b293c0809150307n79df4c1ew7c6ff56492f3f5ae@mail.gmail.com> <48CE3692.80901@upfrontsystems.co.za> <48CE38EC.1040606@upfrontsystems.co.za> <7b5b293c0809150956v7b977a55n406ff1ef11c9a19f@mail.gmail.com> <776caf8b0809151122i1587c107q38d474a714965c46@mail.gmail.com> Message-ID: <7b5b293c0809151601y1fa44ab4t7f22dda9acb55263@mail.gmail.com> On Mon, Sep 15, 2008 at 9:22 PM, Hedley Roos wrote: > Hi > > The javascript is client side, but you need a way to call it. I'll > explain the process. In the end, setting up KSS from client side Javascript was very easy when you know what you where looking for. I got a hint from replaceInnerHTML() function in KSS plug-in registry. All you had to do was calling kukit.engine.setupEvents() on new nodes. I put this to a tutorial http://kssproject.org/docs/how-to/enabling-kss-on-generated-html-nodes -- Mikko Ohtamaa -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kss-devel/attachments/20080916/c940c143/attachment.htm From hedleyroos at gmail.com Tue Sep 16 09:15:40 2008 From: hedleyroos at gmail.com (Hedley Roos) Date: Tue, 16 Sep 2008 09:15:40 +0200 Subject: [Kss-devel] Loading HTML code outside the normal flow In-Reply-To: <7b5b293c0809151601y1fa44ab4t7f22dda9acb55263@mail.gmail.com> References: <7b5b293c0809150307n79df4c1ew7c6ff56492f3f5ae@mail.gmail.com> <48CE3692.80901@upfrontsystems.co.za> <48CE38EC.1040606@upfrontsystems.co.za> <7b5b293c0809150956v7b977a55n406ff1ef11c9a19f@mail.gmail.com> <776caf8b0809151122i1587c107q38d474a714965c46@mail.gmail.com> <7b5b293c0809151601y1fa44ab4t7f22dda9acb55263@mail.gmail.com> Message-ID: <776caf8b0809160015w6bfccf4yd5cde19ba200955e@mail.gmail.com> Nice! Good to see it was that simple. H On 9/16/08, Mikko Ohtamaa wrote: > On Mon, Sep 15, 2008 at 9:22 PM, Hedley Roos wrote: > >> Hi >> >> The javascript is client side, but you need a way to call it. I'll >> explain the process. > > > In the end, setting up KSS from client side Javascript was very easy when > you know what you where looking for. I got a hint from replaceInnerHTML() > function in KSS plug-in registry. All you had to do was calling > kukit.engine.setupEvents() on new nodes. > > I put this to a tutorial > http://kssproject.org/docs/how-to/enabling-kss-on-generated-html-nodes > > > -- > Mikko Ohtamaa > -- Sent from Gmail for mobile | mobile.google.com From gotcha at bubblenet.be Tue Sep 16 09:46:51 2008 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Tue, 16 Sep 2008 09:46:51 +0200 Subject: [Kss-devel] Loading HTML code outside the normal flow In-Reply-To: <7b5b293c0809151601y1fa44ab4t7f22dda9acb55263@mail.gmail.com> References: <7b5b293c0809150307n79df4c1ew7c6ff56492f3f5ae@mail.gmail.com> <48CE3692.80901@upfrontsystems.co.za> <48CE38EC.1040606@upfrontsystems.co.za> <7b5b293c0809150956v7b977a55n406ff1ef11c9a19f@mail.gmail.com> <776caf8b0809151122i1587c107q38d474a714965c46@mail.gmail.com> <7b5b293c0809151601y1fa44ab4t7f22dda9acb55263@mail.gmail.com> Message-ID: <48CF646B.4080901@bubblenet.be> Mikko Ohtamaa wrote: > > > On Mon, Sep 15, 2008 at 9:22 PM, Hedley Roos > wrote: > > Hi > > The javascript is client side, but you need a way to call it. I'll > explain the process. > > > In the end, setting up KSS from client side Javascript was very easy > when you know what you where looking for. I got a hint from > replaceInnerHTML() function in KSS plug-in registry. All you had to do > was calling kukit.engine.setupEvents() on new nodes. > > I put this to a tutorial > http://kssproject.org/docs/how-to/enabling-kss-on-generated-html-nodes > > > -- > Mikko Ohtamaa Happy you found it and sorry of having been away from mail yesterday... -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From hedley at upfrontsystems.co.za Tue Sep 16 11:52:31 2008 From: hedley at upfrontsystems.co.za (Hedley Roos) Date: Tue, 16 Sep 2008 11:52:31 +0200 Subject: [Kss-devel] Replacing the content region Message-ID: <48CF81DF.8040401@upfrontsystems.co.za> Hi all Is there a way to redraw the content region? My use case is I do some ajax action while on folder_contents, and then I want the folder listing to re-render since some titles may have changed. I see there is a replaceContentRegion but I don't know if it will help me. For folder listing there is a DOM node with id folderlisting-main-table, so I can render a macro and replace that node's content, but my code must then have knowledge of the template in use. Thanks Hedley From hedley at upfrontsystems.co.za Thu Sep 18 13:35:15 2008 From: hedley at upfrontsystems.co.za (Hedley Roos) Date: Thu, 18 Sep 2008 13:35:15 +0200 Subject: [Kss-devel] Replacing the content region In-Reply-To: <48CF81DF.8040401@upfrontsystems.co.za> References: <48CF81DF.8040401@upfrontsystems.co.za> Message-ID: <48D23CF3.1010900@upfrontsystems.co.za> I'm going to answer my own question here. Yes, replaceContentRegion uses BeautifulSoup and a simpler main_template to render any content and extract the relevant html. Hedley Roos wrote: > > Is there a way to redraw the content region? My use case is I do some > ajax action while on folder_contents, and then I want the folder listing > to re-render since some titles may have changed. > > I see there is a replaceContentRegion but I don't know if it will help me. > > For folder listing there is a DOM node with id folderlisting-main-table, > so I can render a macro and replace that node's content, but my code > must then have knowledge of the template in use. > From gotcha at bubblenet.be Thu Sep 18 21:03:36 2008 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Thu, 18 Sep 2008 21:03:36 +0200 Subject: [Kss-devel] Some megrok.kss questions In-Reply-To: <1221745738.6350.30.camel@lo> References: <1221745738.6350.30.camel@lo> Message-ID: <48D2A608.8060506@bubblenet.be> Uli Fouquet wrote: > Hey Godefroid, > > I hope you are fine :-) > > Furthermore I don't want to bother you with silly stuff, so if you are > short of time and think those questions are better handled in a mailing > list (grok-dev? kss-devel?), please tell! > > I am currently experimenting with megrok.kss for two reasons: (1) I > would like to use it in the new grok introspector interface and (2) I > would like to build an visual attractive grok application in a > screencast to fight those ongoing Django-hype ;-) Nice ajax effects > would help here much :-) > > I already managed to do funny things with megrok.kss, sort tables etc. > which was a nice experience :-) Thanks a lot for the great work! Pleased you liked it. > Unfortunately I miserably failed to use the scriptaculous effects like > 'fade', 'appear' and all that. I tried it as an server action and as an > client action as described on the kssproject pages. Those pages should state that the code for effects is very experimental... and outdated. > I put the relevant > code parts below. Is there support for such effects in > kss.core/megrok.kss? Nope. > Do I have to pull in some plugins? I do not know of anyone having done any work for effects. I saw Balazs proposed that as a topic for Plone Conference sprint. IOW, if you wait a few weeks, code could be available. > The kss.core-code already registered the scriptaculous scripts as I found > out. Scriptaculous code should be removed from kss.core. And used in a plugin if it get ever written. > And another question: Grok is heading towards Python2.5 compatibility. I > read that kss needs 2.4. I was told the same but never checked what is wrong between kss.core and 2.5. > Is this still true? Could I help to make it Python2.5-ready ? Definitely. First by exploring what is wrong ;-) Second by changing the constructs if you do not need our help. Do you have codespeak access ? > Hope you don't mind this possibly dumb questions. Please keep up the > good work and best regards, Regards -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From uli at gnufix.de Sun Sep 21 16:03:48 2008 From: uli at gnufix.de (Uli Fouquet) Date: Sun, 21 Sep 2008 16:03:48 +0200 Subject: [Kss-devel] Some megrok.kss questions In-Reply-To: <48D2A608.8060506@bubblenet.be> References: <1221745738.6350.30.camel@lo> <48D2A608.8060506@bubblenet.be> Message-ID: <1222005828.21579.25.camel@lo> Hi there, first of all thanks for the answer! Godefroid Chapelle wrote: > Pleased you liked it. Indeed :-) > > Unfortunately I miserably failed to use the scriptaculous effects like > > 'fade', 'appear' and all that. I tried it as an server action and as an > > client action as described on the kssproject pages. > > Those pages should state that the code for effects is very > experimental... and outdated. I see. So the script.aculo.us code currently contained in kss.core will go away as well? > I do not know of anyone having done any work for effects. I saw Balazs > proposed that as a topic for Plone Conference sprint. > > IOW, if you wait a few weeks, code could be available. Too long ;-) I tried to write a little plugin myself just to support some basic effects. It turned out to be quite simple and worked like a charm, although I am sure, that some real JavaScript gurus could improve it a lot (and there was nothing complicated to implement ;-). I'd now like to share the code with others and publish it in some repository. Two problems have to be solved before: (1) I need a better name. Currently the package is called kss.plugin.effects, which is not very specific nor does it express, that the package is currently for Zope 3 (Grok to be more specific) only. It depends on `megrok.kss`. For use with Zope 2 (Plone 3) possibly only some minor modification would be necessary, for use with django or other frameworks, probably much more changes would be needed (but django already has some srcipt.aculo.us-KSS integration, right?). So at least `megrok`, `zope` or `z3c` should appear in the package name. Maybe `megrok.kss.scriptaculous`? That's pretty long, but, well... (2) To put that package into the Zope repository is not possible because it includes current versions of the script.aculo.us libs, which are BSD-licensed. No problem for me, but a problem for the Zope repository, that explicitly accepts only self-written, ZPL-licensed code. Possibly this could become the first external megrok-package? The code runs, by the way, much faster than the older script.aculo.us scripts currently shipped with `kss.core`. > > Is this still true? Could I help to make it Python2.5-ready ? > > Definitely. First by exploring what is wrong ;-) Until now I found no Python2.5 blockers :-) > Second by changing the constructs if you do not need our help. > > Do you have codespeak access ? No, but for megrok.kss.scriptaculous it might help. How can one gain access? Best regards, -- Uli -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 191 bytes Desc: Dies ist ein digital signierter Nachrichtenteil Url : http://codespeak.net/pipermail/kss-devel/attachments/20080921/1d383805/attachment.pgp From ks.box at gmx.net Mon Sep 22 12:52:13 2008 From: ks.box at gmx.net (Katja Suess) Date: Mon, 22 Sep 2008 12:52:13 +0200 Subject: [Kss-devel] triggerEvent Message-ID: <3EDEF50C-852B-4823-9271-7F772919803E@gmx.net> Hi! How can i use triggerEvent in a kss action? it says that triggerEvent is a global command. globalcommands = self.getCommandSet('global') globalcommands.triggerEvent('click', '#article-refresh') is not what i need. So how to do that? Thanks. Katja From shywolf9982 at gmail.com Tue Sep 23 17:19:19 2008 From: shywolf9982 at gmail.com (Simone Deponti) Date: Tue, 23 Sep 2008 17:19:19 +0200 Subject: [Kss-devel] Some megrok.kss questions In-Reply-To: <1222005828.21579.25.camel@lo> References: <1221745738.6350.30.camel@lo> <48D2A608.8060506@bubblenet.be> <1222005828.21579.25.camel@lo> Message-ID: <1222183159.3825.0.camel@mario.machines.maroncelli12.timelaps.com> Hello all, On Sun, 2008-09-21 at 16:03 +0200, Uli Fouquet wrote: > Too long ;-) I tried to write a little plugin myself just to support > some basic effects. It turned out to be quite simple and worked like a > charm, although I am sure, that some real JavaScript gurus could improve > it a lot (and there was nothing complicated to implement ;-). > > I'd now like to share the code with others and publish it in some > repository. Two problems have to be solved before: > > (1) I need a better name. Currently the package is called > kss.plugin.effects, which is not very specific nor does it express, that > the package is currently for Zope 3 (Grok to be more specific) only. It > depends on `megrok.kss`. For use with Zope 2 (Plone 3) possibly only > some minor modification would be necessary, for use with django or other > frameworks, probably much more changes would be needed (but django > already has some srcipt.aculo.us-KSS integration, right?). So at least > `megrok`, `zope` or `z3c` should appear in the package name. Maybe > `megrok.kss.scriptaculous`? That's pretty long, but, well... I personally find the scipt.aculo.us API very unflexible. That's why, a while ago, I wrote a not-so-simple plugin to add the YAHOO UI animation package to KSS. It's substantially feature complete, although there are missing demos for some animations. The plugin was mostly designed to be flexible yet easy enough to use so that a webdesigner could handle the task. It defines a set of basic animations that, by tweaking parameters, allows us to have all the proper effects. To give a quick example, the "fade" effect is achieved as follows (taken from the demos, file http://bazaar.launchpad.net/~shywolf9982/kss.animation.yui/alpha/annotate/21?file_id=style.kss-20080625194839-qxmawyrjiwip2xwc-5): #fade-start:click { evt-click-preventdefault: true; action-client: animationStyle; animationStyle-kssSelector: htmlid('fade-test-img'); animationStyle-attributes: 'opacity'; animationStyle-values: 0.0; animationStyle-id: 'fade'; animationStyle-duration: 2.0; animationStyle-method: 'easeOut'; } Basically, it has an element, which when clicked triggers the fade (hence the need for the kssSelector attribute). It uses the Style animation, which modifies style attributes (the names are normalized through browsers). It sets the attribute ``opacity`` to ``0.0``, in two seconds and using a easeOut transition (the frames goes faster at the beginning slowing down at the end). This was just to give a very quick example of what can be achieved: you can read the whole documentation of the plugin at http://bazaar.launchpad.net/~shywolf9982/kss.animation.yui/alpha/annotate/21?file_id=readme.txt-20080609140138-silwxs5g2adzlc51-3 The project is hosted on launchpad at https://launchpad.net/kss.animation.yui There are however some problems that have to be fixed with the current code: * Testing with all browsers (it worked in Firefox 3) * Cutting down and refactoring some code (sometimes I indulged in copy paste) * Documenting it better * Finding a way to properly compose motion and resize animation * Smooth out corner cases of effects chaining Right now, I had defined the KSS events animation-start, animation-tween and animation complete: respectively an event fired at the start of the animation, on frame "rendering" and on animation ending. To define which animation we are chaining to, we have an event parameter (again from the demos): /** * Since during the resize of an image we lose a lot of quality, we subscribe * an event to happen on the end of the animation that swaps the src attribute * so we get the high quality image at the end without the high loss of * performance we will have if we set it before: it is worth noting you have to * do the opposite for shrinking */ #resize-image-thumb:animation-complete { evt-animation-complete-animationId: 'animation-1'; action-client: setAttribute; setAttribute-name: 'src'; setAttribute-value: '++resource++image-1.jpg'; } but that is rather unflexible, because it chains the animation to a document element. I hope that someone would find this code useful, as it turned out for me to be mostly an exercise to properly learn Javascript (people suddenly stopped to ask me to implement fancy effects), and I'm very much open to contributions, suggestions and critics. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kss-devel/attachments/20080923/c699409d/attachment-0001.htm From ree at ree.hu Wed Sep 24 08:18:10 2008 From: ree at ree.hu (Balazs Ree) Date: Wed, 24 Sep 2008 08:18:10 +0200 Subject: [Kss-devel] triggerEvent References: <3EDEF50C-852B-4823-9271-7F772919803E@gmx.net> Message-ID: Hi Katja, On Mon, 22 Sep 2008 12:52:13 +0200, Katja Suess wrote: > Hi! > can i use triggerEvent in a kss action? it says that triggerEvent is > a global command. globalcommands = self.getCommandSet('global') > globalcommands.triggerEvent('click', '#article-refresh') is not what i > need. > So how to do that? Kss was designed in a way to support event triggering, including the use case you mention. To support event propagation is an important need for complex kss application, and it is obviously needed for writing custom event plugins and also in other use cases where some client state is involved. However by the time we wrote triggerEvent / continueEvent, we had only an example (conceptual) use case to test it on. For this reason they don't work as expected and altogether they have limitations. In the last period, I was working on different use cases where a correct event propagation was needed. I was also contacted by more developers about the same problem (the need for triggering), an although I was trying to give solutions and workarounds, the conclusion was always the same: event triggering must be supported in a coherent way both on the level of the kss syntax and on the programmatic (javascript) API. My plan is, as my time permits, to provide a transitional kss plugin, that can be used on top of existing kss. This would provide the event triggering in the way I found most powerful and easy to use, based on the use cases I'm working with and on the requests arrived to me. This will enable event triggering to be carried out by using kss actions in the stylesheet. If developers find this usable and they agree that this is the correct solution for their various use cases, this can be integrated to kss core at a later point which would result in a clean definition of the kss syntax and api for event triggering. But even with the transitional plugin you'd have access to the same functionality with the tradeoff of a little longer syntax. Which means you have to be patient at the moment. In case you happen to participate the kss sprint in Washington DC, I am more then glad to give you more information about this. Best wishes, -- Balazs Ree From uli at gnufix.de Wed Sep 24 14:03:25 2008 From: uli at gnufix.de (Uli Fouquet) Date: Wed, 24 Sep 2008 14:03:25 +0200 Subject: [Kss-devel] Some megrok.kss questions In-Reply-To: <1222183159.3825.0.camel@mario.machines.maroncelli12.timelaps.com> References: <1221745738.6350.30.camel@lo> <48D2A608.8060506@bubblenet.be> <1222005828.21579.25.camel@lo> <1222183159.3825.0.camel@mario.machines.maroncelli12.timelaps.com> Message-ID: <1222257805.6179.30.camel@lo> Hi Simone, Simone Deponti wrote: > I personally find the scipt.aculo.us API very unflexible. I have nearly no idea of ECMAScript aka JavaScript, but as I found the ruins of script.aculo.us integration in ``kss.core`` and liked the examples on the web pages (in the sense of style and ease-of-use), I just tried it. That does of course not mean, that this library is the best or only one, one could use to archieve simple client-sided effects. In fact I'd love to have plenty different KSS-packages (plugins) available, that could serve for different purposes and depending on the use-case. > That's why, a while ago, I wrote a not-so-simple plugin to add the > YAHOO UI animation package to KSS. > It's substantially feature complete, although there are missing demos > for some animations. > The plugin was mostly designed to be flexible yet easy enough to use > so that a webdesigner could handle the task. > It defines a set of basic animations that, by tweaking parameters, > allows us to have all the proper effects. Nice to hear :-) I didn't find your package before, because it was not published on cheeseshop. As you certainly know, Zope packages make heavy use of PyPI. Could you consider to publish the package on PyPI? That would make usage in other packages much easier :-) Is there BTW a list of other available KSS-packages somewhere? Looks like there are some treasures to unhide. [snip: examples of kss.animation.yui] The chaining of effects with YUI is certainly a really nice feature. > I hope that someone would find this code useful, as it turned out for > me to be mostly an exercise to properly learn Javascript (people > suddenly stopped to ask me to implement fancy effects), and I'm very > much open to contributions, suggestions and critics. Sure. I noticed that you didn't declared the namespace packages as such. You might want to replace the empty `__init__` modules in `kss` and `kss/animation` with the following (or a similar) boilerplate:: # namespace package boilerplate (__init__.py) try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError, e: from pkgutil import extend_path __path__ = extend_path(__path__, __name__) This avoids trouble when someone wants to use your package as an egg and when publishing the package on PyPI. Thanks for the hint and kind regards, -- Uli -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 191 bytes Desc: Dies ist ein digital signierter Nachrichtenteil Url : http://codespeak.net/pipermail/kss-devel/attachments/20080924/84ba2101/attachment.pgp From mymir.org at googlemail.com Wed Sep 24 15:13:57 2008 From: mymir.org at googlemail.com (Vladislav Vorobiev) Date: Wed, 24 Sep 2008 15:13:57 +0200 Subject: [Kss-devel] clear textarea Message-ID: <604c02230809240613va9aa770p318371c2afb427d3@mail.gmail.com> Hi, How to clear -- Best Regards Vladislav Vorobiev From gotcha at bubblenet.be Wed Sep 24 15:55:27 2008 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Wed, 24 Sep 2008 15:55:27 +0200 Subject: [Kss-devel] clear textarea In-Reply-To: <604c02230809240613va9aa770p318371c2afb427d3@mail.gmail.com> References: <604c02230809240613va9aa770p318371c2afb427d3@mail.gmail.com> Message-ID: <48DA46CF.4010100@bubblenet.be> Vladislav Vorobiev wrote: > Hi, > > How to clear > Replace the full textarea, with a new empty textarea. getKSSCommandSet('core').replaceHTML('#message', '') -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From shywolf9982 at gmail.com Wed Sep 24 16:11:41 2008 From: shywolf9982 at gmail.com (Simone Deponti) Date: Wed, 24 Sep 2008 16:11:41 +0200 Subject: [Kss-devel] Some megrok.kss questions In-Reply-To: <1222257805.6179.30.camel@lo> References: <1221745738.6350.30.camel@lo> <48D2A608.8060506@bubblenet.be> <1222005828.21579.25.camel@lo> <1222183159.3825.0.camel@mario.machines.maroncelli12.timelaps.com> <1222257805.6179.30.camel@lo> Message-ID: <2ab6fe210809240711k50fc7bd5lc4c2eb8e006b5c64@mail.gmail.com> Hey Uli On Wed, Sep 24, 2008 at 2:03 PM, Uli Fouquet wrote: > > > In fact I'd love to have plenty different KSS-packages (plugins) > available, that could serve for different purposes and depending on the > use-case. +1. Bad wording from my side there: the fact I found it limitating does just mean that it didn't fit my use-case, but might fit into another. Nice to hear :-) I didn't find your package before, because it was not > published on cheeseshop. As you certainly know, Zope packages make heavy > use of PyPI. Could you consider to publish the package on PyPI? That > would make usage in other packages much easier :-) I know, and again, my bad. That was something I meant to do since a couple of months: although before publishing it I wanted to first put it into a semi-usable state at least. Then, during the course of time, a lot of stuff got in and I totally forgot about it. Actually, the thing that concerned me more was the name of the package: I'm very undecided between kss.animation.yui and kss.plugins.yuianim, because I would like it to play well, name-wise, with other kss packages. So I'm very open to advices on this issue. Once I have got the name right it will be published (I would hate to publish it under one name and then change its name inbetween) The chaining of effects with YUI is certainly a really nice feature. > It's still far from optimal though. This is probably the biggest issue that needs to be tackled. Sure. I noticed that you didn't declared the namespace packages as such. > You might want to replace the empty `__init__` modules in `kss` and > `kss/animation` with the following (or a similar) boilerplate:: > > [namespace package snip] > > This avoids trouble when someone wants to use your package as an egg > and when publishing the package on PyPI. > I know, the problem is that I didn't knew that back when I made the plugin and then I totally forgot to fix that. The funny thing is that today I explained just that to another devel in my company: hope he does not routinely read kss-devel... >_> > Thanks for the hint and kind regards, > > You are more than welcome, and thanks a lot for all the suggestions! -- Simone Deponti ------------------------------------------- In Soviet Python, whitespace indents you -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kss-devel/attachments/20080924/4325687b/attachment.htm