From briang at webcollective.coop Tue Mar 4 23:14:05 2008 From: briang at webcollective.coop (Brian Gershon) Date: Tue, 4 Mar 2008 14:14:05 -0800 Subject: [Kss-devel] KSS: Inline editing on multiple rows of data Message-ID: Greetings! I hope you can point me in the right direction. What I want to do: I have multiple rows of fields in a table. One field is each row is "Due Date". I want to click on the Due Date, have a text box appear, change date and save. Problem: Everything is going well, except for the initial "click on Due Date to bring up a form". When I click, the forms open up for ALL rows. Each row has a field like this, and by default
is hidden via .hiddenform style:
2008/02/25
(my KSS is below) I think the answer is "parentnode" so when they click on 2008/02/25 I can ultimately find div.editform and unhide it. Problem: If I use css() selector I get all rows, though unfortunately the parentnode of "2008/02/05" is the tag, and not the
. I don't want to use htmlid() because I'm not sure how to dynamically id each row in KSS -- so hoping to just work on the parent HTML (and children) (and not the whole DOM). Is there a better way to restructure my HTML? Or how do I get the parent of a parent? Thanks, -Brian ps: My cancel button successfully hides the fields in just that row because the parentnode() correctly grabs the pps: My KSS: /* show edit form when label clicked */ div.action-due-section span.label:click { evt-click-preventdefault: true; action-client: toggleClass; toggleClass-kssSelector: css("div.editform"); toggleClass-value: hiddenform; } /* hide form for one row */ input.cancel:click { action-client: toggleClass; toggleClass-kssSelector: parentnode("div.editform"); toggleClass-value: hiddenform; } From jeroen.vloothuis at xs4all.nl Wed Mar 5 00:15:00 2008 From: jeroen.vloothuis at xs4all.nl (Jeroen Vloothuis) Date: Wed, 05 Mar 2008 00:15:00 +0100 Subject: [Kss-devel] KSS: Inline editing on multiple rows of data In-Reply-To: References: Message-ID: <47CDD7F4.6@xs4all.nl> Brian Gershon wrote: > When I click, the forms open up for ALL rows. Each row has a field > like this, and by default
is hidden > via .hiddenform style: > >
> 2008/02/25 >
> > > >
>
> You could do something like: /* show edit form when label clicked */ div.action-due-section span.label:click { evt-click-preventdefault: true; action-client: toggleClass; toggleClass-kssSelector: parentnode("div.editform"); toggleClass-value: hiddenform; } Then you should make your CSS something like: .hiddenform .editform { display: none; } The trick here is that you are actually toggling the class name on the outer div but you let the CSS rule apply through that. So after (and you probably want to have this a page load time as well) toggling the HTML would become:
2008/02/25
... Now if you look at the CSS snippet above you can see how it first selects .hiddenform and than any node below with the editform class name. From ree at ree.hu Thu Mar 6 08:15:58 2008 From: ree at ree.hu (Balazs Ree) Date: Thu, 6 Mar 2008 08:15:58 +0100 Subject: [Kss-devel] kss and extjs (was: TR : 18 Things I Wish Were True About Plone) References: <8FAF06163E22434EACB677AD054EF89102A3BAE6@sm-exchange.groupesm.com> <15211310.post@talk.nabble.com> <15853490.post@talk.nabble.com> Message-ID: On Wed, 05 Mar 2008 16:58:37 +0100, Mignon, Laurent wrote: > On our current project, Gotcha has experienced the intergration of the > extjs grid control with plone and kss to display the content of a > folder. > All this work is not finalized and was done for a POC,.. > For me, it's sure that the future for Plone UI is extjs + kss + ... Sounds interesting. Is there going to be a kss plugin as a result? When can we expect the code to be public? p.s. I'm also cc-ing this to kss-devel, since it may interest other people, -- Balazs Ree From gotcha at bubblenet.be Thu Mar 6 09:21:59 2008 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Thu, 06 Mar 2008 09:21:59 +0100 Subject: [Kss-devel] kss and extjs In-Reply-To: References: <8FAF06163E22434EACB677AD054EF89102A3BAE6@sm-exchange.groupesm.com> <15211310.post@talk.nabble.com> <15853490.post@talk.nabble.com> Message-ID: <47CFA9A7.1040706@bubblenet.be> Balazs Ree wrote: > On Wed, 05 Mar 2008 16:58:37 +0100, Mignon, Laurent wrote: > >> On our current project, Gotcha has experienced the intergration of the >> extjs grid control with plone and kss to display the content of a >> folder. > >> All this work is not finalized and was done for a POC,.. > >> For me, it's sure that the future for Plone UI is extjs + kss + ... > > Sounds interesting. Is there going to be a kss plugin as a result? The customer needs to make a decision. If it is positive, there will be a plugin in a public repository. Until now, it has only been hacking a proof of concept... -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From kev at coolcavemen.com Thu Mar 6 18:48:13 2008 From: kev at coolcavemen.com (kev at coolcavemen.com) Date: Thu, 06 Mar 2008 18:48:13 +0100 Subject: [Kss-devel] Default compression method fail (patch included) Message-ID: <1204825693.47d02e5d318ca@imp.ovh.net> Hi ! Under some circumstances, the compression method of KSS fallback to the default method. This mecanism is implemented in kss.core.pluginregistry._concatresource.compression. I've spotted an error in this file when the content_type is not application/x-javascript or text/css. Here is the error I get: Module kss.core.pluginregistry._concatresource.compression, line 20, in compress 018 | 'Returns compressed text for a given content type' 019 | method = compress_methods.get(content_type, default_compress_method) 020>| return method(data, compress_level) TypeError: () takes exactly 1 argument (2 given) Please find as an attachment my patch to fix this problem (file: default-compress-method-argument-number.diff). Do you think it's a good idea to commit it in the trunk ? If you don't have time, I can commit it for you if you give me an access to the repository. -------------- next part -------------- A non-text attachment was scrubbed... Name: default-compress-method-argument-number.diff Type: application/octet-stream Size: 513 bytes Desc: not available Url : http://codespeak.net/pipermail/kss-devel/attachments/20080306/18983b43/attachment.obj From ree at ree.hu Fri Mar 7 09:34:12 2008 From: ree at ree.hu (Balazs Ree) Date: Fri, 7 Mar 2008 09:34:12 +0100 Subject: [Kss-devel] Default compression method fail (patch included) References: <1204825693.47d02e5d318ca@imp.ovh.net> Message-ID: Hi, thanks for your report! However: I am sorry but the way I am reading this list (via the news interface), make me ask these questions: - Who are you? I see no signature at the end of yout letter, and you are probably aware that in some systems (like gmane) the sender email is deprecated for security, so I don't see who you are from your email either. - I also don't see your patch attached, but it's not a big problem at the moment, see my remark below. On Thu, 06 Mar 2008 18:48:13 +0100, kev-yavNWJ2Ar3iEqOdQ7c3UMQ wrote:! > Under some circumstances, the compression method of KSS fallback to the > default method. This mecanism is implemented in > kss.core.pluginregistry._concatresource.compression. > I've spotted an error in this file when the content_type is not > application/x-javascript or text/css. Can you please provide some more details, on why this is needed? In what circumstances can it happen that the javascript file's mimetype is not application/x-javascript? > Do you think it's a good idea to commit it in the trunk ? If you don't > have time, I can commit it for you if you give me an access to the > repository. Before thinking of a fix, please provide more details to convince us that we really need this change. We absolutely need to understand and reproduce the problem before taking any more action about the issue. Best wishes, -- Balazs Ree From jeroen.vloothuis at xs4all.nl Fri Mar 7 22:56:53 2008 From: jeroen.vloothuis at xs4all.nl (Jeroen Vloothuis) Date: Fri, 07 Mar 2008 22:56:53 +0100 Subject: [Kss-devel] Default compression method fail (patch included) In-Reply-To: References: <1204825693.47d02e5d318ca@imp.ovh.net> Message-ID: <47D1BA25.2030809@xs4all.nl> Balazs Ree wrote: >> Do you think it's a good idea to commit it in the trunk ? If you don't >> have time, I can commit it for you if you give me an access to the >> repository. >> > > Before thinking of a fix, please provide more details to convince us that > we really need this change. We absolutely need to understand and > reproduce the problem before taking any more action about the issue. > The change just seems to fix the number of parameters of a lambda which is used as a callback. Afaik we should just create a test to make sure it does not break again (and is supposed to have two arguments). Discussing the need for this behavior seems irrelevant since the code is already there, its just broken. From gotcha at bubblenet.be Sat Mar 8 08:56:36 2008 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Sat, 08 Mar 2008 08:56:36 +0100 Subject: [Kss-devel] Default compression method fail (patch included) In-Reply-To: <47D1BA25.2030809@xs4all.nl> References: <1204825693.47d02e5d318ca@imp.ovh.net> <47D1BA25.2030809@xs4all.nl> Message-ID: <47D246B4.5040304@bubblenet.be> Jeroen Vloothuis wrote: > Balazs Ree wrote: >>> Do you think it's a good idea to commit it in the trunk ? If you don't >>> have time, I can commit it for you if you give me an access to the >>> repository. >>> >> Before thinking of a fix, please provide more details to convince us that >> we really need this change. We absolutely need to understand and >> reproduce the problem before taking any more action about the issue. >> > The change just seems to fix the number of parameters of a lambda which > is used as a callback. Afaik we should just create a test to make sure > it does not break again (and is supposed to have two arguments). > Discussing the need for this behavior seems irrelevant since the code is > already there, its just broken. I think you are right. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From ree at ree.hu Sat Mar 8 09:10:08 2008 From: ree at ree.hu (Balazs Ree) Date: Sat, 8 Mar 2008 09:10:08 +0100 Subject: [Kss-devel] Default compression method fail (patch included) References: <1204825693.47d02e5d318ca@imp.ovh.net> <47D1BA25.2030809@xs4all.nl> Message-ID: On Fri, 07 Mar 2008 22:56:53 +0100, Jeroen Vloothuis wrote: > Balazs Ree wrote: >>> Do you think it's a good idea to commit it in the trunk ? If you don't >>> have time, I can commit it for you if you give me an access to the >>> repository. >>> >>> >> Before thinking of a fix, please provide more details to convince us >> that we really need this change. We absolutely need to understand and >> reproduce the problem before taking any more action about the issue. >> > The change just seems to fix the number of parameters of a lambda which > is used as a callback. Afaik we should just create a test to make sure > it does not break again (and is supposed to have two arguments). > Discussing the need for this behavior seems irrelevant since the code is > already there, its just broken. I'm still interested in why we need the fix. The selection of compression type is there in the code, because originally I thought it would be a general purpose utility. However this did not happen we (from kss) don't use it for anything else then compressing javascript. Note that in the next version of kss this piece of code even goes away. Maybe the solution is to backport this from the new kss.base code and let the compression type selection go away completely, maybe we should apply the fix suggested, or maybe just leave it like it is. We have more options and it all depends on _why_ this problem occured. So what I'd like to see is a bugreport with - a full traceback producing the problem - description of steps that lead to the problem - a test that reproduces the problem We use this code in kss for years without any problems. If someone suddenly experiences problems, it is most certainly because of changed use conditions. I want to know about these changed conditions, before touching the code that actually has been stable for a while. If the current code causes problems, we definitely want to change it so the problem goes away, and we want the best solution to fix it. But applying a fix without understanding the problem that we want to fix, seems the wrong way for me. So without any further explanation, I demand more information from the original reporter of this bug. -- Balazs Ree From victor.fernandez at upcnet.es Sat Mar 8 10:53:43 2008 From: victor.fernandez at upcnet.es (Victor Fernandez de Alba) Date: Sat, 8 Mar 2008 10:53:43 +0100 Subject: [Kss-devel] KSS enabled SiteUser Autocomplete widget Message-ID: <00fe01c88102$4ef49a70$ecddcf50$@fernandez@upcnet.es> Hi, I?ve been trying to develop an AT widget that would search the PAS for all the available users in the site. It would be great if that widget will have the autocomplete feature. The idea came from a widget I liked very much that the dojo library have and I wanted to create an AT widget that emule its behavior. It would be of a great use for those who have a large user databases such as LDAP based ones, as is my case. I borrowed the code from the ?sharing? tab which already use KSS to search the PAS, and I managed to integrate it in a widget. Then, created a new KSS file and register it to the portal_kss with a set of modified definitions from the one uses the ?sharing? tab. It works perfectly. Now I?m stuck on adding the autocomplete behavior. I?ve tried the KSS events keypress, keyup, keydown with no effect However, I?ve tried with another type of event, and worked, like timeout or change Any ideas? ---------------------------------------------- V?ctor Fern?ndez de Alba Encinas Projectes Tecnol?gics UPCnet Edifici M?ster's - Pedro i Pons, 9, 9? 08034 BARCELONA Tel. centraleta: 93 401 16 00 ---------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kss-devel/attachments/20080308/ba10f3a7/attachment.htm From gotcha at bubblenet.be Sat Mar 8 11:29:39 2008 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Sat, 08 Mar 2008 11:29:39 +0100 Subject: [Kss-devel] KSS enabled SiteUser Autocomplete widget In-Reply-To: <35722.4824409515$1204970628@news.gmane.org> References: <35722.4824409515$1204970628@news.gmane.org> Message-ID: <47D26A93.5080002@bubblenet.be> Victor Fernandez de Alba wrote: > Hi, > > > > I?ve been trying to develop an AT widget that would search the PAS for > all the available users in the site. It would be great if that widget > will have the autocomplete feature. The idea came from a widget I liked > very much that the dojo library have and I wanted to create an AT widget > that emule its behavior. > > > > It would be of a great use for those who have a large user databases > such as LDAP based ones, as is my case. > > > > I borrowed the code from the ?sharing? tab which already use KSS to > search the PAS, and I managed to integrate it in a widget. Then, created > a new KSS file and register it to the portal_kss with a set of modified > definitions from the one uses the ?sharing? tab. It works perfectly. Great ! > Now I?m stuck on adding the autocomplete behavior. I?ve tried the KSS events > keypress, keyup, keydown with no effect? However, I?ve tried with > another type of event, and worked, like timeout or change? Any ideas? > > V?ctor Fern?ndez de Alba Encinas I am afraid the autocomplete part needs to happen in JS code. Balazs has worked on code that autocomples/live searches content : http://svn.plone.org/svn/collective/Products.CMFBibliographyAT/branches/ree-martior-kss/ I have no idea how easy it would be to make it work with PAS as well. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From gotcha at bubblenet.be Sat Mar 8 11:29:39 2008 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Sat, 08 Mar 2008 11:29:39 +0100 Subject: [Kss-devel] KSS enabled SiteUser Autocomplete widget In-Reply-To: <35722.4824409515$1204970628@news.gmane.org> References: <35722.4824409515$1204970628@news.gmane.org> Message-ID: <47D26A93.5080002@bubblenet.be> Victor Fernandez de Alba wrote: > Hi, > > > > I?ve been trying to develop an AT widget that would search the PAS for > all the available users in the site. It would be great if that widget > will have the autocomplete feature. The idea came from a widget I liked > very much that the dojo library have and I wanted to create an AT widget > that emule its behavior. > > > > It would be of a great use for those who have a large user databases > such as LDAP based ones, as is my case. > > > > I borrowed the code from the ?sharing? tab which already use KSS to > search the PAS, and I managed to integrate it in a widget. Then, created > a new KSS file and register it to the portal_kss with a set of modified > definitions from the one uses the ?sharing? tab. It works perfectly. Great ! > Now I?m stuck on adding the autocomplete behavior. I?ve tried the KSS events > keypress, keyup, keydown with no effect? However, I?ve tried with > another type of event, and worked, like timeout or change? Any ideas? > > V?ctor Fern?ndez de Alba Encinas I am afraid the autocomplete part needs to happen in JS code. Balazs has worked on code that autocomples/live searches content : http://svn.plone.org/svn/collective/Products.CMFBibliographyAT/branches/ree-martior-kss/ I have no idea how easy it would be to make it work with PAS as well. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From optilude at gmx.net Sat Mar 8 15:30:47 2008 From: optilude at gmx.net (Martin Aspeli) Date: Sat, 08 Mar 2008 14:30:47 +0000 Subject: [Kss-devel] KSS enabled SiteUser Autocomplete widget In-Reply-To: <35722.4824409515$1204970628@news.gmane.org> References: <35722.4824409515$1204970628@news.gmane.org> Message-ID: Victor Fernandez de Alba wrote: > Hi, > > > > I?ve been trying to develop an AT widget that would search the PAS for > all the available users in the site. It would be great if that widget > will have the autocomplete feature. The idea came from a widget I liked > very much that the dojo library have and I wanted to create an AT widget > that emule its behavior. > > > > It would be of a great use for those who have a large user databases > such as LDAP based ones, as is my case. > > > > I borrowed the code from the ?sharing? tab which already use KSS to > search the PAS, and I managed to integrate it in a widget. Then, created > a new KSS file and register it to the portal_kss with a set of modified > definitions from the one uses the ?sharing? tab. It works perfectly. Now > I?m stuck on adding the autocomplete behavior. I?ve tried the KSS events > keypress, keyup, keydown with no effect? However, I?ve tried with > another type of event, and worked, like timeout or change? Any ideas? This isn't an Archetypes widget (yet) and it doesn't yet use AJAX in the released version, but the UberSelectionWidget aims to give you a search-based interface to this kind of thing. We already have a (Zope 3 style) vocabulary (which you can use in Archetypes as of Plone 3, just give its name in the vocabulary_factory option) that enables you to find users by searching. If you look at borg.project or oi.plum (both in the collective) you'll see this in action for selecting users that are members of a project. Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book From gotcha at bubblenet.be Sun Mar 9 07:38:40 2008 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Sun, 09 Mar 2008 07:38:40 +0100 Subject: [Kss-devel] KSS, Firefox 3 and selective-click In-Reply-To: References: Message-ID: <47D385F0.1030409@bubblenet.be> Malthe Borch wrote: > Godefroid, ?? > > First, I've tried out KSS in Firefox 3, and it complains with a syntax > error in base2-dom-fp.js. Are you aware of this? Nope, can you report the problem on http://code.google.com/p/base2/issues/list and let us know ? This way, we can follow up... > > Secondly, I can't seem to get my head around the KSS rules required to > have the following flow: > > A delete-button where the user first clicks once, then a class > 'clicked' is appended to the class-attribute, then he clicks again, > and a server-action is carried out. > > ``selected-click`` seems to be the way here, but it complains about > some namespace error or plugin error. I have no idea what you mean by selected-click However, there are currently no way in KSS to only change a class and have new comportment bound. You need to replace the HTML in order for KSS events to be bound. I'd try sthing like this : button:click { action-client:replaceHTML; replaceHTML-html:"