From johnny at johnnydebris.net Mon Jun 2 12:33:54 2008 From: johnny at johnnydebris.net (Guido Wesdorp) Date: Mon, 02 Jun 2008 12:33:54 +0200 Subject: [kupu-dev] Object notation change in kupubasetools.js Message-ID: <4843CC92.4090604@johnnydebris.net> Hi! When I had to dig around in kupubasetools.js a bit, I found that the object notation used there was rather old - methods were defined in-line rather than on the prototype. This is not optimal, although I think in Kupu the impact is rather minimal since objects are instantiated only once, looks a bit ugly and, most importantly, is inconsistent with new code written for Kupu. On these grounds I decided to update the file, change the 'old-style' objects so that methods are set on the prototypes rather than directly on the objects. I've tested Kupu stand-alone (common/kupu.html) and in Silva, and the changes don't seem to break anything there (after fixing some closure issues), but I'm afraid that it may break some other code (e.g. Plone). Please test if everything still works as expected (mostly regarding subclassing), if not see if a rollback to revision 55491 helps and notify me of the problem so I can try to fix... Cheers, Guido From duncan.booth at suttoncourtenay.org.uk Tue Jun 3 15:43:30 2008 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Tue, 3 Jun 2008 13:43:30 +0000 (UTC) Subject: [kupu-dev] Object notation change in kupubasetools.js References: <4843CC92.4090604@johnnydebris.net> Message-ID: Guido Wesdorp wrote: > Hi! > > When I had to dig around in kupubasetools.js a bit, I found that the > object notation used there was rather old - methods were defined in-line > rather than on the prototype. This is not optimal, although I think in > Kupu the impact is rather minimal since objects are instantiated only > once, looks a bit ugly and, most importantly, is inconsistent with new > code written for Kupu. On these grounds I decided to update the file, > change the 'old-style' objects so that methods are set on the prototypes > rather than directly on the objects. > > I've tested Kupu stand-alone (common/kupu.html) and in Silva, and the > changes don't seem to break anything there (after fixing some closure > issues), but I'm afraid that it may break some other code (e.g. Plone). > Please test if everything still works as expected (mostly regarding > subclassing), if not see if a rollback to revision 55491 helps and > notify me of the problem so I can try to fix... > I'll see if I can check your changes. I seem to remember I thought about doing that some time back but the closure issues made it hard to do cleanly (I think that was mostly in the drawer code though rather than kupubasetools). From charlie at begeistert.org Wed Jun 4 10:47:50 2008 From: charlie at begeistert.org (Charlie Clark) Date: Wed, 4 Jun 2008 10:47:50 +0200 Subject: [kupu-dev] Question regarding kupu and Zope 3 Message-ID: Hi, I hope it's okay to ask this question to this list as there doesn't appear to be a separate user's list. I'm hoping to use kupu directly from a browser view. If I understand this correctly the way to do this is specify a field that is based on zope3.field.HTMLBody. According to the interfaces there should also be a widget associated with this which presumably handles posting between the kupu form and the form but I can't find anything. Am I overlooking something or has the widget indeed not been implemented? Charlie -- Charlie Clark Helmholtzstr. 20 D?sseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 From johnny at johnnydebris.net Thu Jun 5 09:37:29 2008 From: johnny at johnnydebris.net (Guido Wesdorp) Date: Thu, 05 Jun 2008 09:37:29 +0200 Subject: [kupu-dev] Object notation change in kupubasetools.js In-Reply-To: References: <4843CC92.4090604@johnnydebris.net> Message-ID: <484797B9.3070301@johnnydebris.net> Duncan Booth wrote: > I'll see if I can check your changes. I seem to remember I thought about > doing that some time back but the closure issues made it hard to do cleanly > (I think that was mostly in the drawer code though rather than > kupubasetools). > > I haven't touched the drawer code... I had given a complete overhaul a try a long time ago already, but it turned out to be too much work to do at once, so figured perhaps an incremental refactoring would make sense... If need be, we could just leave the drawers alone... Cheers, Guido P.S. This work is mostly for Widgeteer, which should in the near future provide a way to easily deploy Kupu as a textarea replacement. I'll let you know when it's 'production ready'. From charlie at begeistert.org Thu Jun 5 09:59:22 2008 From: charlie at begeistert.org (Charlie Clark) Date: Thu, 5 Jun 2008 09:59:22 +0200 Subject: [kupu-dev] Object notation change in kupubasetools.js In-Reply-To: <484797B9.3070301@johnnydebris.net> References: <4843CC92.4090604@johnnydebris.net> <484797B9.3070301@johnnydebris.net> Message-ID: Am 05.06.2008 um 09:37 schrieb Guido Wesdorp: > I haven't touched the drawer code... I had given a complete overhaul a > try a long time ago already, but it turned out to be too much work > to do > at once, so figured perhaps an incremental refactoring would make > sense... If need be, we could just leave the drawers alone... ah, okay. > Cheers, > > Guido > > P.S. This work is mostly for Widgeteer, which should in the near > future > provide a way to easily deploy Kupu as a textarea replacement. I'll > let > you know when it's 'production ready'. Sounds good - we'd then just need to hook into the widgeteer from the formlib widget? Regarding the Zope2 stuff - any sense in updating the code to work with the CMF? Looks like most of the code simply registers the kupu skin -- Charlie Clark Helmholtzstr. 20 D?sseldorf D- 40215 Tel: +49-211-938-5360 GSM: +49-178-782-6226 From johnny at johnnydebris.net Fri Jun 6 08:21:18 2008 From: johnny at johnnydebris.net (Guido Wesdorp) Date: Fri, 06 Jun 2008 08:21:18 +0200 Subject: [kupu-dev] Object notation change in kupubasetools.js In-Reply-To: References: <4843CC92.4090604@johnnydebris.net> <484797B9.3070301@johnnydebris.net> Message-ID: <4848D75E.5050203@johnnydebris.net> Charlie Clark wrote: > Sounds good - we'd then just need to hook into the widgeteer from the > formlib widget? > > I guess that would be an option. To be honest I haven't thought of combining Widgeteer with other (server-side) forms solutions, I guess it can be very useful but I'm not sure what the best way is of doing that. The idea behind Widgeteer is that you create a form with simple, standard form fields, Widgeteer replaces them with complex widgets on the client, using JavaScript. It takes care of graceful fallback (no JS means you just get the simple form field), preserving data between page reloads and navigation (by serializing to the simple form field on unload, and unserializing on load, so the behaviour is the same as for simple form fields) and ease of integration. I think this can be nicely combined with e.g. formlib by just generating the simpler form fields with annotations, but so far I've only used it in situations with hand-crafted forms. > Regarding the Zope2 stuff - any sense in updating the code to work > with the CMF? Looks like most of the code simply registers the kupu skin > I'm not sure, I don't know much about the CMF and I think the Zope 2 stuff hasn't been touched in a long time... Cheers, Guido From duncan.booth at suttoncourtenay.org.uk Mon Jun 9 09:40:34 2008 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Mon, 9 Jun 2008 07:40:34 +0000 (UTC) Subject: [kupu-dev] Object notation change in kupubasetools.js References: <4848D75E.5050203@johnnydebris.net> Message-ID: Guido Wesdorp wrote: > The idea behind Widgeteer is that you create a form with simple, > standard form fields, Widgeteer replaces them with complex widgets on > the client, using JavaScript. It takes care of graceful fallback (no JS > means you just get the simple form field), preserving data between page > reloads and navigation (by serializing to the simple form field on > unload, and unserializing on load, so the behaviour is the same as for > simple form fields) and ease of integration. The problem with widgeteer last time I looked at it was that it tried to put everything inside an iframe which is a problem if you have a small edit area as the drawers especially are likely to need to go outside that area. Have you done anything to address this? From johnny at johnnydebris.net Mon Jun 9 10:08:04 2008 From: johnny at johnnydebris.net (Guido Wesdorp) Date: Mon, 09 Jun 2008 10:08:04 +0200 Subject: [kupu-dev] Object notation change in kupubasetools.js In-Reply-To: References: <4848D75E.5050203@johnnydebris.net> Message-ID: <484CE4E4.3020402@johnnydebris.net> Duncan Booth wrote: > The problem with widgeteer last time I looked at it was that it tried to > put everything inside an iframe which is a problem if you have a small edit > area as the drawers especially are likely to need to go outside that area. > Have you done anything to address this? > > Yes, well, what I did was kick out the drawers... Widgeteer uses the simple pop-up mechanism that the right-click menu in kupu stand-alone uses. Of course this has some drawbacks, but for simple use cases I guess the pop-ups suffice, and for more complex situations the popups can be overridden (e.g. for using fake pop-ups). Do mind that the Widgeteer solution is not meant to replace the 'normal' (rather cumbersome, though very flexible) way of deployment, but as a simple, additional way to deploy Kupu as a textarea replacement (read: I use it in my own custom CMS-ses and in some XML editor I'm working on ;) . Cheers, Guido From kcraig at ucar.edu Mon Jun 9 16:07:10 2008 From: kcraig at ucar.edu (Kelly Craig) Date: Mon, 09 Jun 2008 08:07:10 -0600 Subject: [kupu-dev] Odd not found error Message-ID: <484D390E.6080606@ucar.edu> Hello, I was curious to ask if anyone had encountered this error with kupu (all versions, but 1.4.10 here) while in use with Plone 2.5.3. *Error 404 loading [object Object]linkable *I get this error in a popup alert window (javascript in nature it seems) when trying to pull out the image or internal link drawer via the button(s). The only other hint I can give you in hopes you know why this is happening is a failed GET to URL/%5Bobject%20Object%5Dlinkable where Plone 2.5.3 is serving a not found page. Any ideas? This started happening recently but doesn't correspond to any major changes or updates to kupu or plone/zope. I did uninstall and re-install kupu as well as download and re-deploy a fresh copy of kupu to no avail. Best Regards, Kelly Craig -- Kelly Craig Earth Observing Laboratory | DIR Web Developer II UCAR/NCAR PO Box 3000 Boulder, CO 80301 FL1 - Rm. 2048 Ph: (303) 497-8825 Fx: (303) 497-2044 E-Mail: kcraig at ucar.edu From duncan.booth at suttoncourtenay.org.uk Thu Jun 12 16:30:09 2008 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Thu, 12 Jun 2008 14:30:09 +0000 (UTC) Subject: [kupu-dev] Odd not found error References: <484D390E.6080606@ucar.edu> Message-ID: Kelly Craig wrote: > Hello, > I was curious to ask if anyone had encountered this error with kupu (all > versions, but 1.4.10 here) while in use with Plone 2.5.3. > > *Error 404 loading [object Object]linkable > > *I get this error in a popup alert window (javascript in nature it > seems) when trying to pull out the image or internal link drawer via the > button(s). > The only other hint I can give you in hopes you know why this is > happening is a failed GET to URL/%5Bobject%20Object%5Dlinkable where > Plone 2.5.3 is serving a not found page. > > Any ideas? > This started happening recently but doesn't correspond to any major > changes or updates to kupu or plone/zope. I did uninstall and re-install > kupu as well as download and re-deploy a fresh copy of kupu to no avail. > > Best Regards, > Kelly Craig > I have a vague memory of encountering something along these lines a long time ago. The problem is that for some reason the configuration information passed to kupu is returning a javascript object for lib_prefix instead of a string. I think when this happened before it was because of some javascript library doing things to the browser's XML node prototype which were incompatible with kupu. Anyway the problem is in kupuhelpers.js, LoadDictFromXML (or _load_dict_helper) which should return an object with a string attribute lib_prefix, but in fact it is returning an object for lib_prefix. Someone with access to your system would need to step through the code with a debugger and figure out why this is failing. From kcraig at ucar.edu Thu Jun 12 16:52:14 2008 From: kcraig at ucar.edu (Kelly Craig) Date: Thu, 12 Jun 2008 08:52:14 -0600 Subject: [kupu-dev] Odd not found error In-Reply-To: References: <484D390E.6080606@ucar.edu> Message-ID: <4851381E.8000406@ucar.edu> Hello Duncan, Thank you for your reply. I have two follow up questions for you or anyone else who could know. One: Under the circumstances described by you in your reply, would it be true to assume that the 'cause' of the error, (the passing of an object instead of the correct string element) is the fault of another Product and or javascript library loaded on the affected page and not kupu's direct fault? Two: Is there a quick javascript fix for the LoadDictFromXML which would not fail upon the lacking of a string but the existence of an object? (If so, would this cause catastrophic failure within kupu?) Best regards, Kelly Craig Duncan Booth wrote: > Kelly Craig wrote: > > >> Hello, >> I was curious to ask if anyone had encountered this error with kupu (all >> versions, but 1.4.10 here) while in use with Plone 2.5.3. >> >> *Error 404 loading [object Object]linkable >> >> *I get this error in a popup alert window (javascript in nature it >> seems) when trying to pull out the image or internal link drawer via the >> button(s). >> The only other hint I can give you in hopes you know why this is >> happening is a failed GET to URL/%5Bobject%20Object%5Dlinkable where >> Plone 2.5.3 is serving a not found page. >> >> Any ideas? >> This started happening recently but doesn't correspond to any major >> changes or updates to kupu or plone/zope. I did uninstall and re-install >> kupu as well as download and re-deploy a fresh copy of kupu to no avail. >> >> Best Regards, >> Kelly Craig >> >> > > I have a vague memory of encountering something along these lines a long > time ago. The problem is that for some reason the configuration information > passed to kupu is returning a javascript object for lib_prefix instead of a > string. > > I think when this happened before it was because of some javascript library > doing things to the browser's XML node prototype which were incompatible > with kupu. Anyway the problem is in kupuhelpers.js, LoadDictFromXML (or > _load_dict_helper) which should return an object with a string attribute > lib_prefix, but in fact it is returning an object for lib_prefix. Someone > with access to your system would need to step through the code with a > debugger and figure out why this is failing. > > _______________________________________________ > kupu-dev mailing list > kupu-dev at codespeak.net > http://codespeak.net/mailman/listinfo/kupu-dev > -- Kelly Craig Earth Observing Laboratory | DIR Web Developer II UCAR/NCAR PO Box 3000 Boulder, CO 80301 FL1 - Rm. 2048 Ph: (303) 497-8825 Fx: (303) 497-2044 E-Mail: kcraig at ucar.edu From alexman at seas.ucla.edu Tue Jun 24 01:32:54 2008 From: alexman at seas.ucla.edu (Alex Man) Date: Mon, 23 Jun 2008 16:32:54 -0700 Subject: [kupu-dev] Applying new paragraph style in Kupu 1.3.9/1.4.10 does not do anything at all Message-ID: <200806232333.QAA08022@whittier.seas.ucla.edu> Hi, I have been searching the web and the Plone mailing list for a while and still can't see any mention of this issue. I know this mailing list is for Kupu development but since I couldn't find other lists on http://kupu.oscom.org/ so I am going to try this list. What I did Add a new paragraph style to Kupu (I've tried both versions 1.3.9 and 1.4.10) by * Site Setup -> Kupu visual editor * In the Style text area, add a new line "Keyboard|kbd" * Save What's wrong I can see the new paragraph style Keyboard in the paragraph drop down menu when I edit a page. However, when I highlight some text and select it, nothing happens at all. There is no JavaScript error as I check the error console. The weird thing is, I also added a new style "Heading 5|h5" and it works. Some other tags that work are h2, h3, h4 and the default ones that come with Kupu. The other tags that I tried and didn't work are * Abbreviation|abbr * Acronym|acronym * Computer code|code * Deleted text|del * Short quotation|q I did not touch the HTML filter at all so kbd is not one of the tags that is removed by Kupu. Is it a bug of Kupu? Does anyone have any clue on this issue? I'm using Plone 2.5.5, Kupu 1.3.9/1.4.10 and this happens in both Firefox 3.0 and Internet Explorer 7. I appreciate any help in advance, thanks! Regards, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kupu-dev/attachments/20080623/9784b4e4/attachment.htm From duncan.booth at suttoncourtenay.org.uk Tue Jun 24 09:33:23 2008 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Tue, 24 Jun 2008 07:33:23 +0000 (UTC) Subject: [kupu-dev] Applying new paragraph style in Kupu 1.3.9/1.4.10 does not do anything at all References: <200806232333.QAA08022@whittier.seas.ucla.edu> Message-ID: Alex Man wrote: > * In the Style text area, add a new line "Keyboard|kbd" > * Save > What's wrong > What's wrong is that kbd isn't a supported tag. From alexman at seas.ucla.edu Tue Jun 24 19:40:44 2008 From: alexman at seas.ucla.edu (Alex Man) Date: Tue, 24 Jun 2008 10:40:44 -0700 Subject: [kupu-dev] Applying new paragraph style in Kupu 1.3.9/1.4.10 does not do anything at all In-Reply-To: References: <200806232333.QAA08022@whittier.seas.ucla.edu> Message-ID: <200806241741.KAA19942@whittier.seas.ucla.edu> Dear Duncan, Thanks a lot for your reply. Now I have two questions: * Where can I get a list of the supported/unsupported tags in Kupu? * Is there any way to make an unsupported tag supported (perhaps by modifying some Python code)? Thank you so much! At 12:33 AM 6/24/2008, Duncan Booth wrote: >Alex Man wrote: > > > * In the Style text area, add a new line "Keyboard|kbd" > > * Save > > What's wrong > > > >What's wrong is that kbd isn't a supported tag. > >_______________________________________________ >kupu-dev mailing list >kupu-dev at codespeak.net >http://codespeak.net/mailman/listinfo/kupu-dev Regards, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kupu-dev/attachments/20080624/454061cc/attachment.htm From soeren-ruttkowski at gmx.de Mon Jun 30 22:13:56 2008 From: soeren-ruttkowski at gmx.de (=?ISO-8859-15?Q?S=F6ren_Ruttkowski?=) Date: Mon, 30 Jun 2008 22:13:56 +0200 Subject: [kupu-dev] kupu and the personalize form Message-ID: <48693E84.5070203@gmx.de> Hi there, I would like to use kupu for some fields in the personalize_form in plone. Thats the site you can change your preferences with. I already used the macros and get the edit field in the form, but I don't get the HTML-Code from the portal_memberdata into the kupu editor. Is there a variable I can set or some other way to get the code into the editor? If anyone likes I can send my personalize_form code, but only if it is really needed. Thanks a lot S?ren