[kupu-checkins] r55347 - in kupu/branch/kupu-1.4: . common doc mmbase mmbase/drawers mmbase/tools plone plone/kupu_plone_layer plone/profiles/default plone/tests widgeteer
duncan at codespeak.net
duncan at codespeak.net
Wed May 28 15:35:34 CEST 2008
Author: duncan
Date: Wed May 28 15:35:26 2008
New Revision: 55347
Added:
kupu/branch/kupu-1.4/mmbase/tools/searchrelate.jspx
- copied unchanged from r55124, kupu/trunk/kupu/mmbase/tools/searchrelate.jspx
Modified:
kupu/branch/kupu-1.4/__init__.py
kupu/branch/kupu-1.4/common/kupu_kjax.js
kupu/branch/kupu-1.4/common/kupucontentfilters.js
kupu/branch/kupu-1.4/common/kupudrawers.js
kupu/branch/kupu-1.4/common/kuputoolcollapser.js
kupu/branch/kupu-1.4/doc/CHANGES.txt
kupu/branch/kupu-1.4/mmbase/Makefile
kupu/branch/kupu-1.4/mmbase/body-mmbase.kupu (props changed)
kupu/branch/kupu-1.4/mmbase/body.kupu (contents, props changed)
kupu/branch/kupu-1.4/mmbase/contextmenu.kupu (contents, props changed)
kupu/branch/kupu-1.4/mmbase/dist-mmbase.kupu (props changed)
kupu/branch/kupu-1.4/mmbase/drawers.kupu (contents, props changed)
kupu/branch/kupu-1.4/mmbase/drawers/attachments.items.jspx (contents, props changed)
kupu/branch/kupu-1.4/mmbase/drawers/collection.jspx (props changed)
kupu/branch/kupu-1.4/mmbase/drawers/drawer.jspx (props changed)
kupu/branch/kupu-1.4/mmbase/drawers/drawer.xsl.jspx (contents, props changed)
kupu/branch/kupu-1.4/mmbase/drawers/images.items.jspx (props changed)
kupu/branch/kupu-1.4/mmbase/drawers/libraries.jspx (props changed)
kupu/branch/kupu-1.4/mmbase/drawers/library.jspx (contents, props changed)
kupu/branch/kupu-1.4/mmbase/drawers/search.constraints.jspx (contents, props changed)
kupu/branch/kupu-1.4/mmbase/drawers/search.library.jspx (contents, props changed)
kupu/branch/kupu-1.4/mmbase/drawers/segments.items.jspx (props changed)
kupu/branch/kupu-1.4/mmbase/drawers/test.post.jspx (props changed)
kupu/branch/kupu-1.4/mmbase/drawers/texts.items.jspx (props changed)
kupu/branch/kupu-1.4/mmbase/drawers/upload.jspx (props changed)
kupu/branch/kupu-1.4/mmbase/drawers/urls.items.jspx (props changed)
kupu/branch/kupu-1.4/mmbase/head-mmbase.kupu (props changed)
kupu/branch/kupu-1.4/mmbase/head.kupu (contents, props changed)
kupu/branch/kupu-1.4/mmbase/html.kupu (contents, props changed)
kupu/branch/kupu-1.4/mmbase/include.kupu (props changed)
kupu/branch/kupu-1.4/mmbase/index.kupu (props changed)
kupu/branch/kupu-1.4/mmbase/kupuinit.js
kupu/branch/kupu-1.4/mmbase/mmbase.css
kupu/branch/kupu-1.4/mmbase/mmbase.kupu (contents, props changed)
kupu/branch/kupu-1.4/mmbase/saveonpart.kupu (contents, props changed)
kupu/branch/kupu-1.4/mmbase/test.kupu (props changed)
kupu/branch/kupu-1.4/mmbase/toolbar.kupu (contents, props changed)
kupu/branch/kupu-1.4/mmbase/toolboxes.kupu (contents, props changed)
kupu/branch/kupu-1.4/mmbase/wire.kupu (contents, props changed)
kupu/branch/kupu-1.4/mmbase/xmlconfig.kupu (props changed)
kupu/branch/kupu-1.4/plone/html2captioned.py
kupu/branch/kupu-1.4/plone/interfaces.py
kupu/branch/kupu-1.4/plone/kupu2html.py
kupu/branch/kupu-1.4/plone/kupu_config.pt
kupu/branch/kupu-1.4/plone/kupu_plone_layer/kupucollection.xml.pt
kupu/branch/kupu-1.4/plone/libraries.pt
kupu/branch/kupu-1.4/plone/librarytool.py
kupu/branch/kupu-1.4/plone/plonedrawers.py
kupu/branch/kupu-1.4/plone/plonelibrarytool.py
kupu/branch/kupu-1.4/plone/profiles/default/metadata.xml
kupu/branch/kupu-1.4/plone/tests/test_html2captioned.py
kupu/branch/kupu-1.4/plone/tests/test_i18n.py
kupu/branch/kupu-1.4/version.txt
kupu/branch/kupu-1.4/widgeteer/kupuinit.js
kupu/branch/kupu-1.4/widgeteer/kupustyles.css
Log:
Merged trunk revisions 53036-55124, 55125-55128 into kupu-1.4 branch. I think this should bring the branch back in line with the trunk again.
Modified: kupu/branch/kupu-1.4/__init__.py
==============================================================================
--- kupu/branch/kupu-1.4/__init__.py (original)
+++ kupu/branch/kupu-1.4/__init__.py Wed May 28 15:35:26 2008
@@ -39,7 +39,7 @@
except ImportError:
have_cmf = 0
-# test for Plone, removed because Plone isn't supported yet
+# test for Plone
try:
import Products.CMFPlone
have_plone = 1
Modified: kupu/branch/kupu-1.4/common/kupu_kjax.js
==============================================================================
--- kupu/branch/kupu-1.4/common/kupu_kjax.js (original)
+++ kupu/branch/kupu-1.4/common/kupu_kjax.js Wed May 28 15:35:26 2008
@@ -9,7 +9,7 @@
*****************************************************************************/
/* Javascript to aid migration page. */
-function KJax() {};
+function KJax() { this.request_queue = [];};
(function(p){
p._loadXML = function(uri, callback, body, reload, extra) {
function _sarissaCallback() {
@@ -34,15 +34,26 @@
dom = Sarissa.getDomDocument();
dom.loadXML(xmlhttp.responseText);
}
+ if (this.request_queue) {
+ /* Kick off the next chained request before trying
+ * to handle the result of the last one.
+ */
+ this._loadXML.apply(this, this.request_queue.splice(0,1));
+ }
callback.apply(self, [dom, uri, extra]);
};
};
var self = this;
+ /* Make sure our requests are single-threaded. */
+ if (this.xmlhttp) {
+ this.request_queue.push([uri, callback, body, reload, extra]);
+ }
/* load the XML from a uri
calls callback with one arg (the XML DOM) when done
the (optional) body arg should contain the body for the request
*/
var xmlhttp = new XMLHttpRequest();
+ this.xmlhttp = xmlhttp;
var method = body?'POST':'GET';
// be sure that body is null and not an empty string or
// something
@@ -58,9 +69,9 @@
xmlhttp.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
};
xmlhttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
- this.xmlhttp = xmlhttp;
xmlhttp.send(body);
} catch(e) {
+ this.xmlhttp = null;
if (e && e.name && e.message) { // Microsoft
e = e.name + ': ' + e.message;
}
@@ -99,6 +110,11 @@
this.nextRequest();
};
p.nextRequest = function() {
+ var onload = this.xmldata.selectSingleNode('//*[@kj:load]');
+ if (onload) {
+ var js = onload.getAttribute('kj:load');
+ if (js) { eval(js); };
+ };
var next = this.xmldata.selectSingleNode('//*[@kj:next]');
if (next) {
var xmluri = next.getAttribute('kj:next');
@@ -113,7 +129,6 @@
};
};
p.newRequest = function(uri) {
- if (this.xmlhttp) this.xmlhttp.abort();
this._loadXML(uri, this._xmlcallback);
};
p.clearLog = function() {
Modified: kupu/branch/kupu-1.4/common/kupucontentfilters.js
==============================================================================
--- kupu/branch/kupu-1.4/common/kupucontentfilters.js (original)
+++ kupu/branch/kupu-1.4/common/kupucontentfilters.js Wed May 28 15:35:26 2008
@@ -400,6 +400,11 @@
this.badTagAttributes = new this.Set({});
+ // Nasty tags should be initialised from Plone's HTML control panel
+ // but we have a few tags we know for sure aren't going to work
+ // so we can put them in whatever.
+ this.nastyTags = new this.Set({'script':1, 'style':1, 'meta':1, 'title':1});
+
// State array. For each tag identifies what it can contain.
// I'm not attempting to check the order or number of contained
// tags (yet).
@@ -564,7 +569,7 @@
}(this, editor);
// Exclude unwanted tags.
- this.excludeTags(['center']);
+ this.excludeTags(['center', 'meta', 'title']);
if (editor.config && editor.config.htmlfilter) {
this.filterStructure = editor.config.htmlfilter.filterstructure;
@@ -672,9 +677,14 @@
if (n instanceof Array) {
var newp = ownerdoc.createElement('p');
this._xmlCopyAttr(para, newp);
- var ln = n.length-1;
- if (/br/i.test(n[ln].nodeName)) {
- n.splice(ln,1);
+ for (var ln = n.length-1; ln >= 0; ln--) {
+ var nn = n[ln].nodeName.toLowerCase();
+ if (nn=='br' || (nn=='#text' && /^\s*$/.test(n[ln].nodeValue))) {
+ n.splice(ln,1);
+ } else { break; }
+ }
+ if (n.length==0) {
+ continue;
}
for (var j = 0; j < n.length; j++) {
newp.appendChild(n[j]);
@@ -736,6 +746,10 @@
xhtmlnode = null;
}
}
+ } else {
+ // Stripping this tag, maybe we also want to strip the
+ // content of the tag.
+ if (this.nastyTags[nodename]) { return null; }
}
var kids = htmlnode.childNodes;
Modified: kupu/branch/kupu-1.4/common/kupudrawers.js
==============================================================================
--- kupu/branch/kupu-1.4/common/kupudrawers.js (original)
+++ kupu/branch/kupu-1.4/common/kupudrawers.js Wed May 28 15:35:26 2008
@@ -1463,7 +1463,10 @@
var sizeselector = document.getElementsByName('image-size-selector');
if (sizeselector && sizeselector.length > 0) {
sizeselector = sizeselector[0];
- uri += sizeselector.options[sizeselector.selectedIndex].value;
+ var index = sizeselector.selectedIndex;
+ if (sizeselector.length > 0 && index >= 0) {
+ uri += sizeselector.options[index].value;
+ }
}
var radios = document.getElementsByName('image-align');
var imgclass = "";
Modified: kupu/branch/kupu-1.4/common/kuputoolcollapser.js
==============================================================================
--- kupu/branch/kupu-1.4/common/kuputoolcollapser.js (original)
+++ kupu/branch/kupu-1.4/common/kuputoolcollapser.js Wed May 28 15:35:26 2008
@@ -20,11 +20,11 @@
};
for (var i=0; i < this.parent.childNodes.length; i++) {
var child = this.parent.childNodes[i];
- if (child.className == 'kupu-toolbox') {
+ if (child.className.match(/\bkupu-toolbox\b/)) {
var heading = child.getElementsByTagName('h1')[0];
if (!heading) {
throw('heading not found by collapser for toolbox ' +
- child.id);
+ child.id);henadle
};
heading.setAttribute('title', _('click to unfold'));
// find the toolbox's body
@@ -54,7 +54,7 @@
};
};
addEventHandler(heading, 'click', handler, body, heading);
- if (initial_state[child.id] === undefined ||
+ if (initial_state[child.id] === undefined ||
initial_state[child.id] == '0') {
body.style.display = 'none';
} else {
@@ -98,12 +98,12 @@
var body = this.getToolBody(child);
current_state[child.id] = body.style.display == 'none' ? '0' : '1';
};
-
+
var exp = new Date();
// 100 years before state is lost... should be enough ;)
exp.setTime(exp.getTime() + (100 * 365 * 24 * 60 * 60 * 1000));
- var cookie = 'initial_state=' +
- escape(this.serializeMapping(current_state)) +
+ var cookie = 'initial_state=' +
+ escape(this.serializeMapping(current_state)) +
';' +
'expires=' + exp.toGMTString() + ';' +
'path=/';
@@ -112,7 +112,7 @@
ToolCollapser.prototype.serializeMapping = function(mapping) {
/* serializes the config dict into a string that can be evalled
-
+
works only for dicts with string values
*/
if (typeof(mapping) == 'string') {
@@ -124,7 +124,7 @@
if (!first) {
ret += ', ';
};
- ret += "'" + key + "': " +
+ ret += "'" + key + "': " +
this.serializeMapping(mapping[key]);
first = false;
};
Modified: kupu/branch/kupu-1.4/doc/CHANGES.txt
==============================================================================
--- kupu/branch/kupu-1.4/doc/CHANGES.txt (original)
+++ kupu/branch/kupu-1.4/doc/CHANGES.txt Wed May 28 15:35:26 2008
@@ -2,14 +2,26 @@
Kupu changes
============
-- x.y.z
+- 1.4.10
- Update emptypage.pt to include a hint for deliverance that edited
- pages should not be themed.
+ pages should not be themed. [wiggy]
+
+ - Purged old Zope2 Interface interfaces for compatibility with Zope 2.12 and Plone 4, while maintaining compatibility
+ with pre Plone 4 versions of Products.PortalTransforms.
+ [elro]
- Plone tickets
+ * 7779 imageuploader doesn t show the input for file if not in english
+ * 7958 Kupu: Insert image: KeyError: 'info' (Error 503 loading kupucollection.xml?resource_type=mediaobject)
+ * 7990 Internal link drawer broken for editors
* 8003 Fixed Kupu translation msgids containing html.
+ * 8009 Pasting from OpenOffice broken / mishandled comments
+ * 8014 kupu zmi_docs#images link broken
+ * 8039 Kupu locks up on adding images when user does not have manager privileges
+ * 8080 After uploading image, the "Insert Image" dialog remains open
+ * 8129 "TypeError: string indices must be integers" error on plonedrawers.py when installing
- 1.4.9
Modified: kupu/branch/kupu-1.4/mmbase/Makefile
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/Makefile (original)
+++ kupu/branch/kupu-1.4/mmbase/Makefile Wed May 28 15:35:26 2008
@@ -27,7 +27,7 @@
$(XSLTPROC) $(XSLTPROC_PARAMS) -o $@ $(XSLJSPX_FILE) head-mmbase.kupu
$(I18N):
- @$(MAKE) -C $(KUPU_HOME) kupu-i18n.jar
+ @$(MAKE) -C $(KUPU_HOME) kupu-i18n.jar
.PHONY:
messages: *.js clean
@@ -48,6 +48,7 @@
clean:
rm -f index.jspx
+ rm -f body.jspx head.jspx
rm -f mmbase-kupu-i18n.jar
rm -rf resourcebundle
@$(MAKE) -C $(KUPU_HOME) clean
Modified: kupu/branch/kupu-1.4/mmbase/body.kupu
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/body.kupu (original)
+++ kupu/branch/kupu-1.4/mmbase/body.kupu Wed May 28 15:35:26 2008
@@ -10,7 +10,7 @@
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
i18n:domain="kupu"
>
- <kupu:id>$Id: body.kupu,v 1.10 2005/09/27 18:26:52 michiel Exp $</kupu:id>
+ <kupu:id>$Id$</kupu:id>
<kupu:part name="body">
Modified: kupu/branch/kupu-1.4/mmbase/contextmenu.kupu
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/contextmenu.kupu (original)
+++ kupu/branch/kupu-1.4/mmbase/contextmenu.kupu Wed May 28 15:35:26 2008
@@ -8,7 +8,7 @@
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
i18n:domain="kupu"
>
- <kupu:id>$Id: contextmenu.kupu,v 1.2 2005/04/19 21:23:58 michiel Exp $</kupu:id>
+ <kupu:id>$Id$</kupu:id>
<kupu:part name="jsincludes">
<script type="text/javascript" src="${kupu_common}/kupucontextmenu.js"><jsp:text> </jsp:text></script>
Modified: kupu/branch/kupu-1.4/mmbase/drawers.kupu
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/drawers.kupu (original)
+++ kupu/branch/kupu-1.4/mmbase/drawers.kupu Wed May 28 15:35:26 2008
@@ -9,7 +9,7 @@
xmlns:jsp="http://java.sun.com/JSP/Page"
i18n:domain="kupu"
>
- <kupu:id>$Id: drawers.kupu,v 1.15 2005/10/19 14:18:50 michiel Exp $</kupu:id>
+ <kupu:id>$Id$</kupu:id>
<kupu:part name="styles">
Modified: kupu/branch/kupu-1.4/mmbase/drawers/attachments.items.jspx
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/drawers/attachments.items.jspx (original)
+++ kupu/branch/kupu-1.4/mmbase/drawers/attachments.items.jspx Wed May 28 15:35:26 2008
@@ -3,11 +3,11 @@
Needs: a request context 'drawer', containing a listcontainer 'query'.
-->
<mm:context
- xmlns:jsp="http://java.sun.com/JSP/Page"
- xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"
id="drawer" scope="request">
<jsp:output omit-xml-declaration="yes" />
- <mm:import externid="surpressupload" />
+ <mm:import externid="surpressupload" reset="true" />
<mm:content type="text/xml">
<mm:listnodescontainer referid="query">
<items>
@@ -16,7 +16,7 @@
<uploadbutton>yes</uploadbutton>
</mm:notpresent>
<mm:listnodes id="attachment">
- <resource id="${attachment.number}">
+ <resource id="${attachment.number}">
<uri>mmbase://attachments/${attachment.number}</uri>
<title>[<mm:field name="mimetype" />: <mm:field name="title" />]</title>
<size><mm:field name="size" />b</size>
Modified: kupu/branch/kupu-1.4/mmbase/drawers/drawer.xsl.jspx
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/drawers/drawer.xsl.jspx (original)
+++ kupu/branch/kupu-1.4/mmbase/drawers/drawer.xsl.jspx Wed May 28 15:35:26 2008
@@ -13,7 +13,7 @@
XSL transformation from Kupu Library XML to HTML for the image library
drawer.
-$Id: drawer.xsl,v 1.12 2005/09/16 19:47:56 michiel Exp $
+$Id$
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
@@ -24,11 +24,11 @@
<mm:link absolute="true" page="../../common/kupudrawers/drawer.xsl">
<!-- Must be absolute, or otherwise IE chokes -->
<xsl:import href="${_}" />
- </mm:link>
-
+ </mm:link>
- <!--
- Overridden to use the 'showupload' parameter always, if an 'uploadbutton' tab is present
+
+ <!--
+ Overridden to use the 'showupload' parameter always, if an 'uploadbutton' tab is present
-->
<xsl:template match="*" mode="panel">
<xsl:choose>
@@ -58,10 +58,11 @@
</xsl:template>
<!--
- Just overridden to rename it, because we use upload also for attachments, not only for images
+ Just overridden to rename it, because we use upload also for attachments, not only for images
(Called in 'panel' mode)
-->
<xsl:template match="uploadbutton" mode="upload">
+ bla bla bla
<xsl:apply-templates select="." mode="image-upload" />
</xsl:template>
@@ -73,8 +74,8 @@
<xsl:apply-templates select="." mode="base-properties"/>
</xsl:template>
- <!--
- We know height and width beforehand, so we don't use the 'kupuFixImage' function.
+ <!--
+ We know height and width beforehand, so we don't use the 'kupuFixImage' function.
That works faster and more reliable.
They are added as attributes on all tags (icon, preview and uri).
-->
@@ -88,7 +89,7 @@
</xsl:if>
</img>
</xsl:template>
-
+
<xsl:template match="resource|collection" mode="image-view">
<xsl:choose>
<xsl:when test="preview">
@@ -99,7 +100,7 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template>
-
+
<xsl:template name="mystyle">
<link type="text/css" rel="stylesheet" media="all">
<xsl:attribute name="href">mydrawerstyle.css</xsl:attribute>
Modified: kupu/branch/kupu-1.4/mmbase/drawers/library.jspx
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/drawers/library.jspx (original)
+++ kupu/branch/kupu-1.4/mmbase/drawers/library.jspx Wed May 28 15:35:26 2008
@@ -4,7 +4,7 @@
type="text/xml"
expires="-1">
<!--
- $Id: library.jspx,v 1.13 2005/10/19 14:18:50 michiel Exp $
+ $Id$
-->
<jsp:output omit-xml-declaration="yes" />
Modified: kupu/branch/kupu-1.4/mmbase/drawers/search.constraints.jspx
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/drawers/search.constraints.jspx (original)
+++ kupu/branch/kupu-1.4/mmbase/drawers/search.constraints.jspx Wed May 28 15:35:26 2008
@@ -1,17 +1,16 @@
-<!--
+<!--
This xml can be jsp:directive.include-d inside a node-container.
It need two variables to exist:
search: string to search on
nodetype: fields of which node-type must be considered
- $Id: search.constraints.jspx,v 1.2 2005/06/28 12:33:20 michiel Exp $
+ $Id$
-->
<jsp:root
- xmlns:jsp="http://java.sun.com/JSP/Page"
+ xmlns:jsp="http://java.sun.com/JSP/Page"
version="1.2"
xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0"
>
<mm:isnotempty xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0" referid="search">
- <mm:log>bla</mm:log>
<mm:composite operator="OR">
<mm:fieldlist type="search" nodetype="$nodetype">
<mm:fieldinfo type="typedescription">
@@ -28,4 +27,4 @@
<mm:hasfield nodetype="${nodetype}" name="version">
<mm:constraint field="version" value="10000" />
</mm:hasfield>
-</jsp:root>
\ No newline at end of file
+</jsp:root>
Modified: kupu/branch/kupu-1.4/mmbase/drawers/search.library.jspx
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/drawers/search.library.jspx (original)
+++ kupu/branch/kupu-1.4/mmbase/drawers/search.library.jspx Wed May 28 15:35:26 2008
@@ -5,7 +5,7 @@
expires="-1">
<jsp:directive.page errorPage="../error.jspx" />
<!--
- $Id: search.library.jspx,v 1.3 2005/10/19 14:18:50 michiel Exp $
+ $Id$
-->
<jsp:output omit-xml-declaration="yes" />
@@ -17,7 +17,6 @@
<mm:import vartype="list" externid="link_nodetypes">images</mm:import>
<mm:import externid="source" />
- <mm:log>${nodetypes}</mm:log>
<library id="${nodetypes}_${search}">
<uri><mm:url referids="search,librarysize at max,link_nodetypes at nodetypes" page="drawers/collection.jspx" /></uri>
<title>"<mm:write referid="search" />"</title>
@@ -36,7 +35,7 @@
<mm:constraint field="number" inverse="true" value="${source}" />
</mm:present>
<mm:sortorder field="number" direction="down" />
- <mm:size id="size" write="false" />
+ <mm:import id="size" reset="true"><mm:size /></mm:import>
<mm:maxnumber value="$librarysize" />
<mm:offset value="${librarysize * page}" />
<mm:haspage page="${nodetype}.items.jspx">
@@ -54,4 +53,4 @@
</library>
</mm:cloud>
-</mm:content>
\ No newline at end of file
+</mm:content>
Modified: kupu/branch/kupu-1.4/mmbase/head.kupu
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/head.kupu (original)
+++ kupu/branch/kupu-1.4/mmbase/head.kupu Wed May 28 15:35:26 2008
@@ -7,8 +7,8 @@
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0">
- <kupu:id>$Id: head.kupu,v 1.15 2005/09/14 17:24:31 michiel Exp $</kupu:id>
-
+ <kupu:id>$Id$</kupu:id>
+
<kupu:part name="meta">
<fmt:bundle basename="org.mmbase.kupu.Messages">
<title>
@@ -39,14 +39,17 @@
<script type="text/javascript" src="${kupu_common}/kuputoolcollapser.js"><jsp:text> </jsp:text></script>
<script type="text/javascript" src="cross-browser.js"><jsp:text> </jsp:text></script>
<script type="text/javascript" src="layout.js"><jsp:text> </jsp:text></script>
+ <jsp:directive.include file="/mmbase/validation/javascript.jspxf" />
<script type="text/javascript" src="mmbasetools.js"><jsp:text> </jsp:text></script>
<script type="text/javascript" src="mmbase.js"><jsp:text> </jsp:text></script>
</kupu:part>
<kupu:part name="styles">
- <link href="${kupu_common}/kupustyles.css" rel="stylesheet" type="text/css"><jsp:text> </jsp:text></link>
+ <link href="${kupu_common}/kupustyles.css" rel="stylesheet" type="text/css"><jsp:text> </jsp:text></link>
+ <mm:haspage page="/mmbase/searchrelate/page.css.jsp">
+ <link href="${mm:link('/mmbase/searchrelate/page.css.jsp')}" rel="stylesheet" type="text/css"><jsp:text> </jsp:text></link>
+ </mm:haspage>
<!-- fills image buttons and so on -->
- <link href="mmbase.css" rel="stylesheet" type="text/css" />
</kupu:part>
Modified: kupu/branch/kupu-1.4/mmbase/html.kupu
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/html.kupu (original)
+++ kupu/branch/kupu-1.4/mmbase/html.kupu Wed May 28 15:35:26 2008
@@ -4,7 +4,7 @@
implementation="mmbase"
xmlns:kupu="http://kupu.oscom.org/namespaces/dist"
>
- <kupu:id>$Id: html.kupu,v 1.14 2005/09/27 18:26:52 michiel Exp $</kupu:id>
+ <kupu:id>$Id$</kupu:id>
<kupu:part name="html">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:jsp="http://java.sun.com/JSP/Page"
Modified: kupu/branch/kupu-1.4/mmbase/kupuinit.js
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/kupuinit.js (original)
+++ kupu/branch/kupu-1.4/mmbase/kupuinit.js Wed May 28 15:35:26 2008
@@ -36,6 +36,7 @@
// now we can create a UI object which we can use from the UI
var ui = new KupuUI('kupu-tb-styles');
+ //console.log(ui.tsselect.childNodes.item(7));
// the ui must be registered to the editor like a tool so it can be notified
// of state changes
Modified: kupu/branch/kupu-1.4/mmbase/mmbase.css
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/mmbase.css (original)
+++ kupu/branch/kupu-1.4/mmbase/mmbase.css Wed May 28 15:35:26 2008
@@ -1,46 +1,46 @@
@import url("layout.css");
-body {
+body {
}
-a {
+a {
color: #ffa;
text-decoration: none;
}
-ul, ol {
+ul, ol {
padding-left: 18px;
margin-left: 0px;
}
-li {
+li {
margin-left: 0px;
}
-#leftColumnContent a:hover {
+#leftColumnContent a:hover {
background-color: #76a2b6;
}
-img {
+img {
border: 0;
}
-#header, #leftColumn {
+#header, #leftColumn {
background-color: #527d94;
color: #fff;
}
-#nodefields p {
+#nodefields p {
font-size: smaller;
}
-#nodefields span.mm_datetime {
+#nodefields span.mm_datetime {
}
-#nodefields a:hover {
+#nodefields a:hover {
background-color: #527d94;
}
-#nodefields {
+#nodefields {
background-color: #76a2b6;
overflow: auto;
}
@@ -49,33 +49,33 @@
/* user-input: enabled; */
}
-#nodefields input.mm_year {
+#nodefields input.mm_year {
width: 5ex;
font-size: smaller;
}
-#nodefields select {
- font-size: smaller;
+#nodefields select {
+ font-size: smaller;
}
-#mmbase-tools {
+#mmbase-tools {
overflow: auto;
overflow-x: auto;
overflow-y: auto;
-
+
}
-#mmbase-tools ul {
- list-style-type: none;
+#mmbase-tools ul {
+ list-style-type: none;
}
-iframe {
+iframe {
background-color: #ffc;
}
-a.current {
+a.current {
background-color: #76a2b6;
}
@@ -84,16 +84,16 @@
text-decoration: none;
}
-#mmbase-tools .mmbase-tool {
+#mmbase-tools .mmbase-tool {
min-height: 100px;
}
-
-#preview {
+
+#preview {
background-color: blue;
margin: 0px;
}
-#kupu {
+#kupu {
z-index: 1;
}
#kupu-tb-buttons {
@@ -103,32 +103,33 @@
display: none;
background-color: white;
}
-#kupu div.kupu-drawer {
+#kupu div.kupu-drawer {
width: 800px;
-}
-#kupu div.kupu-resourceitems {
+}
+#kupu div.kupu-resourceitems {
width: 400px;
}
-#kupu div.kupu-drawer textarea, #kupu div.kupu-drawer input {
+#kupu div.kupu-drawer textarea, #kupu div.kupu-drawer input {
border: 1px solid;
background-color: #eee;
}
-#kupu div.kupu-drawer textarea {
+#kupu div.kupu-drawer textarea {
width: 95%;
}
-div.kupu-panels td.panel {
+div.kupu-panels td.panel {
height: 300px;
-}
+}
-#kupu div#image_alt_div {
+#kupu div#image_alt_div {
display: none;
}
-#kupu div.kupu-drawer input#kupu-upload-file {
+#kupu div.kupu-drawer input#kupu-upload-file {
width: 60%;
}
-#kupu div.kupu-drawer div.overflow {
+#kupu div.kupu-drawer div.overflow {
overflow-x: auto;
overflow-y: auto;
+
}
#kupu div.kupu-editorframe {
@@ -151,50 +152,105 @@
display: none;
}
-#kupu-editor {
+#kupu-editor {
background-color: white;
}
-#kupu-editor h1,h2,h3,h4,h5,h6,h7 {
+#kupu-editor h1,h2,h3,h4,h5,h6,h7 {
color: red;
}
-div.kupu-toolbox, div.kupu-toolbox-active {
+div.kupu-toolbox, div.kupu-toolbox-active {
position: absolute;
width: 200px;
right: 2px;
display: block;
background-color: #527d94;
}
-div.kupu-toolbox-active {
+div.kupu-toolbox-active {
background-color: #76a2b6;
}
-div.kupu-toolbox-active #kupu-div-addbutton {
+div.kupu-toolbox-active #kupu-div-addbutton {
display: none;
-
+
}
-div#kupu-toolbox-links {
+div#kupu-toolbox-links {
}
-div#kupu-toolbox-images {
+div#kupu-toolbox-images {
top: 250px;
}
-div#kupu-toolbox-tables {
+div#kupu-toolbox-tables {
top: 500px;
}
-div#kupu-toolbox-debug {
+div#kupu-toolbox-debug {
top: 750px;
}
-div#kupu-toolbox-addtable{
+div#kupu-toolbox-addtable{
+
+}
+
+div#kupu-librariesitems {
+ width: 200px;
+}
+div#kupu-resourceitems {
+ width: 250px;
+}
-}
-img.icon {
+img.icon {
margin-right: 0.5ex;
border: 0px;
}
button.mmbase-logo {background-image: url("mmbase.png");}
-.kupu-removediv {background-image: url("../common/kupuimages/remove.png");}
\ No newline at end of file
+.kupu-removediv {
+ background-image: url("../common/kupuimages/remove.png");
+}
+
+
+div.kupu-toolbox.left-box {
+ width: 260px;
+ left: 0px;
+}
+
+div.kupu-toolbox.left-box h1 {
+ color: black;
+}
+
+.mm_related h2 {
+ background-color: white;
+ color: black;
+ font-size: 1em;
+ margin: 0;
+
+}
+
+.mm_related div.searchresult table {
+ width: 260px;
+}
+.mm_related div.searchresult table thead {
+ display: none;
+}
+.mm_related td.fields {
+ display: none;
+}
+
+
+.mm_related table.create {
+ width: 260px;
+ overflow: auto;
+}
+.mm_related table.create th {
+ width: 50px;
+ text-align: left;
+ font-size: 0.6em;
+}
+.mm_related table.create input.mm_validate {
+ width: 200px;
+}
+.mm_related table.create input[type='file'].mm_validate {
+ width: 50px;
+}
Modified: kupu/branch/kupu-1.4/mmbase/mmbase.kupu
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/mmbase.kupu (original)
+++ kupu/branch/kupu-1.4/mmbase/mmbase.kupu Wed May 28 15:35:26 2008
@@ -32,6 +32,11 @@
<kupu:insert-part feature="body" part="fulleditor" />
</div>
</kupu:part>
+
+ <kupu:part name="styles">
+ <link href="mmbase.css" rel="stylesheet" type="text/css" />
+ </kupu:part>
+
<kupu:part name="header">
<div id="header">
<fmt:bundle basename="org.mmbase.kupu.Messages">
Modified: kupu/branch/kupu-1.4/mmbase/saveonpart.kupu
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/saveonpart.kupu (original)
+++ kupu/branch/kupu-1.4/mmbase/saveonpart.kupu Wed May 28 15:35:26 2008
@@ -6,7 +6,7 @@
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:kupu="http://kupu.oscom.org/namespaces/dist"
>
- <kupu:id>$Id: saveonpart.kupu,v 1.3 2005/09/14 17:24:31 michiel Exp $</kupu:id>
+ <kupu:id>$Id$</kupu:id>
<kupu:part name="jsincludes">
<!-- saveonpart function is in mmbase.js -->
Modified: kupu/branch/kupu-1.4/mmbase/toolbar.kupu
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/toolbar.kupu (original)
+++ kupu/branch/kupu-1.4/mmbase/toolbar.kupu Wed May 28 15:35:26 2008
@@ -8,7 +8,7 @@
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
i18n:domain="kupu"
>
- <kupu:id>$Id: toolbar.kupu,v 1.12 2005/06/30 17:11:44 michiel Exp $</kupu:id>
+ <kupu:id>$Id$</kupu:id>
<!-- lets limit ourselves to 2 ways of emphasis (in stead of 3) -->
<kupu:part name="buttongroup-basicmarkup">
Modified: kupu/branch/kupu-1.4/mmbase/toolboxes.kupu
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/toolboxes.kupu (original)
+++ kupu/branch/kupu-1.4/mmbase/toolboxes.kupu Wed May 28 15:35:26 2008
@@ -9,7 +9,7 @@
xmlns="http://www.w3.org/1999/xhtml"
i18n:domain="kupu"
>
- <kupu:id>$Id: toolboxes.kupu,v 1.9 2005/09/08 08:30:31 michiel Exp $</kupu:id>
+ <kupu:id>$Id$</kupu:id>
<kupu:part name="images">
Modified: kupu/branch/kupu-1.4/mmbase/wire.kupu
==============================================================================
--- kupu/branch/kupu-1.4/mmbase/wire.kupu (original)
+++ kupu/branch/kupu-1.4/mmbase/wire.kupu Wed May 28 15:35:26 2008
@@ -1,6 +1,6 @@
<!--
- @version $Id: wire.kupu,v 1.12 2005/07/11 16:33:48 michiel Exp $
+ @version $Id$
@author Michiel Meeuwissen <michiel.meeuwissen at gmail.com>
-->
<kupu:wire
@@ -12,6 +12,7 @@
<kupu:insert-part feature="head" part="meta" />
<kupu:insert-part feature="head" part="styles" />
<kupu:insert-part feature="drawers" part="styles" />
+ <kupu:insert-part feature="mmbase" part="styles" />
<kupu:insert-part feature="head" part="jsincludes" />
<kupu:insert-part feature="contextmenu" part="jsincludes" />
<kupu:insert-part feature="head" part="bootstrap-editor" />
Modified: kupu/branch/kupu-1.4/plone/html2captioned.py
==============================================================================
--- kupu/branch/kupu-1.4/plone/html2captioned.py (original)
+++ kupu/branch/kupu-1.4/plone/html2captioned.py Wed May 28 15:35:26 2008
@@ -7,7 +7,12 @@
# The transform finds all the embedded images, and replaces them with
# an appropriate chunk of HTML to include the caption.
#
+try:
+ from Products.PortalTransforms.z3.interfaces import ITransform
+except ImportError:
+ ITransform = None
from Products.PortalTransforms.interfaces import itransform
+
from DocumentTemplate.DT_Util import html_quote
from DocumentTemplate.DT_Var import newline_to_br
from Products.CMFCore.utils import getToolByName
@@ -18,6 +23,7 @@
from Acquisition import aq_base
from htmlentitydefs import name2codepoint
from Products.kupu.plone.config import UID_PATTERN
+from zope.interface import implements
name2codepoint = name2codepoint.copy()
name2codepoint['apos']=ord("'")
@@ -70,6 +76,8 @@
class HTMLToCaptioned:
"""Transform which adds captions to images embedded in HTML"""
+ if ITransform is not None:
+ implements(ITransform)
__implements__ = itransform
__name__ = "html_to_captioned"
inputs = ('text/html',)
@@ -551,6 +559,13 @@
if obj is not None:
newurl = obj.absolute_url()
return uid, newurl, tail
+ # If the uid doesn't exist then we can try the fallback
+ # script. Even if the fallback works though we'll assume
+ # an external link for simplicity.
+ hook = getattr(self.tool, 'kupu_resolveuid_hook', None)
+ if hook:
+ target = hook(uid)
+ return None, target, ''
return None, None, None
def classifyLink(self, url, base, first=True):
@@ -577,6 +592,8 @@
if 'resolveuid/' in absurl:
UID, newurl, ntail = self.resolveToPath(absurl)
if UID is None:
+ if newurl:
+ return 'external', None, newurl, ntail
return 'bad', None, url, ''
absurl = newurl
tail = ntail + tail
@@ -675,4 +692,6 @@
return unichr(name2codepoint[code])
return match.group(0)
- return EntityPattern.sub(unescape, s.decode(encoding))
+ if isinstance(s, str):
+ s = s.decode(encoding)
+ return EntityPattern.sub(unescape, s)
Modified: kupu/branch/kupu-1.4/plone/interfaces.py
==============================================================================
--- kupu/branch/kupu-1.4/plone/interfaces.py (original)
+++ kupu/branch/kupu-1.4/plone/interfaces.py Wed May 28 15:35:26 2008
@@ -11,7 +11,7 @@
$Id$
"""
-from Interface import Interface
+from zope.interface import Interface
class ILibraryManager(Interface):
"""Provide an interface for managing and retrieving libraries for
Modified: kupu/branch/kupu-1.4/plone/kupu2html.py
==============================================================================
--- kupu/branch/kupu-1.4/plone/kupu2html.py (original)
+++ kupu/branch/kupu-1.4/plone/kupu2html.py Wed May 28 15:35:26 2008
@@ -7,12 +7,20 @@
# The transform is the same as the one done by html2captioned, but
# this version expects to work on text/x-html-raw
+try:
+ from Products.PortalTransforms.z3.interfaces import ITransform
+except ImportError:
+ ITransform = None
from Products.PortalTransforms.interfaces import itransform
+
from Products.kupu.plone import html2captioned
from Products.CMFCore.utils import getToolByName
+from zope.interface import implements
class KupuOutputTransform(html2captioned.HTMLToCaptioned):
"""Transform which adds captions to images embedded in HTML"""
+ if ITransform is not None:
+ implements(ITransform)
__implements__ = itransform
__name__ = "kupu_raw_to_html"
inputs = ('text/x-html-raw',)
Modified: kupu/branch/kupu-1.4/plone/kupu_config.pt
==============================================================================
--- kupu/branch/kupu-1.4/plone/kupu_config.pt (original)
+++ kupu/branch/kupu-1.4/plone/kupu_config.pt Wed May 28 15:35:26 2008
@@ -103,14 +103,15 @@
</span>
<span tal:condition="not:isTransformEnabled">
<tal:block i18n:translate="help_enable_transform">
- If you enable this option a transform to hide UIDs and support image
- captioning from client browsers will also be enabled
+ If you enable this option a transform to hide UIDs and support image
+ captioning from client browsers will also be enabled
</tal:block>
(<a i18n:translate="help_image_captioning_url"
- href="zmi_docs#images">see image captioning documentation</a>).
+ tal:attributes="href string:${context/absolute_url}/zmi_docs#images"
+ href="zmi_docs#images">see image captioning documentation</a>).
<tal:block i18n:translate="help_update_portal_transforms">
- If the transform does not enable itself automatically you may
- need to update your PortalTransforms product.
+ If the transform does not enable itself automatically you may
+ need to update your PortalTransforms product.
</tal:block>
</span>
</div>
@@ -138,7 +139,8 @@
captioning from client browsers will also be enabled
</tal:block>
(<a i18n:translate="help_image_captioning_url"
- href="zmi_docs#images">see image captioning documentation</a>).
+ tal:attributes="href string:${context/absolute_url}/zmi_docs#images"
+ href="zmi_docs#images">see image captioning documentation</a>).
<tal:block i18n:translate="help_update_portal_transforms">
If the transform does not enable itself automatically you may
need to update your PortalTransforms product.
Modified: kupu/branch/kupu-1.4/plone/kupu_plone_layer/kupucollection.xml.pt
==============================================================================
--- kupu/branch/kupu-1.4/plone/kupu_plone_layer/kupucollection.xml.pt (original)
+++ kupu/branch/kupu-1.4/plone/kupu_plone_layer/kupucollection.xml.pt Wed May 28 15:35:26 2008
@@ -108,7 +108,7 @@
<size tal:condition="origok">
<selected tal:condition="python:defscale in ('original', '')" />
<label i18n:translate="option_original">Original</label>
- <uri tal:content="info/url" />
+ <uri/>
</size>
</sizes>
</uploadbutton>
Modified: kupu/branch/kupu-1.4/plone/libraries.pt
==============================================================================
--- kupu/branch/kupu-1.4/plone/libraries.pt (original)
+++ kupu/branch/kupu-1.4/plone/libraries.pt Wed May 28 15:35:26 2008
@@ -133,35 +133,35 @@
<p i18n:translate="available_tales">The following variables are available in the TALES expressions:</p>
<table>
<tr>
- <td><code i18n:translate="object_variable">object</code></td>
+ <td><code>object</code></td>
<td i18n:translate="current_context">The current context object</td>
</tr>
<tr>
- <td><code i18n:translate="object_url_variable">object_url</code></td>
+ <td><code>object_url</code></td>
<td i18n:translate="current_context_url">The URL of the current context object</td>
</tr>
<tr>
- <td><code i18n:translate="folder_variable">folder</code></td>
+ <td><code>folder</code></td>
<td i18n:translate="context_folder">The folder the context object is located in</td>
</tr>
<tr>
- <td><code i18n:translate="folder_url_variable">folder_url</code></td>
+ <td><code>folder_url</code></td>
<td i18n:translate="context_folder_uri">The URL of the folder the context object is located in</td>
</tr>
<tr>
- <td><code i18n:translate="portal_variable">portal</code></td>
+ <td><code>portal</code></td>
<td i18n:translate="portal_object">The portal object</td>
</tr>
<tr>
- <td><code i18n:translate="portal_url_variable">portal_url</code></td>
+ <td><code>portal_url</code></td>
<td i18n:translate="portal_object_url">URL of the portal</td>
</tr>
<tr>
- <td><code i18n:translate="member_variable">member</code></td>
+ <td><code>member</code></td>
<td i18n:translate="authenticated_member">Authenticated member</td>
</tr>
<tr>
- <td><code i18n:translate="request_variable">request</code></td>
+ <td><code>request</code></td>
<td i18n:translate="request">Request</td>
</tr>
</table>
Modified: kupu/branch/kupu-1.4/plone/librarytool.py
==============================================================================
--- kupu/branch/kupu-1.4/plone/librarytool.py (original)
+++ kupu/branch/kupu-1.4/plone/librarytool.py Wed May 28 15:35:26 2008
@@ -19,6 +19,7 @@
from Products.PageTemplates.Expressions import getEngine, SecureModuleImporter
from Products.kupu.plone.interfaces import IKupuLibraryTool
from Products.CMFCore.utils import getToolByName
+from zope.interface import implements
class KupuError(Exception): pass
NEWTYPE_IGNORE, NEWTYPE_ADD = 0, 1
@@ -29,7 +30,7 @@
class KupuLibraryTool(Acquisition.Implicit):
"""A tool to aid Kupu libraries"""
- __implements__ = IKupuLibraryTool
+ implements(IKupuLibraryTool)
def __init__(self):
self._libraries = []
Modified: kupu/branch/kupu-1.4/plone/plonedrawers.py
==============================================================================
--- kupu/branch/kupu-1.4/plone/plonedrawers.py (original)
+++ kupu/branch/kupu-1.4/plone/plonedrawers.py Wed May 28 15:35:26 2008
@@ -491,9 +491,12 @@
preview = None
previewsize = (0,0)
for k in sizes:
- if previewsize < sizes[k] <= (128,128):
- preview = k
- previewsize = sizes[k]
+ try:
+ if previewsize < sizes[k] <= (128,128):
+ preview = k
+ previewsize = sizes[k]
+ except TypeError: # Fails on Plone 2.1
+ return field.getName()
if not preview:
smallest = min(sizes.values())
for k in sizes:
Modified: kupu/branch/kupu-1.4/plone/plonelibrarytool.py
==============================================================================
--- kupu/branch/kupu-1.4/plone/plonelibrarytool.py (original)
+++ kupu/branch/kupu-1.4/plone/plonelibrarytool.py Wed May 28 15:35:26 2008
@@ -241,7 +241,7 @@
if REQUEST:
REQUEST.RESPONSE.redirect(self.absolute_url() + '/zmi_toolbar')
- security.declareProtected(permissions.ManageLibraries, "getGlobalButtonFilter")
+ security.declareProtected("View", "getGlobalButtonFilter")
def getGlobalButtonFilter(self):
gfilter = getattr(self, '_global_toolbar_filter', None)
if gfilter is not None:
@@ -644,7 +644,7 @@
t.mode = 'whitelist'
return types
- security.declareProtected(permissions.ManageLibraries, "get_resourcetypes")
+ security.declareProtected("View", "get_resourcetypes")
def get_resourcetypes(self):
"""Return the type mapping, but without the ZMI dummy entry"""
keys = self._res_types.keys()
@@ -656,7 +656,7 @@
real.append(wrapped)
return real
- security.declareProtected(permissions.ManageLibraries, "zmi_get_resourcetypes")
+ security.declareProtected("View", "zmi_get_resourcetypes")
def zmi_get_resourcetypes(self):
"""Return the type mapping for the ZMI view"""
real = self.get_resourcetypes()
@@ -691,29 +691,29 @@
if (REQUEST):
REQUEST.RESPONSE.redirect(self.absolute_url() + '/zmi_resource_types')
- security.declareProtected(permissions.ManageLibraries, "getPreviewForType")
+ security.declareProtected("View", "getPreviewForType")
def getPreviewForType(self, portal_type):
action_map = getattr(self, '_preview_actions', {})
expr = action_map.get(portal_type, {}).get('expression', '')
return getattr(expr, 'text', expr)
- security.declareProtected(permissions.ManageLibraries, "getNormalViewForType")
+ security.declareProtected("View", "getNormalViewForType")
def getNormalViewForType(self, portal_type):
action_map = getattr(self, '_preview_actions', {})
expr = action_map.get(portal_type, {}).get('normal', '')
return getattr(expr, 'text', expr)
- security.declareProtected(permissions.ManageLibraries, "getScaleFieldForType")
+ security.declareProtected("View", "getScaleFieldForType")
def getScaleFieldForType(self, portal_type):
action_map = getattr(self, '_preview_actions', {})
value = action_map.get(portal_type, {}).get('scalefield', 'image')
return value
- security.declareProtected(permissions.ManageLibraries, "getDefaultImageType")
+ security.declareProtected("View", "getDefaultImageType")
def getDefaultImageType(self):
return 'Image'
- security.declareProtected(permissions.ManageLibraries, "getDefaultScaleForType")
+ security.declareProtected("View", "getDefaultScaleForType")
def getDefaultScaleForType(self, portal_type = None):
if not portal_type:
portal_type = self.getDefaultImageType()
@@ -721,12 +721,12 @@
value = action_map.get(portal_type, {}).get('defscale', 'image_preview')
return value
- security.declareProtected(permissions.ManageLibraries, "getClassesForType")
+ security.declareProtected("View", "getClassesForType")
def getClassesForType(self, portal_type):
action_map = getattr(self, '_preview_actions', {})
return action_map.get(portal_type, {}).get('classes', ())
- security.declareProtected(permissions.ManageLibraries, "getMediaForType")
+ security.declareProtected("View", "getMediaForType")
def getMediaForType(self, portal_type):
action_map = getattr(self, '_preview_actions', {})
value = action_map.get(portal_type, {}).get('mediatype', 'image')
Modified: kupu/branch/kupu-1.4/plone/profiles/default/metadata.xml
==============================================================================
--- kupu/branch/kupu-1.4/plone/profiles/default/metadata.xml (original)
+++ kupu/branch/kupu-1.4/plone/profiles/default/metadata.xml Wed May 28 15:35:26 2008
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<metadata>
- <version>1.4.9</version>
+ <version>1.4.10</version>
</metadata>
Modified: kupu/branch/kupu-1.4/plone/tests/test_html2captioned.py
==============================================================================
--- kupu/branch/kupu-1.4/plone/tests/test_html2captioned.py (original)
+++ kupu/branch/kupu-1.4/plone/tests/test_html2captioned.py Wed May 28 15:35:26 2008
@@ -8,6 +8,10 @@
from os.path import join, abspath, dirname
from Products.PortalTransforms.tests.test_transforms import *
+try:
+ from Products.PortalTransforms.z3.interfaces import IDataStream
+except ImportError:
+ IDataStream = None
from Products.PortalTransforms.tests.utils import normalize_html
from Products.kupu import kupu_globals
@@ -39,7 +43,8 @@
input.close()
data = datastream(self.transform.name())
res_data = self.transform.convert(orig, data, filename=filename, context=self.portal)
- self.assert_(idatastream.isImplementedBy(res_data))
+ if IDataStream is not None:
+ self.assert_(IDataStream.providedBy(res_data))
got = res_data.getData()
try:
output = open(output)
Modified: kupu/branch/kupu-1.4/plone/tests/test_i18n.py
==============================================================================
--- kupu/branch/kupu-1.4/plone/tests/test_i18n.py (original)
+++ kupu/branch/kupu-1.4/plone/tests/test_i18n.py Wed May 28 15:35:26 2008
@@ -11,6 +11,7 @@
except ImportError:
HAS_I18NDUDE = False
+tests=[]
if HAS_I18NDUDE:
GLOBALS = globals()
PACKAGE_HOME = os.path.normpath(os.path.join(package_home(GLOBALS), '..', '..'))
@@ -21,7 +22,6 @@
i18ndir = os.path.normpath(PACKAGE_HOME)
- tests=[]
products=[]
pots={}
pot_catalogs={}
@@ -52,9 +52,9 @@
pot_len = pot_lens[product]
tests.append(TestOnePoFile)
- import unittest
- def test_suite():
- suite = unittest.TestSuite()
- for test in tests:
- suite.addTest(unittest.makeSuite(test))
- return suite
+import unittest
+def test_suite():
+ suite = unittest.TestSuite()
+ for test in tests:
+ suite.addTest(unittest.makeSuite(test))
+ return suite
Modified: kupu/branch/kupu-1.4/version.txt
==============================================================================
--- kupu/branch/kupu-1.4/version.txt (original)
+++ kupu/branch/kupu-1.4/version.txt Wed May 28 15:35:26 2008
@@ -1 +1 @@
-kupu 1.4.9
+kupu 1.4.10
Modified: kupu/branch/kupu-1.4/widgeteer/kupuinit.js
==============================================================================
--- kupu/branch/kupu-1.4/widgeteer/kupuinit.js (original)
+++ kupu/branch/kupu-1.4/widgeteer/kupuinit.js Wed May 28 15:35:26 2008
@@ -46,6 +46,9 @@
// if we don't first focus the outer window, Mozilla won't show a cursor
window.focus();
this.getDocument().getWindow().focus();
+ if (this.afterWidgeteerInit) {
+ this.afterWidgeteerInit(this);
+ };
};
function WidgeteerDrawerTool() {
Modified: kupu/branch/kupu-1.4/widgeteer/kupustyles.css
==============================================================================
--- kupu/branch/kupu-1.4/widgeteer/kupustyles.css (original)
+++ kupu/branch/kupu-1.4/widgeteer/kupustyles.css Wed May 28 15:35:26 2008
@@ -182,6 +182,7 @@
iframe.kupu-editor-iframe {
width: 100%;
height: 100%;
+ margin-bottom: -3em;
}
textarea.kupu-editor-textarea {
More information about the kupu-checkins
mailing list