From pete-lists at bcmpweb.com Thu Nov 2 22:20:08 2006 From: pete-lists at bcmpweb.com (Peter Simmons) Date: Fri, 03 Nov 2006 10:20:08 +1300 Subject: [kupu-dev] Disabling some kupu buttons on some fields but not others for only some roles/permissions Message-ID: Hi, We have a Plone site. We want the full capability for Administrators always, we only want some of the buttons (not external link button for example) for Members on that site. I was wondering if there was anyway to do this or where I should start looking. I guess I am asking are the buttons on kupu configurable by permission? I confuse I am not even sure of how to override the buttons at all so any help is much appreciated. Cheers, Pete From duncan.booth at suttoncourtenay.org.uk Fri Nov 3 09:47:33 2006 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Fri, 3 Nov 2006 08:47:33 +0000 (UTC) Subject: [kupu-dev] Disabling some kupu buttons on some fields but not others for only some roles/permissions References: Message-ID: Peter Simmons wrote: > We have a Plone site. > > We want the full capability for Administrators always, we only want some > of the buttons (not external link button for example) for Members on > that site. > > I was wondering if there was anyway to do this or where I should start > looking. > > I guess I am asking are the buttons on kupu configurable by permission? That is one of the requests which came from the BoF session at the Plone conference. It looks like the ability to customise the buttons by permission or condition is a common request. > > I confuse I am not even sure of how to override the buttons at all so > any help is much appreciated. > Right now, the way to do it is to edit the relevant .kupu files and insert tal:condition attributes on appropriate buttons. Then rebuild the widget template using 'make'. I think a longer term solution will be to add another configlet tab which lists all of the buttons and lets you select an (optional) permission and/or condition for each one. Then change all the of the .kupu stuff to query the tool for each button. I'm not sure when (or if) I can do that: the main problem is actually going to be hitting myself over the head enough until I can persuade myself that that is *all* the functionality which really needs to be added, and not the ability to drag/drop reorder the buttons in the configlet tab, add new buttons, edit the associated helptext, ... Or of course someone else could always do it first. From duffyd at kokorice.org Mon Nov 6 01:26:23 2006 From: duffyd at kokorice.org (Tim Knapp) Date: Mon, 06 Nov 2006 14:11:23 +1345 Subject: [kupu-dev] Creating Archetype Reference When Creating Internal Link In Kupu Message-ID: <1162772784.3745.10.camel@localhost.localdomain> Hello, For a client project, we were thinking one potential way of keeping track of 'broken internal links' would be to modify kupu so that it creates a reference in the reference_catalog each time you create an internal link, i.e. via the link drawer (also potentially the back ref could be deleted when the 'red cross' is clicked). This would allow us to create an object action that lists all pages that link to the current object (by doing a getBackReferences). Does this kind of functionality sound feasible? Thanks in advance, Tim From duncan.booth at suttoncourtenay.org.uk Mon Nov 6 10:03:58 2006 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Mon, 6 Nov 2006 09:03:58 +0000 (UTC) Subject: [kupu-dev] Creating Archetype Reference When Creating Internal Link In Kupu References: <1162772784.3745.10.camel@localhost.localdomain> Message-ID: Tim Knapp wrote: > For a client project, we were thinking one potential way of keeping > track of 'broken internal links' would be to modify kupu so that it > creates a reference in the reference_catalog each time you create an > internal link, i.e. via the link drawer (also potentially the back ref > could be deleted when the 'red cross' is clicked). This would allow us > to create an object action that lists all pages that link to the current > object (by doing a getBackReferences). Does this kind of functionality > sound feasible? Yes it is perfectly feasible. We list all forward and backward references from an object on our workflow tab, and we use the references to automatically workflow certain types of object (images, link objects) which are referenced from the html when the main document is workflowed. See the kupu documentation (documentation tab in the configlet or kupu/doc/PLONE2.txt): References from HTML text ------------------------- Kupu can be made to store archetypes references for any HTML field. You can use these references for a variety of purposes, e.g. when publishing a document you could automatically publish all the contained images. To enable this feature for a particular field, you need to change the type of the field from ``TextField`` to ``ReftextField``:: from Products.kupu.plone.ReftextField import ReftextField then define your field as:: Reftextfield('bodyCopy', required=1, searchable=1, relationship='bodyCopy', widget=RichWidget (description='Please paste or type your article here', label='Body Copy', parastyles=( ('div|pullQuote','Pull Quote'), ('div|Caption','Caption'), ('div|contactInformation','Contact Information'), ('div|notesToEditors','Notes to editors'), ), ), ), the ``ReftextField`` type is identical to the existing ``TextField`` except that it also extracts references from the HTML text whenever the field is saved. The relationship used to hold the references may be specified as shown, but if omitted it defaults to the field name. If the HTML contains an invalid reference, e.g. a link to an object that has since been deleted, ``ReftextField`` will completely ignore that link. From duncan.booth at suttoncourtenay.org.uk Sun Nov 12 18:14:00 2006 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Sun, 12 Nov 2006 17:14:00 +0000 (UTC) Subject: [kupu-dev] Kupu 1.3.9 Message-ID: I've uploaded kupu 1.3.9 to http://plone.org/products/kupu This release adds support for Internet Explorer 1.7. From florian.schulze at gmx.net Sun Nov 12 18:50:42 2006 From: florian.schulze at gmx.net (Florian Schulze) Date: Sun, 12 Nov 2006 18:50:42 +0100 Subject: [kupu-dev] Kupu 1.3.9 References: Message-ID: On Sun, 12 Nov 2006 18:14:00 +0100, Duncan Booth wrote: > I've uploaded kupu 1.3.9 to http://plone.org/products/kupu > > This release adds support for Internet Explorer 1.7. Can we just take it's sarissa as is for Plone? AFAIK you backported only the IE7 fixes, right? Regards, Florian Schulze From joao.eiras at gmail.com Tue Nov 14 05:29:10 2006 From: joao.eiras at gmail.com (Joao Eiras) Date: Tue, 14 Nov 2006 04:29:10 -0000 Subject: [kupu-dev] Online demo fails to start in Opera Message-ID: The demo at http://debris.demon.nl:7080/kupu_nightly/kupu/common/kupu.cgi doesnt' work in Oepra by default because of this minor assumption in the script, explained here https://dev.plone.org/plone/ticket/5688 Basically, this piece of code in kupustart.js breaks because it doesn't have the rv: token in its ua string. var re = /rv:([0-9\.]+)/ var match = re.exec(navigator.userAgent) if (match[1] && parseFloat(match[1]) > 1.6) { addEventHandler(window, 'beforeunload', saveOnPart); } else { So just change the if to if (match && match[1] && parseFloat(match[1]) > 1.6) { Bye. From g.bernhard at akbild.ac.at Thu Nov 16 10:21:13 2006 From: g.bernhard at akbild.ac.at (bernhard) Date: Thu, 16 Nov 2006 10:21:13 +0100 Subject: [kupu-dev] hr size width Message-ID: Hello, kupu develpoers! We are using Plone for our new Homepage and feature kupu as editor :-) I have a problem, though: How can I prevent kupu from adding the attributes size="2" and width="100%" to hr tags? Whenever I try to validate a "HTML 4.01 Strict" Page with a hr tag created by kupu the w3c Markup Validation Service Failes. Thank you very much for your help! Regards Gogo. Academy of Fine Arts Vienna From duncan.booth at suttoncourtenay.org.uk Fri Nov 17 10:05:47 2006 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Fri, 17 Nov 2006 09:05:47 +0000 (UTC) Subject: [kupu-dev] Kupu 1.3.9 References: Message-ID: "Florian Schulze" wrote: > On Sun, 12 Nov 2006 18:14:00 +0100, Duncan Booth > wrote: > >> I've uploaded kupu 1.3.9 to http://plone.org/products/kupu >> >> This release adds support for Internet Explorer 1.7. > > Can we just take it's sarissa as is for Plone? AFAIK you backported > only the IE7 fixes, right? > Yes, I just made it detect the native XMLHTTPRequest in IE7 correctly. There shouldn't be any problem just dropping that into Plone. From duncan.booth at suttoncourtenay.org.uk Fri Nov 17 11:31:40 2006 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Fri, 17 Nov 2006 10:31:40 +0000 (UTC) Subject: [kupu-dev] hr size width References: Message-ID: bernhard wrote: > We are using Plone for our new Homepage and feature kupu as > editor :-) I have a problem, though: > How can I prevent kupu from adding the attributes size="2" and > width="100%" to hr tags? > Whenever I try to validate a "HTML 4.01 Strict" Page with a hr tag > created by kupu the w3c Markup Validation Service Failes. Kupu doesn't add any attributes to hr tags it creates. Your browser may. Just use the Plone configlet to tell kupu to filter out the size and width attributes on the hr tag. From ereteog at gmail.com Sun Nov 19 17:32:34 2006 From: ereteog at gmail.com (ereteog) Date: Sun, 19 Nov 2006 17:32:34 +0100 Subject: [kupu-dev] getSelectedNode IE Message-ID: <22fc8a120611190832t626dd11ak61abbb5f80476897@mail.gmail.com> Hello, I'm working on wiki based on semantic web technologies, sweetwiki, and we are using kupu as editor. We have extended it to add some wiki's features. We have this function, which gets the selected node and perform an action on it (it replaces the node or adds an attribute depending on the type of the node) : function noWikiWord(){ var selectedNode = kupu.getSelectedNode(); if(selectedNode.getAttribute('property') == 'noWikiWord'){ selectedNode.removeAttribute('property'); }else if ( selectedNode.nodeName == 'A'){ var newnode = kupu.getInnerDocument().createElement('span'); newnode.setAttribute('property', 'noWikiWord'); var text = selectedNode.text; var textnode = kupu.getInnerDocument().createTextNode(text); newnode.appendChild(textnode); selectedNode.parentNode.replaceChild(newnode,selectedNode); }else{ var newnode = kupu.getInnerDocument().createElement('span'); newnode.setAttribute('property', 'noWikiWord'); var selection = kupu.getInnerDocument().getSelection(); var textnode = kupu.getInnerDocument().createTextNode(selection); newnode.appendChild(textnode); kupu.insertNodeAtSelection(newnode, 1); } } it works well with firefox but we have a problem wih IE. I've tested and it appears that it's the function "kupu.getSelectedNode();" which doesn't work on IE. I've seen that there is a problem with this function on this discussion: http://codespeak.net/pipermail/kupu-dev/2005-February/001131.html. how can I fix it? -- Guillaume Er?t?o -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kupu-dev/attachments/20061119/985d8e2b/attachment.htm From duncan.booth at suttoncourtenay.org.uk Sun Nov 19 18:05:00 2006 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Sun, 19 Nov 2006 17:05:00 +0000 (UTC) Subject: [kupu-dev] getSelectedNode IE References: <22fc8a120611190832t626dd11ak61abbb5f80476897@mail.gmail.com> Message-ID: ereteog wrote: > it works well with firefox but we have a problem wih IE. I've tested > and it appears that it's the function "kupu.getSelectedNode();" which > doesn't work on IE. > I've seen that there is a problem with this function on this > discussion: > http://codespeak.net/pipermail/kupu-dev/2005-February/001131.html. how > can I fix it? getSelectedNode is a deprecated alias for the parentElement method. You should use the latter name when calling it. According to the thread you indicate getSelectedNode had some problems but they were all fixed. If you think there are further problems with the implementation of parentElement then what you should do is write a unit test which indicates the behaviour you are expecting and which passes on FF but not IE. [When I say the problems were all fixed, I mean fixed for IE. Unfortunately two of the relevant tests still fail for opera.] From joao.eiras at gmail.com Mon Nov 20 09:11:30 2006 From: joao.eiras at gmail.com (Joao Eiras) Date: Mon, 20 Nov 2006 08:11:30 -0000 Subject: [kupu-dev] Test unit no go Message-ID: currently the testunit doesn't work http://debris.demon.nl:7080/kupu_nightly/kupu/tests/run_tests.html Testcase is undefined :p Seems ecmaunit.js file is missing From johnny at debris.demon.nl Mon Nov 20 09:28:51 2006 From: johnny at debris.demon.nl (Johnny deBris) Date: Mon, 20 Nov 2006 09:28:51 +0100 Subject: [kupu-dev] Test unit no go In-Reply-To: References: Message-ID: <45616743.8070108@debris.demon.nl> Joao Eiras wrote: > > Testcase is undefined :p > > Seems ecmaunit.js file is missing > My mistake, should be fixed now. Cheers, Guido From abanks at seton.org Tue Nov 21 01:33:01 2006 From: abanks at seton.org (Andrew Banks) Date: Mon, 20 Nov 2006 18:33:01 -0600 Subject: [kupu-dev] Paste image? Message-ID: <1164069181.5438.6.camel@4XTV171.seton.org> Is it even possible with Javascript to paste an image? I know that Kupu doesn't do this now, but I am trying to get my coworkers to use Kupu instead of Microsoft Word. They are used to taking screenshots and just pasting them into the user guides they create. I'm not the only one who thinks this is a worthy feature. One person was willing to hire someone to do it: http://www.scriptlance.com/projects/1160760508.shtml From duncan.booth at suttoncourtenay.org.uk Tue Nov 21 14:00:43 2006 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Tue, 21 Nov 2006 13:00:43 +0000 (UTC) Subject: [kupu-dev] Paste image? References: <1164069181.5438.6.camel@4XTV171.seton.org> Message-ID: Andrew Banks wrote: > Is it even possible with Javascript to paste an image? Not so far as I know. If the image doesn't exist on the server, I don't think Javascript has any way to get hold of the image data and create an object on the server. > > I know that Kupu doesn't do this now, but I am trying to get my > coworkers to use Kupu instead of Microsoft Word. They are used to taking > screenshots and just pasting them into the user guides they create. You can copy/paste an image from IE, but it copies the original image tag and that isn't usually what you wanted. I'm not sure what FF does: it will happily offer the paste menu option after you've copied an image but nothing gets pasted. From gsakurai at gmail.com Fri Nov 24 19:32:38 2006 From: gsakurai at gmail.com (Gerson Sakurai) Date: Fri, 24 Nov 2006 15:32:38 -0300 Subject: [kupu-dev] Plone upgrade problem Message-ID: <8004e2cc0611241032h28fc3e0dn2a96e2741eff6825@mail.gmail.com> Hi I'm trying to upgrade an plone site version 2.0.5 to 2.1.4. A have many little problems to deal but one of this problems is about a kupu problem. Using the old plone site I see in source code that the css and js is loaded under the tag
And in the 2.1.4 plone site the css and js is not load. Looking in the source code of new kupu kupu_wysiwyg_support.html have some conditions to css and js to load. In this plone tools is necessary some especial configuration to load correctly kupu css and js or I'm wrong in some other thing? Thanks in advance Gerson Sakurai -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kupu-dev/attachments/20061124/852da197/attachment.htm From duncan.booth at suttoncourtenay.org.uk Fri Nov 24 20:10:08 2006 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Fri, 24 Nov 2006 19:10:08 +0000 (UTC) Subject: [kupu-dev] Plone upgrade problem References: <8004e2cc0611241032h28fc3e0dn2a96e2741eff6825@mail.gmail.com> Message-ID: "Gerson Sakurai" wrote: > I'm trying to upgrade an plone site version 2.0.5 to 2.1.4. A have > many little problems to deal but one of this problems is about a kupu > problem. Using the old plone site I see in source code that the css > and js is loaded under the tag >
> And in the 2.1.4 plone site the css and js is not load. > > Looking in the source code of new kupu kupu_wysiwyg_support.html have > some conditions to css and js to load. > > > > In this plone tools is necessary some especial configuration to load > correctly kupu css and js or I'm wrong in some other thing? Try using the quickinstaller to reinstall kupu: the plone upgrade doesn't do it automatically. That should add the appropriate css and js files to the resource registries. From vitalie at gmail.com Thu Nov 30 12:37:03 2006 From: vitalie at gmail.com (Vitalie Cherpec) Date: Thu, 30 Nov 2006 13:37:03 +0200 Subject: [kupu-dev] Kupu and anonymous content submission Message-ID: <3e2aa6190611300337m70e9adbbpe15bd3359e45ee05@mail.gmail.com> Hi! I'm using plone 2.1 and archetypes to develop a website (something like wiki). I do need to allow anonymous users to submit content without login. I do have an TextField with RichWidget and I've customized kupu to show a minimal toolbar. The solution is working fine for logged users, but anonymous users are seeing only a textarea. I've checked kupu's .js and .css files are loaded. Do you have any tips for solving this problem ? Thank you! -- Vitalie Cherpec -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kupu-dev/attachments/20061130/f59591bd/attachment.htm From duncan.booth at suttoncourtenay.org.uk Thu Nov 30 13:04:17 2006 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Thu, 30 Nov 2006 12:04:17 +0000 (UTC) Subject: [kupu-dev] Kupu and anonymous content submission References: <3e2aa6190611300337m70e9adbbpe15bd3359e45ee05@mail.gmail.com> Message-ID: "Vitalie Cherpec" wrote: > I'm using plone 2.1 and archetypes to develop a website (something > like wiki). I do need to allow anonymous users to submit content without > login. I do have an TextField with RichWidget and I've customized kupu > to show a minimal toolbar. The solution is working fine for logged > users, but anonymous users are seeing only a textarea. > > I've checked kupu's .js and .css files are loaded. > Do you have any tips for solving this problem ? Kupu uses the contentUsesKupu.py script in kupu_plone_layer to decide whether to show kupu or a textarea. This script calls: if not tool.isKupuEnabled(REQUEST=REQUEST, context=context, fieldName=fieldname): return False isKupuEnabled takes another keyword parameter allowAnonymous which defaults to False. If you edit/customise contentUsesKupu.py: if not tool.isKupuEnabled(REQUEST=REQUEST, context=context, fieldName=fieldname, allowAnonymous=True): return False then it should work. From vitalie at gmail.com Thu Nov 30 14:17:04 2006 From: vitalie at gmail.com (Vitalie Cherpec) Date: Thu, 30 Nov 2006 15:17:04 +0200 Subject: [kupu-dev] Kupu and anonymous content submission In-Reply-To: References: <3e2aa6190611300337m70e9adbbpe15bd3359e45ee05@mail.gmail.com> Message-ID: <3e2aa6190611300517h1ce012d2l28e60e6d309b1fcc@mail.gmail.com> Thank you! I've customized that script, but when I do submit content as anonymous, that script isn't called (I've inserted a trace line at the begin). I've observed that I can't access the following kupu files as anonymous user (it requires login): /kupulibraries.xml /kupumyitems.xml /kupurecentitems.xml and kupucollection.xml Vitalie On 11/30/06, Duncan Booth wrote: > "Vitalie Cherpec" wrote: > > > I'm using plone 2.1 and archetypes to develop a website (something > > like wiki). I do need to allow anonymous users to submit content without > > login. I do have an TextField with RichWidget and I've customized kupu > > to show a minimal toolbar. The solution is working fine for logged > > users, but anonymous users are seeing only a textarea. > > > > I've checked kupu's .js and .css files are loaded. > > Do you have any tips for solving this problem ? > > Kupu uses the contentUsesKupu.py script in kupu_plone_layer to decide > whether to show kupu or a textarea. This script calls: > > if not tool.isKupuEnabled(REQUEST=REQUEST, context=context, > fieldName=fieldname): > return False > > isKupuEnabled takes another keyword parameter allowAnonymous which defaults > to False. > > If you edit/customise contentUsesKupu.py: > > if not tool.isKupuEnabled(REQUEST=REQUEST, context=context, > fieldName=fieldname, allowAnonymous=True): > return False > > then it should work. > > _______________________________________________ > kupu-dev mailing list > kupu-dev at codespeak.net > http://codespeak.net/mailman/listinfo/kupu-dev > From duncan.booth at suttoncourtenay.org.uk Thu Nov 30 20:31:26 2006 From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth) Date: Thu, 30 Nov 2006 19:31:26 +0000 (UTC) Subject: [kupu-dev] Kupu and anonymous content submission References: <3e2aa6190611300337m70e9adbbpe15bd3359e45ee05@mail.gmail.com> <3e2aa6190611300517h1ce012d2l28e60e6d309b1fcc@mail.gmail.com> Message-ID: "Vitalie Cherpec" wrote: > I've customized that script, but when I do submit content as > anonymous, that script isn't called (I've inserted a trace line at the > begin). There are some other calls to isKupuEnabled, but I didn't think they would be affected. > > I've observed that I can't access the following kupu files as > anonymous > user (it requires login): > > > /kupulibraries.xml > /kupumyitems.xml > /kupurecentitems.xml > and > kupucollection.xml > You need to give anonymous the "Kupu: Query libraries" permission. From georgeleejr at gmail.com Thu Nov 30 20:48:48 2006 From: georgeleejr at gmail.com (George Lee) Date: Thu, 30 Nov 2006 14:48:48 -0500 Subject: [kupu-dev] Pasting HTML into Kupu Message-ID: One of the barriers to using Kupu is that when I've pasted HTML in from an e-mail, many things get handled inconsistently. I haven't tested this thoroughly, but it's things along the lines of: * FIltering and cleaning up the HTML doesn't happen immediately, so the user is not WYSIWYG-ing * Remnant attributes and nested tags make different functionality in the toolbar not work well Are there any suggestions for how to fix this? For instance, is it possible to trigger an HTML cleanup immediately? Can this HTML cleanup include stripping down multiple layers of nesting? Peace, George -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kupu-dev/attachments/20061130/c50ca573/attachment-0001.htm