From dokter at w20e.com Wed Aug 1 09:42:52 2007 From: dokter at w20e.com (Duco Dokter) Date: Wed, 1 Aug 2007 09:42:52 +0200 Subject: [Kss-devel] Webdesign mockups In-Reply-To: <20070731171059.17d65848@localhost.localdomain> References: <46A8AD03.1090101@xs4all.nl> <20070731171059.17d65848@localhost.localdomain> Message-ID: <200708010942.52797.dokter@w20e.com> On Tuesday 31 July 2007 17:10:59 Simone Deponti wrote: Pretty cool mockup. Personally, I like the shark logo. Nothing to add in terms of useful comments though... > On Thu, 26 Jul 2007 16:17:39 +0200 > Jeroen Vloothuis > > wrote: > > A colleague (Linda) has created a few mock ups for the KSS website. > > These are her initial thoughts and pretty rough. So any feedback is > > appreciated. > > A colleague of mine has created a mockup (with a self-designed logo) > aswell, since he was working on this from a bit ago (I think I > mentioned in previous mails). > Content is taken straight out from the old site to give a rough > preview. > > As a side note, he told me he decided to use the shark in the logo to > emphasize that KSS adds "movement" to your page (sharks die if they > don't move) and hence addressing the "kinetic" part of the name :). He > also told me the shark was a good metaphor for KSS "eating up" your > javascript, although I'm not entirely sure if he was joking on this or > not :O. > > Well, hope to have some feedback -- If more of us valued food and cheer and song above hoarded gold, it would be a merrier world. -- J.R.R. Tolkien From philipp at weitershausen.de Sat Aug 4 18:35:46 2007 From: philipp at weitershausen.de (Philipp von Weitershausen) Date: Sat, 04 Aug 2007 18:35:46 +0200 Subject: [Kss-devel] Please stop using request.RESPONSE In-Reply-To: References: Message-ID: Philipp von Weitershausen wrote: > There's no request.RESPONSE in Zope3. Fortunately, *both* Zope 2 and > Zope 3 have request.response (lower case). Ping? This problem really obstructs us from using KSS in Zope 3 / Grok. -- http://worldcookery.com -- Professional Zope documentation and training From apm13 at columbia.edu Sat Aug 4 18:52:41 2007 From: apm13 at columbia.edu (Alec Mitchell) Date: Sat, 4 Aug 2007 09:52:41 -0700 Subject: [Kss-devel] Please stop using request.RESPONSE In-Reply-To: References: Message-ID: <365118370708040952y5743cbd7v6efe9b302cb76323@mail.gmail.com> I for one was glad to learn that 'response' was available in both z3 and z2, and I'm sure none of the kss folks would mind if someone were to globally replace 'RESPONSE' with 'response' in the kss codebase, since it's fully backwards compatible. Alec On 8/4/07, Philipp von Weitershausen wrote: > Philipp von Weitershausen wrote: > > There's no request.RESPONSE in Zope3. Fortunately, *both* Zope 2 and > > Zope 3 have request.response (lower case). > > Ping? > > This problem really obstructs us from using KSS in Zope 3 / Grok. > > > -- > http://worldcookery.com -- Professional Zope documentation and training > > _______________________________________________ > Kss-devel mailing list > Kss-devel at codespeak.net > http://codespeak.net/mailman/listinfo/kss-devel > From jeroen.vloothuis at xs4all.nl Sun Aug 5 10:32:05 2007 From: jeroen.vloothuis at xs4all.nl (Jeroen Vloothuis) Date: Sun, 5 Aug 2007 10:32:05 +0200 Subject: [Kss-devel] Please stop using request.RESPONSE In-Reply-To: <365118370708040952y5743cbd7v6efe9b302cb76323@mail.gmail.com> References: <365118370708040952y5743cbd7v6efe9b302cb76323@mail.gmail.com> Message-ID: <200708051032.06170.jeroen.vloothuis@xs4all.nl> On Saturday 04 August 2007 18:52:41 Alec Mitchell wrote: > I for one was glad to learn that 'response' was available in both z3 > and z2, and I'm sure none of the kss folks would mind if someone were > to globally replace 'RESPONSE' with 'response' in the kss codebase, > since it's fully backwards compatible. I just changed all occurences and the tests still pass. From philipp at weitershausen.de Sun Aug 5 12:11:57 2007 From: philipp at weitershausen.de (Philipp von Weitershausen) Date: Sun, 5 Aug 2007 12:11:57 +0200 Subject: [Kss-devel] Please stop using request.RESPONSE In-Reply-To: <200708051032.06170.jeroen.vloothuis@xs4all.nl> References: <365118370708040952y5743cbd7v6efe9b302cb76323@mail.gmail.com> <200708051032.06170.jeroen.vloothuis@xs4all.nl> Message-ID: On 5 Aug 2007, at 10:32 , Jeroen Vloothuis wrote: > On Saturday 04 August 2007 18:52:41 Alec Mitchell wrote: >> I for one was glad to learn that 'response' was available in both z3 >> and z2, and I'm sure none of the kss folks would mind if someone were >> to globally replace 'RESPONSE' with 'response' in the kss codebase, >> since it's fully backwards compatible. > > I just changed all occurences and the tests still pass. Thanks! From hedley at upfrontsystems.co.za Wed Aug 15 14:31:28 2007 From: hedley at upfrontsystems.co.za (Hedley Roos) Date: Wed, 15 Aug 2007 14:31:28 +0200 Subject: [Kss-devel] Large response goes missing Message-ID: <46C2F220.8080008@upfrontsystems.co.za> I have a case where a large amount of data (990k) is returned to the browser. The network environment is on a LAN. Sometimes my HTML appears in the browser, sometimes it doesn't. And it takes too long even if it works, so I have to change my design. Is there a way to periodically flush the commands with azax? Thanks Hedley From denis.mishunoff at gmail.com Wed Aug 15 17:03:01 2007 From: denis.mishunoff at gmail.com (Denis Mishunov) Date: Wed, 15 Aug 2007 18:03:01 +0300 Subject: [Kss-devel] problem with effects in Opera and IE Message-ID: Hello, guys. I am working on my custom kss action currently and have problem with the effects. I did my best to locate the problem and here are my investigations. I think I might note I do it on Plone, so, that you can think this can be related to some registering things in it. Anyway: Current environment ================ 1. prototype.js and effects.js enabled 2. KSS in production mode, so ++resource++kukit.js is available for me on Plone that contains my action's JS along with KSS core. 3. Tested browsers - FF, Safari, Opera (Mac), IE7 (Windows) Task ==== Create a KSS action that would show "backdrop" for the whole site's screen clicking on the image's thumbnail as it is done on many-many sites when you get the preview of an image or something like that. But here it is simple - only backdrop for now no preview, no nothing. Current implementation ================== Liisting of my action - http://paste.plone.org/16265. Big kudos goes to Lokesh Dhakar (http://huddletogether.com/projects/lightbox2/) for his Lightbox 2 script that I use as a basis for my action. In common what it does is - create the DIV as the last child of BODY, set it's width and height to fully cover the BODY object. Afterwards we have two effects - for appearance of that DIV being semi-transparent and another one to fade that DIV out again so that it is not visible. Problem ======= And here goes interesting part. As you can see, my action uses nothing fancy. Only two effects: Effect.Fade and Effect.Appear. Both should work in any browser. You can make sure in this, going to effects demo at script.aculo.us, or trying Lokesh's original Lightbox. But for clear experiment let's rely on demos on script.aculo.us since Lightbox uses much more effect than we need for testing. So far, so good - both my effects should work in all browsers. And they really do work well in all tested browsers, being the standalone JS (sure with some additions to apply 'click' events to the links on page's load). But, then I wrap it with KSS and here the problem appears. I load the page and click the link to which the action is assigned. Action works in FF and Safari only. Both Opera and IE create the DIV #overlay, but nothing more. They just raise JS error. If I wrap both effects with comments, so that they are not available for engine, no errors in any browser. Here is the error that Opera shows in it's log: http://paste.plone.org/16259 IE suggests to run debugger, I run it and it shows the stopper in... While I was testing this behavior, i has been changed somehow. Now I don't get any errors in console. The effect is just not applied in Opera and IE. IE shows that small triangle in the bottom left corner saying that page was displayed with the errors only. This triangle appears only after action is called. When the page loads and action is not invoked, there is no triangle. Possible solutions that were used ========================== I have tried to change behaviors: - got rid of "extending" parameters in effect - tried to put other effects instead of existing ones Both solutions did not work out - behavior remained the same. And now, the Plone's part. When I run all this with debug mode disabled in portal_javascript I have got the described behavior - nothing happens in Opera and IE. When I switch p[ortal_javascript to debug mode, Opera magically does what it should. Though IE still shows that "error triangle". During the testing with debug switched off any change of my action was followed by portal_javascript's reloading, so it can't be a cache issue or something. I'm really confused with this behavior. Please let me know whether I can test it somehow else and provide more detailed report. Please tell me where should I look for a solution to this. For me it is obvious that the problem relates to KSS and not the effects themselves, because pure effects in pure JS work quite nice. Hope you will advise me something or fix this in KSS please :) Thank you. -- Best regards, Denis Mishunov PLONE Design-Skinning-Development mailto:denis.mishunoff at gmail.com IRC: spliter(#plone) From denis.mishunoff at gmail.com Thu Aug 16 08:31:07 2007 From: denis.mishunoff at gmail.com (Denis Mishunov) Date: Thu, 16 Aug 2007 09:31:07 +0300 Subject: [Kss-devel] problem with effects in Opera and IE In-Reply-To: <200708152223.26531.jeroen.vloothuis@pareto.nl> References: <200708152223.26531.jeroen.vloothuis@pareto.nl> Message-ID: <3AA60F2D-D7F1-4CC0-B7B0-7CC6112508ED@gmail.com> Thanks for your response, Jeroen. On Aug 15, 2007, at 11:23 PM, Jeroen Vloothuis wrote: > Denis Mishunov wrote: > >> And they really do work well in all tested >> browsers, being the standalone JS (sure with some additions to apply >> 'click' events to the links on page's load). > > Have you tried this inside Plone or only on some demo HTML? Both. I have done the simple JS file in Plone with the same effects and they worked. But I need to pass parameters to my JS script, so can't go with simple JS way and I'm not sure how to use the pure ajax (I'm really new to ajax technology. But not JS). So, the only way for me now is KSS and it doesn't work for me. > >> But, then I wrap it with KSS and here the problem appears. I load the >> page and click the link to which the action is assigned. Action works >> in FF and Safari only. Both Opera and IE create the DIV #overlay, but >> nothing more. They just raise JS error. If I wrap both effects with >> comments, so that they are not available for engine, no errors in any >> browser. > > I assume that you have not yet tried KSS in your static setup. You can > easily do this to make sure there is no interference from either > packing or > some other Javascript in Plone. You can look for an example on how > to use > KSS without any server at: > > http://codespeak.net/svn/kukit/euro-python-2007/ > http://codespeak.net/svn/kukit/euro-python-2007/static-demo.html Ok, will try, thanks > >> And now, the Plone's part. When I run all this with debug mode >> disabled in portal_javascript I have got the described behavior - >> nothing happens in Opera and IE. When I switch p[ortal_javascript to >> debug mode, Opera magically does what it should. > > This could be either a caching or a packing problem. Does the error > reappear > when you turn debug mode off again? Yes, it does reappear. -- Best regards, Denis Mishunov PLONE Design-Skinning-Development mailto:denis.mishunoff at gmail.com IRC: spliter(#plone) From jeroen.vloothuis at pareto.nl Wed Aug 15 22:23:26 2007 From: jeroen.vloothuis at pareto.nl (Jeroen Vloothuis) Date: Wed, 15 Aug 2007 22:23:26 +0200 Subject: [Kss-devel] problem with effects in Opera and IE In-Reply-To: References: Message-ID: <200708152223.26531.jeroen.vloothuis@pareto.nl> Denis Mishunov wrote: > And they really do work well in all tested > browsers, being the standalone JS (sure with some additions to apply > 'click' events to the links on page's load). Have you tried this inside Plone or only on some demo HTML? > But, then I wrap it with KSS and here the problem appears. I load the > page and click the link to which the action is assigned. Action works > in FF and Safari only. Both Opera and IE create the DIV #overlay, but > nothing more. They just raise JS error. If I wrap both effects with > comments, so that they are not available for engine, no errors in any > browser. I assume that you have not yet tried KSS in your static setup. You can easily do this to make sure there is no interference from either packing or some other Javascript in Plone. You can look for an example on how to use KSS without any server at: http://codespeak.net/svn/kukit/euro-python-2007/ http://codespeak.net/svn/kukit/euro-python-2007/static-demo.html > And now, the Plone's part. When I run all this with debug mode > disabled in portal_javascript I have got the described behavior - > nothing happens in Opera and IE. When I switch p[ortal_javascript to > debug mode, Opera magically does what it should. This could be either a caching or a packing problem. Does the error reappear when you turn debug mode off again? From jeroen.vloothuis at pareto.nl Wed Aug 15 22:26:02 2007 From: jeroen.vloothuis at pareto.nl (Jeroen Vloothuis) Date: Wed, 15 Aug 2007 22:26:02 +0200 Subject: [Kss-devel] Large response goes missing In-Reply-To: <46C2F220.8080008@upfrontsystems.co.za> References: <46C2F220.8080008@upfrontsystems.co.za> Message-ID: <200708152226.03638.jeroen.vloothuis@pareto.nl> On Wednesday 15 August 2007 14:31:28 Hedley Roos wrote: > Sometimes my HTML appears in the browser, sometimes it doesn't. And it > takes too long even if it works, so I have to change my design. Is there > a way to periodically flush the commands with azax? What do you mean with flushing the commands? Commands are sent in response to a request and then processed on the browser. Do you want to interrupt/abort the browser processing? From jeroen.vloothuis at xs4all.nl Fri Aug 17 16:17:01 2007 From: jeroen.vloothuis at xs4all.nl (Jeroen Vloothuis) Date: Fri, 17 Aug 2007 16:17:01 +0200 Subject: [Kss-devel] New design mockup Message-ID: <200708171617.01797.jeroen.vloothuis@xs4all.nl> The designer created a new mock-up based on the feedback from the previous versions. -------------- next part -------------- A non-text attachment was scrubbed... Name: voorbeeld5.png Type: image/png Size: 37658 bytes Desc: not available Url : http://codespeak.net/pipermail/kss-devel/attachments/20070817/3ac2690e/attachment-0001.png From ree at ree.hu Sat Aug 18 11:14:41 2007 From: ree at ree.hu (Balazs Ree) Date: Sat, 18 Aug 2007 11:14:41 +0200 Subject: [Kss-devel] problem with effects in Opera and IE References: Message-ID: On Wed, 15 Aug 2007 18:03:01 +0300 Denis Mishunov wrote: > But, then I wrap it with KSS and here the problem appears. I load the > page and click the link to which the action is assigned. Action works in > FF and Safari only. Both Opera and IE create the DIV #overlay, but > nothing more. They just raise JS error. If I wrap both effects with > comments, so that they are not available for engine, no errors in any > browser. > > Here is the error that Opera shows in it's log: > http://paste.plone.org/16259 > > IE suggests to run debugger, I run it and it shows the stopper in... > > While I was testing this behavior, i has been changed somehow. Now I > don't get any errors in console. The effect is just not applied in Opera > and IE. IE shows that small triangle in the bottom left corner saying > that page was displayed with the errors only. This triangle appears only > after action is called. When the page loads and action is not invoked, > there is no triangle. Let's summarize how I understand it: - your kss action, in FF, works - your kss action, in Opera and IE, fails (first you got javascript error, with the pasted code you get no error but nothing happens) - your version of javascript code that does not interface with kss works - your kss action even works in Opera, when kss is put into Production mode (while same thing failed to work in Development mode) Is this all correct? Well if this is the case then there is chance you have a packing problem. Since we apply safe packing on your plugin, if in Production mode. Unfortunately it is quite easy to write code withoug noticing, that will fail after packing. The packer itself contains bugs too. I have substantial experience in this since I have spent hours spotting errors of this kind in the kss code. I can already see you have missing semicolons in your code: objOverlay.onclick = function() {myBackdrop.end();} needs one in the end, and also, arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) I cannot say if these solve the problem; in addition to the plugin itself, could you provide an example html (like we do in kss.demo) that enables me to test the plugin in a simple way? This could be a html that also triggers the problem for you. If you could give me this, I will debug this further and help you fix the problem (including, if kss needs a fix). Thanks for your time for spending in this! -- Balazs Ree From ree at ree.hu Sat Aug 18 17:02:11 2007 From: ree at ree.hu (Balazs Ree) Date: Sat, 18 Aug 2007 17:02:11 +0200 Subject: [Kss-devel] New design mockup References: <200708171617.01797.jeroen.vloothuis@xs4all.nl> Message-ID: Ok, here is my review: In overall, it looks good and it is definitely going to somewhere. Nice work. Now I would like to visit the elements one by one. 1. I like the paletta. The greys with the "kss orange" makes it really elegant. 2. The logo: looks good in placement and proportion. It is also good that the text is next to it. The line "KSS, doing AJAX with style" is something I also like a lot. Maybe we want AJAX with all capitals. However for some reason I don't like the way the text is rendered, I think we should try changing something with it, either make it bigger, or choose a diffent font, change alignment... I am not sure. I also would consider not closing the portlet on the top with a line, ie, the white region under the logo could extend until the top of the page. 3. The icons are also good. We should first, decide, what icons we need actually in addition to Download and Documentation. (Bugs? Community? Blog?) Maybe we need 4 of them instead of 3, that would make them smaller which may also even look better. Finally, once we decided what iconss we want, they also should be designed so we can see them. 4. I like the way the portlet is designed. Just one remark. The "submenus" is in fact substitutes the navtree menu, ie, how will the "submenus" look like if we have more levels expanded? We may want to decide that we do not allow to show the part of the navtree that goes down till the currently watched item, but we need at least a sublevel. I'd like to see how it would look like with a realistic case and first of all we need to decide how we want its implementation. (This is first possibility, see next point of why maybe we don't need more sublevels after all.) 5. The top menu looks good. Just occurs to me, maybe the "submenus" is supposed to just be the 2nd level of the navigation tree, as next level to the the top menus that are the first level? Then we could actually switch the submenus with kss, when the main menu is hovered. In this case we can drop the concept of the traditional navtree completely. (It is just then they are a bit far away so from navigating first I need to click on the top then on the left, may be a bit inconvenient.) In any way I'd like to get a bit of clarification about the concept of the menus and navigation. Finally some word about missing elements from the mockup. This is more about to initiate a discussion. 6. We need a global site actions and searchbox. Global site actions could be shown for logged in users only or left completely away, but we definitely need the search box and that should be in the mockup. 7. What about the user actions. They can also be shown only for logged in users, well, at least we have to show somewhere who is logged in, and this is not clear where it is intended to be. We can in fact make that into a portlet and have it appear under the news, only for logged in users. WE can also put important things from the site actions, so we have this one "action" portlet. 8. Do we need breadcrumbs? I am personally not a big fan of them, but especially if we have no full navtree, only a menu system with a level and sublevel, I am in doubt if we'd need breadcrumbs. So this is all what I can think of at the moment, but altogether I am pretty enthusiastic. I would like to hear other comments and a discussion about the above mentioned points, especially about the subjects of icons, menus and navigation. Thanks for all the work so far! -- Balazs Ree From denis.mishunoff at gmail.com Sat Aug 18 19:42:36 2007 From: denis.mishunoff at gmail.com (Denis Mishunov) Date: Sat, 18 Aug 2007 20:42:36 +0300 Subject: [Kss-devel] problem with effects in Opera and IE In-Reply-To: References: Message-ID: <403BEEEA-EDAB-4470-B17E-C68FC4DB6F53@gmail.com> Hello Balazs. Thanks for your response on this. >> But, then I wrap it with KSS and here the problem appears. I load the >> page and click the link to which the action is assigned. Action >> works in >> FF and Safari only. Both Opera and IE create the DIV #overlay, but >> nothing more. They just raise JS error. If I wrap both effects with >> comments, so that they are not available for engine, no errors in any >> browser. >> >> Here is the error that Opera shows in it's log: >> http://paste.plone.org/16259 >> >> IE suggests to run debugger, I run it and it shows the stopper in... >> >> While I was testing this behavior, i has been changed somehow. Now I >> don't get any errors in console. The effect is just not applied in >> Opera >> and IE. IE shows that small triangle in the bottom left corner saying >> that page was displayed with the errors only. This triangle >> appears only >> after action is called. When the page loads and action is not >> invoked, >> there is no triangle. > > Let's summarize how I understand it: > > - your kss action, in FF, works right. It works in FF and Safari. > - your kss action, in Opera and IE, fails (first you got javascript > error, with the pasted code you get no error but nothing happens) right. > - your version of javascript code that does not interface with kss > works right > - your kss action even works in Opera, when kss is put into Production > mode (while same thing failed to work in Development mode) not right actually. kss works in Opera when portal_javascript is in debug mode (Development mode for KSS) and fails if debug is disabled (Production mode for KSS). Both cases are tested for Production mode enable for KSS with @@kss_devel_mode/ui. Please, keep in mind - I have added semicolons to the code as you suggest in your response. I have done deeper research with documenting what I do and let me give you this chart: - Debug mode for portal_javascript *disabled* FF - works; Safari - works; Opera raises the error if "Open console on error" preference is enabled in browser. Traceback was provided in the previous email. Nothing happens in Opera if this property disabled in browser. IE6 - "Object doesn't support this property or method" JS error, when I try to click the link with KSS action attached IE7 - "Object doesn't support this property or method" JS error, when I try to click the link with KSS action attached. This browser has debugger enabled, so I have the exact place where the error appears in this browser. Here is that place - http://paste.plone.org/ 16348. Lines 2,3 and 4 are the one line in debugger and have been torn only to show the error place on line 3 that shows debugger as the problematic. - Debug mode for portal_javascript *enabled* FF - works; Safari - works; Opera - works. No errors appear; IE6 - the same error IE7 - the same error and the same line highlighted in debugger, but in more pretty form (since JS file is not merged and compressed in debug mode) - http://paste.plone.org/16349 This is what I have for testing of the action in browsers. > Well if this is the case then there is chance you have a packing > problem. > Since we apply safe packing on your plugin, if in Production mode. What does "packing problem" mean? As I can see from the results there is something with packing, but when portal_javascript merges the files. I can tell this because Opera works in Debug mode and raises error in Production mode. Although this doesn't explain IE errors. > Unfortunately it is quite easy to write code withoug noticing, that > will > fail after packing. The packer itself contains bugs too. I have > substantial experience in this since I have spent hours spotting > errors > of this kind in the kss code. I can already see you have missing > semicolons in your code: > > objOverlay.onclick = function() {myBackdrop.end();} > > needs one in the end, and also, > > arrayPageSize = new Array > (pageWidth,pageHeight,windowWidth,windowHeight) > > I cannot say if these solve the problem; As I have wrote already this doesn't solve the problem and the chart above was done with those semicolons > in addition to the plugin > itself, could you provide an example html (like we do in kss.demo) > that > enables me to test the plugin in a simple way? This could be a html > that > also triggers the problem for you. Not sure I can provide it in the way kss.demo is done, but HTML for this is the following: HTML (simplified) ===== KSS ==== #btest-wrapper a.tileImageWrapper:click { evt-click-preventdefault: true; action-client: shadeSite; } #test-wrapper a.tileImageWrapper img:click { evt-click-preventdefault: true; action-client: shadeSite; } Hope this will be enough for your testing. Thank you. ------------------------------------------------------------------ Denis Mishunov denis at webcouturier.com WEB COUTURIER info at webcouturier.com Web Couturier - making a style in Plone themes. From ree at ree.hu Mon Aug 20 12:48:28 2007 From: ree at ree.hu (Balazs Ree) Date: Mon, 20 Aug 2007 12:48:28 +0200 Subject: [Kss-devel] problem with effects in Opera and IE References: Message-ID: Hi Denis, On Wed, 15 Aug 2007 18:03:01 +0300 Denis Mishunov wrote: > Task > ==== > Create a KSS action that would show "backdrop" for the whole site's > screen clicking on the image's thumbnail as it is done on many-many > sites when you get the preview of an image or something like that. But > here it is simple - only backdrop for now no preview, no nothing. I am not sure: what is your application supposed to do *in its current state* ? I really prefer to start from a state which works straight away and only shows the problems to fix. The html you sent is not sufficient for this. This is not really your fault, we should give more "hints" about what to do and how to do it in a way that we can stick to some conventions when accepting bug reports. Maybe you can help us with this with your experiences. So, I will suggest for future practice that for a minimum, every plugin should come with a "demo" section and selenium tests, we may also want to provide skeletons for that. This will make it easy to decide if we have a kss problem or a general application problem (which is not our task to fix). And we also make it easy for developers to adhere to the conventions. After having fixed the bugs in your javascript, I arrived to a version that works without error on all browser, and that simply does - nothing. It inserts an empty div into the page, does something with resizing, and makes it appear with an effect. Then you can click to it and disappears. So the result of the application as currently is - nothing happens? At this point I am not sure if I have fixed your errors or not. But let's move on. (As a remark I would also add, that just for this you don't need a custom plugin, you could just do this from kss with the existing effects plugins, which could be a bit shaped and parameters added, that noone has added simply because noone has needed them so far. But I assume that you are aiming to arrive to more complexity in the application in the end, which would justify a plugin. In other words, in the end I hope that you will provide a complex, highly parametrized single effect, ready to use for kss and also in many applications.) Any way, I found the following issues in your code. Summarizing: javascript programming is very difficult and requires a lot of expertize. And if you take this as a blame, I assure you we are suffering with the same problems day after day. No wonder we want to take this burden from the shoulders of the Kss Developers, but unfortunately if you decide to develop new plugins, this responsibility just all comes back to you. You have made a lot of errors in this code and well, javascript is a hell when it comes to debugging these. - You have several missing var-s and semicolons, this is unfortunately critical. Because FF runs fine with these errors, but a single missing var blows IE ! In addition it can blow in other ways after packing too, ie. it can happen that if you have one of these errors, your code will run in "Development" mode but not in "Production", which appeared to be your main issue. - extending Element or any existing object is not an "error" but highly risky: libraries like prototype do that, so we know if we use prototype we expect to have the extensions. However this is also the major reason why libraries cannot be used with code from another library that does the same extending and coincides. If you start to do this on an application level, you will make your component coincide with other components and even make the result dependent on the inclusion order of the javascript files. Solution: define these as functions in your private namespace, so your application can use them but you do not affect other components. You actually would not even win with extending Element in this case. - First and major problem: you put the definition for your libraries *inside the kss action*, this will make it inline and this is very wrong. Not because of kss, but because it is inside a function that runs again every time. This way upon each execution a new custom class is created for you, in addition you do not parametrize the classes but you use "element", "overlayDuration", "overlayOpacity" as inline bound variables, whereas in reality they are parameters. In the same way you refer to your object as a global variable (myBackDrop) from your class, this is also not right. - Not a critical error, just a wrong usage pattern of kss: You use "id" as a kss parameter, whereas the correct kss pattern would be to bind the event to the node where you want it to happen, and simply use "oper.node" in your action. (On the other hand if you still use id, you should pass it as a parameter from the kss rule.) - In the completeParms (evaluateParameters) you should always have strings as default values, not booleans as false. Your action needs to expect strings in every case and process them accordingly. - Not an error really, but I suggest to use "window" instead of "self". They are both identical for unknown reason, but "self" is usually used for other purposes. Summarizing. None of your problems are related with kss, but rather with wrong or unclean usage of javascript. That you are saying your code runs without kss ok, does not mean the problem is kss, but means that: - it runs if the definitions are in the global namespace but you should not expect it run the same if you wrongfully put it all inside a function, (Actually it could in some cases, but... just don't do that.) - and that it runs without the packing of kss (and Plone) which can unfortunately break your code if it is not *completely* correct syntactically (meaning, some browsers do execute incorrect code in a sloppy way but other don't and even that after packing it gets worse.) Fix your syntax errors and make your code defined outside the kss action, are the main issues so far. This is as far as I can get, without I don't having your running environment and knowing your further intentions. I am sending you back the code I cleaned up in private, I hope that will help you to continue with it. -- Balazs Ree From ree at ree.hu Mon Aug 20 13:42:21 2007 From: ree at ree.hu (Balazs Ree) Date: Mon, 20 Aug 2007 13:42:21 +0200 Subject: [Kss-devel] problems with KSSAndPloneLayer Message-ID: We have serious problems with KSSAndPloneLayer. For history, we recently spent some days with Daniel and Stephan with cleaning up the layer. First we realized: we must not multiple inherit the layer from PloneSite and KSSLayer, we should single inherit from PloneSite and add the necessary things to the setup with mixins. (PloneSite brings up the kss zcml any way.) Second, that in the layer it is obligatory to have cleanUp to be defined, even as empty. Reasons for this, is the way layers got picked up from superclasses, and that in tests inheriting from PloneSite, we must *not* tear down the CA itself because the tests execute aterwards would need them. The layer is correct now as far as kss tests don't kill out other tests any more and everything works. Or at least, so far it all seemed so. But yesterday I realized that actually none of the zope events owned by kss (that we use to update the portlets if content changed, for example) are listened to in the plone.app.kss and archetypes.kss tests. I have no idea so far, why this happens.) This is actually not new. In archetypes.kss, tests/test_fields.py we have testSaveFieldWithEvents, used to test for the additional updates the events should insert into commands. But these were removed in Sorrento, I believe, to make the asserts satisfied. :( [Probably by me.] In addition the previous test testSaveField, was testing _just_ the main response without the possible effect of events, and called stopListeningToEvents or something to achieve that and prevent the events from happening. This method has also been removed from the kss base view a long time ago, indicating the problem has not occured recently, because the tests would not run without it. If anyone could have a look at this, would be great. First thing would be, that testSaveFieldWithEvents should generate the navigation portlet and breadcrumbs update commands, if events are listened to as they should. (Needless to say: everything works in a live portal, this seems to be a pure testing problem.) Any idea? -- Balazs Ree From hedley at upfrontsystems.co.za Tue Aug 21 14:53:08 2007 From: hedley at upfrontsystems.co.za (Hedley Roos) Date: Tue, 21 Aug 2007 14:53:08 +0200 Subject: [Kss-devel] Large response goes missing In-Reply-To: <200708152226.03638.jeroen.vloothuis@pareto.nl> References: <46C2F220.8080008@upfrontsystems.co.za> <200708152226.03638.jeroen.vloothuis@pareto.nl> Message-ID: <46CAE034.7040403@upfrontsystems.co.za> > What do you mean with flushing the commands? Commands are sent in response to > a request and then processed on the browser. Do you want to interrupt/abort > the browser processing? By flushing I meant a way for azax to output whatever content it has available to the browser, instead of writing one large chunk once. Yes, I do want to interrupt it, but not as some glorified progress bar. I have a case where data that is 900k in size never shows up in the browser and I though that "flushing" would solve that. From hedley at upfrontsystems.co.za Tue Aug 21 15:33:38 2007 From: hedley at upfrontsystems.co.za (Hedley Roos) Date: Tue, 21 Aug 2007 15:33:38 +0200 Subject: [Kss-devel] Binding events to runtime created nodes Message-ID: <46CAE9B2.5010604@upfrontsystems.co.za> Is there a way to bind events to a dynamically created element? I have tried calling kukit.setupEvents() after I create the element but no luck. Thanks Hedley From gotcha at bubblenet.be Tue Aug 21 15:39:07 2007 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Tue, 21 Aug 2007 15:39:07 +0200 Subject: [Kss-devel] Binding events to runtime created nodes In-Reply-To: <46CAE9B2.5010604@upfrontsystems.co.za> References: <46CAE9B2.5010604@upfrontsystems.co.za> Message-ID: <46CAEAFB.1080508@bubblenet.be> Hedley Roos wrote: > Is there a way to bind events to a dynamically created element? I have > tried calling kukit.setupEvents() after I create the element but no luck. > > Thanks > Hedley It is supposed to happen automagically... You do not need to do anything. -- Godefroid Chapelle (aka __gotcha)- BubbleNet http://bubblenet.be From ree at ree.hu Tue Aug 21 16:05:38 2007 From: ree at ree.hu (Balazs Ree) Date: Tue, 21 Aug 2007 16:05:38 +0200 Subject: [Kss-devel] Large response goes missing References: <46C2F220.8080008@upfrontsystems.co.za> <200708152226.03638.jeroen.vloothuis@pareto.nl> <46CAE034.7040403@upfrontsystems.co.za> Message-ID: On Tue, 21 Aug 2007 14:53:08 +0200 Hedley Roos wrote: (jeroen:) >> What do you mean with flushing the commands? Commands are sent in >> response to a request and then processed on the browser. Do you want to >> interrupt/abort the browser processing? > > By flushing I meant a way for azax to output whatever content it has > available to the browser, instead of writing one large chunk once. > Yes, I do want to interrupt it, but not as some glorified progress bar. > I have a case where data that is 900k in size never shows up in the > browser and I though that "flushing" would solve that. Can you please clarify us how, and when, exactly it happens, that kss (azax) sends 900K to the browser? Can you give us enough details that we can reproduce this problem ourselves? -- Balazs Ree From hedley at upfrontsystems.co.za Fri Aug 24 15:18:31 2007 From: hedley at upfrontsystems.co.za (Hedley Roos) Date: Fri, 24 Aug 2007 15:18:31 +0200 Subject: [Kss-devel] Binding events to runtime created nodes In-Reply-To: <46CAEAFB.1080508@bubblenet.be> References: <46CAE9B2.5010604@upfrontsystems.co.za> <46CAEAFB.1080508@bubblenet.be> Message-ID: <46CEDAA7.8010404@upfrontsystems.co.za> > It is supposed to happen automagically... > > You do not need to do anything. > I have a case where I make an ajax call, and the new content of somenode.innerHTML needs KSS bindings for the events to fire. In fact I called setupEvents() incorrectly. Everything works perfectly now. From gotcha at bubblenet.be Fri Aug 24 15:53:16 2007 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Fri, 24 Aug 2007 15:53:16 +0200 Subject: [Kss-devel] Binding events to runtime created nodes In-Reply-To: <46CEDAA7.8010404@upfrontsystems.co.za> References: <46CAE9B2.5010604@upfrontsystems.co.za> <46CAEAFB.1080508@bubblenet.be> <46CEDAA7.8010404@upfrontsystems.co.za> Message-ID: <46CEE2CC.4020304@bubblenet.be> Hedley Roos wrote: >> It is supposed to happen automagically... >> >> You do not need to do anything. >> > > I have a case where I make an ajax call, and the new content of > somenode.innerHTML needs KSS bindings for the events to fire. Can you explain this use case ? Are you doing it from a custom action ? > > In fact I called setupEvents() incorrectly. Everything works perfectly now. I woudl like to understand why you would need to call setupEvents yourself... -- Godefroid Chapelle (aka __gotcha)- BubbleNet http://bubblenet.be