From gotcha at bubblenet.be Sat Dec 6 09:49:52 2008 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Sat, 06 Dec 2008 09:49:52 +0100 Subject: [Kss-devel] KSS blur action added In-Reply-To: <200811291316.13784.s.hildebrandt@zestsoftware.nl> References: <200811291316.13784.s.hildebrandt@zestsoftware.nl> Message-ID: <493A3CB0.9000005@bubblenet.be> Simon Hildebrandt wrote: > Hi all - recently I've been hacking on kss.core to add the blur action and > event, and I think I'm finally done. > > Here's the branch: > http://codespeak.net/svn/kukit/kss.core/branch/bluraction/ > > There's a test page (ca_blur.html - very similar to the focus one, of course) > and Selenium tests. > > Let me know if it needs anything else to be merge-worthy. > Hi Simon, Very nice work ! Thanks My first exploration has shown everything I was looking for. :-) Before telling you to merge your work to trunk, I'd like to check that I can easily merge the diffs to a branch I am working on. That branch is the result of a lot of work done by Balazs in the begin of the year. I plan to try to merge your code to that branch this week. I'll let you know right after. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From mymir.org at googlemail.com Fri Dec 12 19:23:32 2008 From: mymir.org at googlemail.com (Vladislav Vorobiev) Date: Fri, 12 Dec 2008 19:23:32 +0100 Subject: [Kss-devel] return of javascript code on server side Message-ID: <604c02230812121023sfcd075m225956922a0bc358@mail.gmail.com> Hello all, I am interesting on return of the Javascript code on the server-side. Kss plug-in looks like so: ksswidth.js kukit.actionsGlobalRegistry.register("ksswidth", function(oper) { // oper.completeParms(['text'], {}, 'ksswidth action'); // alert(oper.parms.text); // alert(document.body.clientWidth); a=document.body.clientWidth; // document.getElementById('inputElementOnMySite').value=b; return a; }); kukit.commandsGlobalRegistry.registerFromAction('ksswidth', kukit.cr.makeSelectorCommand); ksswidth.py class ksswidth(CommandSet): interface.implements(Iksswidth) def demo(self, selector, text): command = self.commands.addCommand('ksswidth', selector) command.addParam('text', text) It is possible to access "a variable of javascript" in a server side python-script(Zope2)? core=getKSSCommandSet('ksswidth').demo('#hiddendiv', 'ok') return renderKSSCommands() I wont to fetch clientWidth and return images for this width. Best regards Vlad From gotcha at bubblenet.be Thu Dec 18 13:44:38 2008 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Thu, 18 Dec 2008 13:44:38 +0100 Subject: [Kss-devel] KSS blur action added In-Reply-To: <493A3CB0.9000005@bubblenet.be> References: <200811291316.13784.s.hildebrandt@zestsoftware.nl> <493A3CB0.9000005@bubblenet.be> Message-ID: <494A45B6.7090800@bubblenet.be> Godefroid Chapelle wrote: > > Simon Hildebrandt wrote: >> Hi all - recently I've been hacking on kss.core to add the blur action and >> event, and I think I'm finally done. >> >> Here's the branch: >> http://codespeak.net/svn/kukit/kss.core/branch/bluraction/ >> >> There's a test page (ca_blur.html - very similar to the focus one, of course) >> and Selenium tests. >> >> Let me know if it needs anything else to be merge-worthy. >> > > Hi Simon, > > Very nice work ! Thanks > > My first exploration has shown everything I was looking for. :-) > > Before telling you to merge your work to trunk, I'd like to check that I > can easily merge the diffs to a branch I am working on. > > That branch is the result of a lot of work done by Balazs in the begin > of the year. > > I plan to try to merge your code to that branch this week. > > I'll let you know right after. > I could merge your work without any trouble. Feel free to merge to trunk when you have time. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From gotcha at bubblenet.be Thu Dec 18 13:48:07 2008 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Thu, 18 Dec 2008 13:48:07 +0100 Subject: [Kss-devel] return of javascript code on server side In-Reply-To: <604c02230812121023sfcd075m225956922a0bc358@mail.gmail.com> References: <604c02230812121023sfcd075m225956922a0bc358@mail.gmail.com> Message-ID: Vladislav Vorobiev wrote: > Hello all, > > I am interesting on return of the Javascript code on the server-side. > Kss plug-in looks like so: > > ksswidth.js > kukit.actionsGlobalRegistry.register("ksswidth", function(oper) { > // oper.completeParms(['text'], {}, 'ksswidth action'); > // alert(oper.parms.text); > // alert(document.body.clientWidth); > a=document.body.clientWidth; > // document.getElementById('inputElementOnMySite').value=b; > return a; > }); > kukit.commandsGlobalRegistry.registerFromAction('ksswidth', > kukit.cr.makeSelectorCommand); > > ksswidth.py > class ksswidth(CommandSet): > interface.implements(Iksswidth) > def demo(self, selector, text): > command = self.commands.addCommand('ksswidth', selector) > command.addParam('text', text) > > It is possible to access "a variable of javascript" in a server side > python-script(Zope2)? Nope > > core=getKSSCommandSet('ksswidth').demo('#hiddendiv', 'ok') > return renderKSSCommands() You need to write a plugin with a custom value provider. Look at providerreg.js to see how default providers are registered. > > I wont to fetch clientWidth and return images for this width. Makes a lot of sense ! > > Best regards > Vlad -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From s.hildebrandt at zestsoftware.nl Thu Dec 18 14:06:20 2008 From: s.hildebrandt at zestsoftware.nl (Simon Hildebrandt) Date: Thu, 18 Dec 2008 14:06:20 +0100 Subject: [Kss-devel] KSS blur action added In-Reply-To: <494A45B6.7090800@bubblenet.be> References: <200811291316.13784.s.hildebrandt@zestsoftware.nl> <493A3CB0.9000005@bubblenet.be> <494A45B6.7090800@bubblenet.be> Message-ID: <200812181406.20185.s.hildebrandt@zestsoftware.nl> Cool - I'll give it a try as soon as I get a chance. :) On Thursday 18 December 2008 13:44:38 Godefroid Chapelle wrote: > Godefroid Chapelle wrote: > > Simon Hildebrandt wrote: > >> Hi all - recently I've been hacking on kss.core to add the blur action > >> and event, and I think I'm finally done. > >> > >> Here's the branch: > >> http://codespeak.net/svn/kukit/kss.core/branch/bluraction/ > >> > >> There's a test page (ca_blur.html - very similar to the focus one, of > >> course) and Selenium tests. > >> > >> Let me know if it needs anything else to be merge-worthy. > > > > Hi Simon, > > > > Very nice work ! Thanks > > > > My first exploration has shown everything I was looking for. :-) > > > > Before telling you to merge your work to trunk, I'd like to check that I > > can easily merge the diffs to a branch I am working on. > > > > That branch is the result of a lot of work done by Balazs in the begin > > of the year. > > > > I plan to try to merge your code to that branch this week. > > > > I'll let you know right after. > > I could merge your work without any trouble. > > Feel free to merge to trunk when you have time. -- Simon Hildebrandt Web Developer @ Zest Software