From duncan at codespeak.net Fri Sep 1 11:52:46 2006
From: duncan at codespeak.net (duncan at codespeak.net)
Date: Fri, 1 Sep 2006 11:52:46 +0200 (CEST)
Subject: [kupu-checkins] r31911 - kupu/trunk/kupu/common
Message-ID: <20060901095246.50DF710060@code0.codespeak.net>
Author: duncan
Date: Fri Sep 1 11:52:45 2006
New Revision: 31911
Modified:
kupu/trunk/kupu/common/kupueditor.js
Log:
Workround for IE rejecting bad html. Needs a proper solution though.
Modified: kupu/trunk/kupu/common/kupueditor.js
==============================================================================
--- kupu/trunk/kupu/common/kupueditor.js (original)
+++ kupu/trunk/kupu/common/kupueditor.js Fri Sep 1 11:52:45 2006
@@ -651,6 +651,7 @@
return '<'+close+tag+'>';
});
};
+ text = text.replace(/
(
)<\/p>/,'$1');
bodies[bodies.length-1].innerHTML = text;
};
From duncan at codespeak.net Fri Sep 1 12:07:11 2006
From: duncan at codespeak.net (duncan at codespeak.net)
Date: Fri, 1 Sep 2006 12:07:11 +0200 (CEST)
Subject: [kupu-checkins] r31913 - in kupu/trunk/kupu: common doc plone
Message-ID: <20060901100711.A6DDD10060@code0.codespeak.net>
Author: duncan
Date: Fri Sep 1 12:07:10 2006
New Revision: 31913
Modified:
kupu/trunk/kupu/common/kupuhelpers.js
kupu/trunk/kupu/common/sarissa_ieemu_xpath.js
kupu/trunk/kupu/doc/CHANGES.txt
kupu/trunk/kupu/plone/body.kupu
kupu/trunk/kupu/plone/plonelibrarytool.py
Log:
Merged Plone 2.1 fixes from revisions 30984 to 30993.
Modified: kupu/trunk/kupu/common/kupuhelpers.js
==============================================================================
--- kupu/trunk/kupu/common/kupuhelpers.js (original)
+++ kupu/trunk/kupu/common/kupuhelpers.js Fri Sep 1 12:07:10 2006
@@ -122,9 +122,9 @@
};
wrappedmethod.args = args;
try {
- if (_SARISSA_IS_MOZ) {
+ if (element.addEventListener) {
element.addEventListener(event, wrappedmethod.execute, false);
- } else if (_SARISSA_IS_IE) {
+ } else if (element.attachEvent) {
element.attachEvent("on" + event, wrappedmethod.execute);
} else {
throw _("Unsupported browser!");
@@ -141,9 +141,9 @@
function removeEventHandler(element, event, method) {
/* method to remove an event handler for both IE and Mozilla */
- if (_SARISSA_IS_MOZ) {
- window.removeEventListener(event, method, false);
- } else if (_SARISSA_IS_IE) {
+ if (element.removeEventListener) {
+ element.removeEventListener(event, method, false);
+ } else if (element.detachEvent) {
element.detachEvent("on" + event, method);
} else {
throw _("Unsupported browser!");
@@ -253,6 +253,9 @@
};
};
var name = child.nodeName.toLowerCase();
+ if (child.attributes[0] && /^_/.test(child.attributes[0])) {
+ name += child.attributes[0].toLowerCase(); // Fix for Opera
+ }
if (dict[name] != undefined) {
if (!dict[name].push) {
dict[name] = new Array(dict[name], value);
Modified: kupu/trunk/kupu/common/sarissa_ieemu_xpath.js
==============================================================================
--- kupu/trunk/kupu/common/sarissa_ieemu_xpath.js (original)
+++ kupu/trunk/kupu/common/sarissa_ieemu_xpath.js Fri Sep 1 12:07:10 2006
@@ -24,6 +24,7 @@
*
*/
if(_SARISSA_HAS_DOM_FEATURE && document.implementation.hasFeature("XPath", "3.0")){
+ var xmldoc = window.XMLDocument || window.Document;
/**
*
SarissaNodeList behaves as a NodeList but is only used as a result to selectNodes,
* so it also has some properties IEs proprietery object features.
@@ -57,7 +58,7 @@
*/
SarissaNodeList.prototype.expr = "";
/** dummy, used to accept IE's stuff without throwing errors */
- XMLDocument.prototype.setProperty = function(x,y){};
+ xmldoc.prototype.setProperty = function(x,y){};
/**
*
Programmatically control namespace URI/prefix mappings for XPath
* queries.
@@ -104,9 +105,9 @@
* @private Flag to control whether a custom namespace resolver should
* be used, set to true by Sarissa.setXpathNamespaces
*/
- XMLDocument.prototype._sarissa_useCustomResolver = false;
+ xmldoc.prototype._sarissa_useCustomResolver = false;
/** @private */
- XMLDocument.prototype._sarissa_xpathNamespaces = new Array();
+ xmldoc.prototype._sarissa_xpathNamespaces = new Array();
/**
*
Extends the XMLDocument to emulate IE's selectNodes.
* @argument sExpr the XPath expression to use
@@ -115,7 +116,7 @@
* @returns the result of the XPath search as a SarissaNodeList
* @throws An error if no namespace URI is found for the given prefix.
*/
- XMLDocument.prototype.selectNodes = function(sExpr, contextNode){
+ xmldoc.prototype.selectNodes = function(sExpr, contextNode){
var nsDoc = this;
var nsresolver = this._sarissa_useCustomResolver
? function(prefix){
@@ -156,7 +157,7 @@
* method when called on Elements
* @returns the result of the XPath search as an (Sarissa)NodeList
*/
- XMLDocument.prototype.selectSingleNode = function(sExpr, contextNode){
+ xmldoc.prototype.selectSingleNode = function(sExpr, contextNode){
var ctx = contextNode?contextNode:null;
sExpr = "("+sExpr+")[1]";
var nodeList = this.selectNodes(sExpr, ctx);
@@ -180,4 +181,5 @@
throw "Method selectNodes is only supported by XML Elements";
};
Sarissa.IS_ENABLED_SELECT_NODES = true;
+ xmldoc = undefined;
};
Modified: kupu/trunk/kupu/doc/CHANGES.txt
==============================================================================
--- kupu/trunk/kupu/doc/CHANGES.txt (original)
+++ kupu/trunk/kupu/doc/CHANGES.txt Fri Sep 1 12:07:10 2006
@@ -2,7 +2,7 @@
Kupu changes
============
-- 1.4/SVN unreleased
+- 1.4 Beta 1
- Fixed some problems with handling of multi-valued form fields in the
ExternalSource tool code for Silva.
@@ -34,6 +34,14 @@
Word the HTML can be cleaned up simply by toggling source view
on/off.
+- 1.3.8
+
+ - HTML view now does filtering by default in Plone (can be turned
+ off in the configlet). This also means that after pasting from e.g.
+ Word the HTML can be cleaned up simply by toggling source view
+ on/off.
+
+
- 1.3.6
- Plone
Modified: kupu/trunk/kupu/plone/body.kupu
==============================================================================
--- kupu/trunk/kupu/plone/body.kupu (original)
+++ kupu/trunk/kupu/plone/body.kupu Fri Sep 1 12:07:10 2006
@@ -14,7 +14,7 @@
tal:define="base python:here.kupu_library_tool.getBaseUrl(here, True);
base kupu_base_override|base;"
tal:attributes="src string:${base}/emptypage;
- tabindex python:tabindex is not None and tabindex + 1 or None;"
+ tabindex tabindex/next|nothing;"
>
Author: duncan
Date: Fri Sep 1 17:01:13 2006
New Revision: 31935
Added:
kupu/tag/kupu-1.4b1/
- copied from r31934, kupu/trunk/kupu/
Log:
Tag 1.4 beta 1
From duncan at codespeak.net Fri Sep 1 17:02:02 2006
From: duncan at codespeak.net (duncan at codespeak.net)
Date: Fri, 1 Sep 2006 17:02:02 +0200 (CEST)
Subject: [kupu-checkins] r31936 - in kupu/tag/kupu-1.4b1: . default
Message-ID: <20060901150202.6BCE71006C@code0.codespeak.net>
Author: duncan
Date: Fri Sep 1 17:02:01 2006
New Revision: 31936
Modified:
kupu/tag/kupu-1.4b1/default/toolbar.kupu
kupu/tag/kupu-1.4b1/version.txt
Log:
Fix version numbers
Modified: kupu/tag/kupu-1.4b1/default/toolbar.kupu
==============================================================================
--- kupu/tag/kupu-1.4b1/default/toolbar.kupu (original)
+++ kupu/tag/kupu-1.4b1/default/toolbar.kupu Fri Sep 1 17:02:01 2006
@@ -52,7 +52,7 @@
-
Modified: kupu/tag/kupu-1.4b1/version.txt
==============================================================================
--- kupu/tag/kupu-1.4b1/version.txt (original)
+++ kupu/tag/kupu-1.4b1/version.txt Fri Sep 1 17:02:01 2006
@@ -1 +1 @@
-kupu 1.4
+kupu 1.4b1
From duncan at codespeak.net Mon Sep 11 10:31:51 2006
From: duncan at codespeak.net (duncan at codespeak.net)
Date: Mon, 11 Sep 2006 10:31:51 +0200 (CEST)
Subject: [kupu-checkins] r32137 - in kupu/trunk/kupu: plone/kupu_plone_layer
tests
Message-ID: <20060911083151.2F26A10086@code0.codespeak.net>
Author: duncan
Date: Mon Sep 11 10:31:49 2006
New Revision: 32137
Modified:
kupu/trunk/kupu/plone/kupu_plone_layer/kupuploneeditor.js
kupu/trunk/kupu/tests/test_plone.js
Log:
Fix two relative link unit tests.
Modified: kupu/trunk/kupu/plone/kupu_plone_layer/kupuploneeditor.js
==============================================================================
--- kupu/trunk/kupu/plone/kupu_plone_layer/kupuploneeditor.js (original)
+++ kupu/trunk/kupu/plone/kupu_plone_layer/kupuploneeditor.js Mon Sep 11 10:31:49 2006
@@ -46,7 +46,8 @@
urlparts[common]==hrefparts[common])
common++;
var last = urlparts[common];
- if (common+1 == urlparts.length && (last=='emptypage'||last==pageid)) {
+ if (common == urlparts.length) { urlparts[common] = '.'; }
+ else if (common+1 == urlparts.length && (last=='emptypage'||last==pageid)) {
urlparts[common] = '';
}
// The base and the url have 'common' parts in common.
Modified: kupu/trunk/kupu/tests/test_plone.js
==============================================================================
--- kupu/trunk/kupu/tests/test_plone.js (original)
+++ kupu/trunk/kupu/tests/test_plone.js Mon Sep 11 10:31:49 2006
@@ -71,7 +71,7 @@
this.testRelativeLinks4 = function() {
var data = '[1]';
- var expected = '[1]';
+ var expected = '[1]';
var base = 'http://localhost:9080/plone/Members/admin/art1';
var actual = this.editor.makeLinksRelative(data, base);
From duncan at codespeak.net Mon Sep 11 19:12:08 2006
From: duncan at codespeak.net (duncan at codespeak.net)
Date: Mon, 11 Sep 2006 19:12:08 +0200 (CEST)
Subject: [kupu-checkins] r32185 - in kupu/trunk/kupu: doc tests
Message-ID: <20060911171208.789D010079@code0.codespeak.net>
Author: duncan
Date: Mon Sep 11 19:12:05 2006
New Revision: 32185
Modified:
kupu/trunk/kupu/doc/PLONE2.txt
kupu/trunk/kupu/tests/run_tests.html
kupu/trunk/kupu/tests/test_plone.js
Log:
Corrected documentation for enabling captioning.
Added a test for formatting with a tag.
Modified: kupu/trunk/kupu/doc/PLONE2.txt
==============================================================================
--- kupu/trunk/kupu/doc/PLONE2.txt (original)
+++ kupu/trunk/kupu/doc/PLONE2.txt Mon Sep 11 19:12:05 2006
@@ -360,7 +360,8 @@
.. _captioning:
Optionally kupu can automatically add captions to images. To enable
-this feature you must be linking to an Archetypes based image type,
+this feature you must be linking to an Archetypes based image type and
+have 'link by uid' enabled in the configuration options,
and the field you are editing must invoke the html-to-captioned output
transform.
@@ -389,7 +390,8 @@
Once you have done this you can configure the portal_transforms tool as follows:
* add a new transform id 'captioned_to_html', module
- 'Products.PortalTransforms.transforms.identity'.
+ 'Products.PortalTransforms.transforms.identity' with input type
+ text/x-html-captioned and output type text/html.
* On the portal_transforms policy tab add a policy with output
type=text/x-html-safe, uses transforms='html-to-captioned'.
Modified: kupu/trunk/kupu/tests/run_tests.html
==============================================================================
--- kupu/trunk/kupu/tests/run_tests.html (original)
+++ kupu/trunk/kupu/tests/run_tests.html Mon Sep 11 19:12:05 2006
@@ -101,6 +101,10 @@
+