From lee at designkiln.com Mon Feb 9 17:39:45 2009 From: lee at designkiln.com (Lee Joramo) Date: Mon, 9 Feb 2009 09:39:45 -0700 Subject: [Kss-devel] Pre-caching images Message-ID: <7AD4D901-D489-46AD-88FB-CC785346FE54@designkiln.com> I have setup a small KSS that swaps images when you mouse over anchor tags. This works fine on the fast local network, but I need to pre- cache the images some how for it to work on the live server. How can I get KSS to pre-cache images? To see the example I am working on hover over the various Pledge Level links at: http://kafm.designkiln.com/#pledgeNow Below are a slightly simplified version of my HTML and KSS: Many Thanks -- Lee Joramo / designKiln.com / 970.261.8426 HTML: Page 1 Page 2 Page 3 KSS: #link1:mouseover { action-client: setAttribute; setAttribute-kssSelector: "#myImage"; setAttribute-name: "src"; setAttribute-value: "/images/1.jpg"; } #link2:mouseover { action-client: setAttribute; setAttribute-kssSelector: "#myImage"; setAttribute-name: "src"; setAttribute-value: "/images/2.jpg"; } #link3:mouseover { action-client: setAttribute; setAttribute-kssSelector: "#myImage"; setAttribute-name: "src"; setAttribute-value: "/images/3.jpg"; } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kss-devel/attachments/20090209/8dd71209/attachment.htm From gotcha at bubblenet.be Mon Feb 9 18:09:47 2009 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Mon, 09 Feb 2009 18:09:47 +0100 Subject: [Kss-devel] Pre-caching images In-Reply-To: <7AD4D901-D489-46AD-88FB-CC785346FE54@designkiln.com> References: <7AD4D901-D489-46AD-88FB-CC785346FE54@designkiln.com> Message-ID: <4990635B.9080502@bubblenet.be> Lee Joramo wrote: > I have setup a small KSS that swaps images when you mouse over anchor > tags. This works fine on the fast local network, but I need to pre-cache > the images some how for it to work on the live server. How can I get > KSS to pre-cache images? > > To see the example I am working on hover over the various Pledge Level > links at: > > http://kafm.designkiln.com/#pledgeNow > > > Below are a slightly simplified version of my HTML and KSS: > > Many Thanks > > -- > Lee Joramo > / designKiln.com > / 970.261.8426 > > > > HTML: > > > Page 1 > Page 2 > Page 3 > > > KSS: > > #link1:mouseover { > action-client: setAttribute; > setAttribute-kssSelector: "#myImage"; > setAttribute-name: "src"; > setAttribute-value: "/images/1.jpg"; > } > #link2:mouseover { > action-client: setAttribute; > setAttribute-kssSelector: "#myImage"; > setAttribute-name: "src"; > setAttribute-value: "/images/2.jpg"; > } > #link3:mouseover { > action-client: setAttribute; > setAttribute-kssSelector: "#myImage"; > setAttribute-name: "src"; > setAttribute-value: "/images/3.jpg"; > } > > In your case, I would not use a img tag. I would use a div tag, and use css to specify size and background image. That background image would actually be composed of sprites (iow a single image that includes your images). KSS would then only specify he background offset instead of changing the source. HTH -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From ree at ree.hu Wed Feb 11 07:36:24 2009 From: ree at ree.hu (Balazs Ree) Date: Wed, 11 Feb 2009 07:36:24 +0100 Subject: [Kss-devel] FireBug 1.3.2 works now with kss? Message-ID: Hi! We had problems with kss running on FF3 when FireBug 1.3 is installed. It seems these problems are gone, when upgrading to FireBug 1.3.2. If you can, please test this: install or upgrade FireBug to 1.3.2 and see if you experience any issues with kss? p.s. FireKiss still needs an update to work with FireBug 1.3.2, so please try without FireKiss for the time. Best wishes, -- Balazs Ree From lee at designkiln.com Wed Feb 11 21:59:28 2009 From: lee at designkiln.com (Lee Joramo) Date: Wed, 11 Feb 2009 13:59:28 -0700 Subject: [Kss-devel] Pre-caching images In-Reply-To: <4990635B.9080502@bubblenet.be> References: <7AD4D901-D489-46AD-88FB-CC785346FE54@designkiln.com> <4990635B.9080502@bubblenet.be> Message-ID: <63748AFE-274A-4AF2-A64B-0D718B3075B9@designkiln.com> Thanks, Our right, css sprites did the trick nicely Thanks -- Lee Joramo / designKiln.com / 970.261.8426 > > In your case, I would not use a img tag. I would use a div tag, and > use css to specify size and background image. > > That background image would actually be composed of sprites (iow a > single image that includes your images). KSS would then only specify > he background offset instead of changing the source. > > HTH > > -- > Godefroid Chapelle (aka __gotcha) http://bubblenet.be From ree at ree.hu Sat Feb 21 09:04:25 2009 From: ree at ree.hu (Balazs Ree) Date: Sat, 21 Feb 2009 09:04:25 +0100 Subject: [Kss-devel] Can KSS help in my use case ? References: <19C0F851463E4952A89215D7D6B95256@DELLGIOVANNI> <4308f0ba0902191901t4d2cdd59kcb1345d18d5ebd42@mail.gmail.com> <7DA79654A7F24894B8EDDD96F5B947DB@DELLGIOVANNI> <4308f0ba0902201047h6f897375xb60ffefb8eef5dfd@mail.gmail.com> Message-ID: On Fri, 20 Feb 2009 12:47:07 -0600, Nathan Van Gheem wrote: >> But I was wandering whether using KSS would make the whole more clean, >> readable and maintainable. >> > I suppose it might be a little more clean and readable. I think you can > make non-kss code very clean and readable though too. > > I can't speak for all the Plone developers out there, but it seems there > is a growing concern that kss isn't the way to go anymore. It is too > heavy(lots of extra code for the browser to download and parse). IMO, > kss became cumbersome to do easy tasks that were just a bit outside its > capabilities and I'm no longer going to use it anymore. In your use > case it might work though. Kss aims to focus on supporting the following developer roles (with increasing order of knowledge and expertise needed): - developer or designer that wires up a page via a kss stylesheet - developer who develops and sets up an ajax application, by a kss stylesheet and server side kss actions (python) - developer who creates a plugin for kss (in javascript) making it available for use to the above groups. This is needed for kss to provide fat client behaviour for several use cases such as drag and drop or custom javascript widgets. We had moderate success to document the first two activities, but we never arrived to documenting the third one: the making of kss plugins in a simple and accessible way. Those of us who actually wrote kss plugins, also realized that kss lacks some wisdom in this area. During the lessons we learned from encountered use cases and projects, some of us also realized that we need to improve the plugin creation process a great deal. One specific goal is to make plugin creation more accessible for javascript developers and inline with the accustomed js development techniques (while keeping the rest of the kss backwards compatible). Before this happens I can give the following advice on deciding about whether or not deploying kss in a project: - If you don't actually need to have a fat client or write actual javascript code, you can use kss to implement your ajax in the documented way, with all benefits offered. - If you need a fat client, just go ahead and implement your features in javascript "as usual". If you want you can also have some kss code running in parallel with your javascript: although kss won't know about your additional javascript in this case, but it also will peacefully coexist with it. - If you already have your extra javascript running, you would have a chance to make it into a kss plugin: write a wrapper that enables using your new code from within kss. This allows you to wire up and configure your new features from kss, and provide the same code as a kss plugin egg, reusable in other applications without touching the javascript. Since the last step and process involved is the undocumented one that I mentioned above, I would only suggest to attempt it if you have deep knowledge about both javascript and understand bits of the kss internals. In particular I would not suggest to dig into "kss event creation", however for simple cases it is easy to create just "kss actions" (and for this you will also find some documentation and examples). I would also like to react a bit about performance. We believe there is a lot we can improve here, one of my personal development plans is called "zerotolerance": and it aims to implement **0 pageload overhead** in kss. (Yes we figured out a feasible way to do that.) So, although we cannot promise an immediate remedy to the above stated problems, development of kss is going on with some exciting goals to reach by the end of 2009. Best wishes, -- Balazs Ree