From duncan at codespeak.net Mon Nov 5 17:03:21 2007 From: duncan at codespeak.net (duncan at codespeak.net) Date: Mon, 5 Nov 2007 17:03:21 +0100 (CET) Subject: [kupu-checkins] r48319 - in kupu/trunk/kupu: doc plone plone/kupu_plone_layer Message-ID: <20071105160321.5274E81A3@code0.codespeak.net> Author: duncan Date: Mon Nov 5 17:03:20 2007 New Revision: 48319 Modified: kupu/trunk/kupu/doc/CHANGES.txt kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html kupu/trunk/kupu/plone/save.kupu Log: Fix Plone issue #7285 Kupu Accesskey for Save conflict with Firefox History Menu Removed the access key for the save button. Modified: kupu/trunk/kupu/doc/CHANGES.txt ============================================================================== --- kupu/trunk/kupu/doc/CHANGES.txt (original) +++ kupu/trunk/kupu/doc/CHANGES.txt Mon Nov 5 17:03:20 2007 @@ -2,6 +2,17 @@ Kupu changes ============ +- 1.4.4 SVN/unreleased + + - Enabled Safari support (needs webkit nightly build and Safari 3) + + - Plone tickets + + * 7285 Kupu Accesskey for Save conflict with Firefox History Menu + * 7099 Kupu error on multi-schemata archetypes content + * 7258 Missing translation msgids for kupu + * 7229 kupu 1.4.3 css correction to display redo button icon in editing interface + - 1.4.3 - Kupu now uses sarissa 0.9.8.1 (still a differences in Modified: kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html ============================================================================== --- kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html (original) +++ kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html Mon Nov 5 17:03:20 2007 @@ -12,16 +12,16 @@ - + - + - + @@ -128,7 +128,7 @@ - + Modified: kupu/trunk/kupu/plone/save.kupu ============================================================================== --- kupu/trunk/kupu/plone/save.kupu (original) +++ kupu/trunk/kupu/plone/save.kupu Mon Nov 5 17:03:20 2007 @@ -13,7 +13,7 @@ From duncan at codespeak.net Mon Nov 5 17:09:13 2007 From: duncan at codespeak.net (duncan at codespeak.net) Date: Mon, 5 Nov 2007 17:09:13 +0100 (CET) Subject: [kupu-checkins] r48320 - in kupu/trunk/kupu: doc plone Message-ID: <20071105160913.1242D81A3@code0.codespeak.net> Author: duncan Date: Mon Nov 5 17:09:13 2007 New Revision: 48320 Modified: kupu/trunk/kupu/doc/CHANGES.txt kupu/trunk/kupu/plone/html2captioned.py Log: Fix plone issue #7305: subtarget referenced before defined Modified: kupu/trunk/kupu/doc/CHANGES.txt ============================================================================== --- kupu/trunk/kupu/doc/CHANGES.txt (original) +++ kupu/trunk/kupu/doc/CHANGES.txt Mon Nov 5 17:09:13 2007 @@ -8,6 +8,7 @@ - Plone tickets + * 7305 Page creation and kupu upload image returns an error if Kupu link uid's is turned on. * 7285 Kupu Accesskey for Save conflict with Firefox History Menu * 7099 Kupu error on multi-schemata archetypes content * 7258 Missing translation msgids for kupu Modified: kupu/trunk/kupu/plone/html2captioned.py ============================================================================== --- kupu/trunk/kupu/plone/html2captioned.py (original) +++ kupu/trunk/kupu/plone/html2captioned.py Mon Nov 5 17:09:13 2007 @@ -125,6 +125,7 @@ tag = match.group(1) or match.group(2) attrs = ATTR_PATTERN.match(tag) src = attrs.group('src') + subtarget = None m = SRC_TAIL.match(tag, attrs.end('src')) if m: srctail = m.group(1) From duncan at codespeak.net Mon Nov 5 17:32:42 2007 From: duncan at codespeak.net (duncan at codespeak.net) Date: Mon, 5 Nov 2007 17:32:42 +0100 (CET) Subject: [kupu-checkins] r48321 - kupu/trunk/kupu/doc Message-ID: <20071105163242.D905081BF@code0.codespeak.net> Author: duncan Date: Mon Nov 5 17:32:41 2007 New Revision: 48321 Modified: kupu/trunk/kupu/doc/CHANGES.txt Log: Fix plone issue #7305: subtarget referenced before defined Modified: kupu/trunk/kupu/doc/CHANGES.txt ============================================================================== --- kupu/trunk/kupu/doc/CHANGES.txt (original) +++ kupu/trunk/kupu/doc/CHANGES.txt Mon Nov 5 17:32:41 2007 @@ -8,6 +8,7 @@ - Plone tickets + * 7224 Kupu: error in iframe tabindex attribute * 7305 Page creation and kupu upload image returns an error if Kupu link uid's is turned on. * 7285 Kupu Accesskey for Save conflict with Firefox History Menu * 7099 Kupu error on multi-schemata archetypes content From kupu-checkins at codespeak.net Tue Nov 6 20:25:43 2007 From: kupu-checkins at codespeak.net (VIAGRA ® Official Site) Date: Tue, 6 Nov 2007 20:25:43 +0100 (CET) Subject: [kupu-checkins] November 77% OFF Message-ID: <20071106-52543.15933.qmail@mo-76-2-166-112.dhcp.embarqhsd.net> An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kupu-checkins/attachments/20071106/76a38d70/attachment.htm From kupu-checkins at codespeak.net Wed Nov 7 14:36:41 2007 From: kupu-checkins at codespeak.net (VIAGRA ® Official Site) Date: Wed, 7 Nov 2007 14:36:41 +0100 (CET) Subject: [kupu-checkins] November 75% OFF Message-ID: <20071107033635.5902.qmail@host92-74-dynamic.1-79-r.retail.telecomitalia.it> An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kupu-checkins/attachments/20071107/c3d33f0c/attachment.htm From duncan at codespeak.net Thu Nov 8 16:14:08 2007 From: duncan at codespeak.net (duncan at codespeak.net) Date: Thu, 8 Nov 2007 16:14:08 +0100 (CET) Subject: [kupu-checkins] r48419 - in kupu/trunk/kupu: common default plone/kupu_plone_layer Message-ID: <20071108151408.9A3DF8171@code0.codespeak.net> Author: duncan Date: Thu Nov 8 16:14:05 2007 New Revision: 48419 Modified: kupu/trunk/kupu/common/kupudrawerstyles.css kupu/trunk/kupu/default/drawers.kupu kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html Log: Plone ticket 7315 Kupu table of contents generator doesn't allow multiple paragraph styles to be selected in IE7 An IE bug prevented the display updating correctly. I've changed the drawer layout to avoid triggering the bug, and at the same time tidied it up so that all tabs are the same height. Modified: kupu/trunk/kupu/common/kupudrawerstyles.css ============================================================================== --- kupu/trunk/kupu/common/kupudrawerstyles.css (original) +++ kupu/trunk/kupu/common/kupudrawerstyles.css Thu Nov 8 16:14:05 2007 @@ -275,13 +275,13 @@ white-space: nowrap; } -.kupu-tabs { border-bottom: 1px solid; margin: 0; padding: 0.5em 0 0 1.5em; } +ul.kupu-tabs { border-bottom: 1px solid; margin: 0; padding: 0.5em 0.5em 1px 1.5em; } .kupu-tabs li { display: inline; padding: 2px; border: 1px solid; margin: 0 5px 0 0; } .kupu-tabs a { text-decoration: none; } .kupu-tabs li.selected { background: white; border-bottom: none !IMPORTANT; padding-bottom: 3px;} -table.kupu-tabbed { border-spacing: 0;} +.kupu-panels table.kupu-tabbed { border:none; border-spacing: 0;} .kupu-linkdrawer-addlink .kupu-embed, .kupu-linkdrawer-embed .kupu-addlink { display: none; } @@ -299,6 +299,9 @@ .kupu-ins-bm .hide-ins-bm, .kupu-anchor .hide-anchor, .kupu-toc .hide-toc { display: none; } +.kupu-ins-bm .invis-ins-bm, .kupu-anchor .invis-anchor, .kupu-toc .invis-toc { + visibility: hidden; /* Hide controls without changing surrounding layout */ +} .image-dimensions { display: none; @@ -318,6 +321,10 @@ .kupu-bm-level1 SPAN { padding-left: 2em; } /* Anchor drawer */ +.kupu-bm-help { min-height: 2.5em; } +.kupu-bm-heading { line-height: 2em; border-bottom: 1px solid; } +.kupu-bm-tablestyle, .kupu-bm-numbering { float:right; padding-left: 0.5em; } + .kupu-drawer label { font-weight: normal; vertical-align:middle; Modified: kupu/trunk/kupu/default/drawers.kupu ============================================================================== --- kupu/trunk/kupu/default/drawers.kupu (original) +++ kupu/trunk/kupu/default/drawers.kupu Thu Nov 8 16:14:05 2007 @@ -297,14 +297,14 @@
  • Table of contents
  • - +
    - - +
    -
    -
    +
    +
    +
    @@ -312,39 +312,43 @@
    -
    +
    - + +
    +
    + +
    - -
     
    -
    - Select a paragraph style then choose a paragraph and Ok to insert a link to that location. -
    -
    - Select one or two paragraph styles, then Ok to insert a table of contents. -
    -
    - Anchors are created for checked paragraphs and - removed for unchecked paragraphs when you press Ok. - Anchors in use on this page may not be deleted. -
    + +
    + + Select a paragraph style then choose a paragraph and Ok to insert a link to that location. + + + Select one or two paragraph styles, then Ok to insert a table of contents. + + + Anchors are created for checked paragraphs and + removed for unchecked paragraphs when you press Ok. + Anchors in use on this page may not be deleted. + +
    +
    Modified: kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html ============================================================================== --- kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html (original) +++ kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html Thu Nov 8 16:14:05 2007 @@ -404,14 +404,14 @@
  • Manage Anchors
  • Table of contents
  • - +
    - - +
    -
    -
    +
    +
    +
    @@ -419,37 +419,43 @@
    -
    +
    - + +
    +
    + +
    - -
     
    -
    - Select a paragraph style then choose a paragraph and Ok to insert a link to that location. -
    -
    - Select one or two paragraph styles, then Ok to insert a table of contents. -
    -
    - Anchors are created for checked paragraphs and - removed for unchecked paragraphs when you press Ok. - Anchors in use on this page may not be deleted. -
    + +
    + + Select a paragraph style then choose a paragraph and Ok to insert a link to that location. + + + Select one or two paragraph styles, then Ok to insert a table of contents. + + + Anchors are created for checked paragraphs and + removed for unchecked paragraphs when you press Ok. + Anchors in use on this page may not be deleted. + +
    +
    From duncan at codespeak.net Thu Nov 8 16:15:56 2007 From: duncan at codespeak.net (duncan at codespeak.net) Date: Thu, 8 Nov 2007 16:15:56 +0100 (CET) Subject: [kupu-checkins] r48420 - in kupu/trunk/kupu: . doc Message-ID: <20071108151556.7E0808171@code0.codespeak.net> Author: duncan Date: Thu Nov 8 16:15:56 2007 New Revision: 48420 Modified: kupu/trunk/kupu/doc/CHANGES.txt kupu/trunk/kupu/version.txt Log: Update CHANGES.txt Modified: kupu/trunk/kupu/doc/CHANGES.txt ============================================================================== --- kupu/trunk/kupu/doc/CHANGES.txt (original) +++ kupu/trunk/kupu/doc/CHANGES.txt Thu Nov 8 16:15:56 2007 @@ -2,18 +2,19 @@ Kupu changes ============ -- 1.4.4 SVN/unreleased +- 1.4.4 - Enabled Safari support (needs webkit nightly build and Safari 3) - Plone tickets - * 7224 Kupu: error in iframe tabindex attribute - * 7305 Page creation and kupu upload image returns an error if Kupu link uid's is turned on. - * 7285 Kupu Accesskey for Save conflict with Firefox History Menu * 7099 Kupu error on multi-schemata archetypes content * 7258 Missing translation msgids for kupu + * 7224 Kupu: error in iframe tabindex attribute * 7229 kupu 1.4.3 css correction to display redo button icon in editing interface + * 7285 Kupu Accesskey for Save conflict with Firefox History Menu + * 7305 Page creation and kupu upload image returns an error if Kupu link uid's is turned on. + * 7315 Kupu table of contents generator doesn't allow multiple paragraph styles to be selected in IE7 - 1.4.3 Modified: kupu/trunk/kupu/version.txt ============================================================================== --- kupu/trunk/kupu/version.txt (original) +++ kupu/trunk/kupu/version.txt Thu Nov 8 16:15:56 2007 @@ -1 +1 @@ -kupu 1.4.3 +kupu 1.4.4 From duncan at codespeak.net Thu Nov 8 17:07:01 2007 From: duncan at codespeak.net (duncan at codespeak.net) Date: Thu, 8 Nov 2007 17:07:01 +0100 (CET) Subject: [kupu-checkins] r48421 - kupu/trunk/kupu/common Message-ID: <20071108160701.2694C816C@code0.codespeak.net> Author: duncan Date: Thu Nov 8 17:07:00 2007 New Revision: 48421 Modified: kupu/trunk/kupu/common/kupubasetools.js kupu/trunk/kupu/common/kupudrawers.js Log: Fix safari link insertion: safari has a weird implementation of the CreateLink command which inserts new links with the url as text content. This makes it hard to detect when a new link was inserted (as opposed to an existing link reformatted), everything else inserts a blank link. Modified: kupu/trunk/kupu/common/kupubasetools.js ============================================================================== --- kupu/trunk/kupu/common/kupubasetools.js (original) +++ kupu/trunk/kupu/common/kupubasetools.js Thu Nov 8 17:07:00 2007 @@ -1039,14 +1039,15 @@ linkWindow.focus(); }; - this.updateLink = function (linkel, url, type, name, target, title, className) { + this.updateLink = function (linkel, url, type, name, target, title, className, bForce) { if (type && type == 'anchor') { linkel.removeAttribute('href'); linkel.setAttribute('name', name); } else { linkel.href = url; - if (linkel.innerHTML == "") { + if (linkel.innerHTML == "" || (bForce && linkel.innerHTML==url)) { var doc = this.editor.getInnerDocument(); + while (linkel.firstChild) { linkel.removeChild(linkel.firstChild); }; linkel.appendChild(doc.createTextNode(title || url)); } if (title) { @@ -1069,13 +1070,13 @@ }; }; - this.formatSelectedLink = function(url, type, name, target, title, className) { + this.formatSelectedLink = function(url, type, name, target, title, className, bForce) { var currnode = this.editor.getSelectedNode(); // selection inside link var linkel = this.editor.getNearestParentOfType(currnode, 'A'); if (linkel) { - this.updateLink(linkel, url, type, name, target, title, className); + this.updateLink(linkel, url, type, name, target, title, className, bForce); return true; } @@ -1088,7 +1089,7 @@ for (var i = 0; i < linkelements.length; i++) { linkel = linkelements[i]; if (selection.containsNode(linkel)) { - this.updateLink(linkel, url, type, name, target, title, className); + this.updateLink(linkel, url, type, name, target, title, className, bForce); containsLink = true; } }; @@ -1116,7 +1117,7 @@ if (!this.formatSelectedLink(url, type, name, target, title, className)) { // No links inside or outside. this.editor.execCommand("CreateLink", url); - if (!this.formatSelectedLink(url, type, name, target, title, className)) { + if (!this.formatSelectedLink(url, type, name, target, title, className, true)) { // Insert link with no text selected, insert the title // or URI instead. var doc = this.editor.getInnerDocument(); Modified: kupu/trunk/kupu/common/kupudrawers.js ============================================================================== --- kupu/trunk/kupu/common/kupudrawers.js (original) +++ kupu/trunk/kupu/common/kupudrawers.js Thu Nov 8 17:07:00 2007 @@ -369,7 +369,7 @@ this.editor.resumeEditing(); if (this.getMode()) { var url = input.value; - this.tool.createLink(url, null, null, this.target, 'external-link'); + this.tool.createLink(url, null, null, this.target, null, 'external-link'); input.value = ''; } else { // Import the html From duncan at codespeak.net Fri Nov 9 11:15:18 2007 From: duncan at codespeak.net (duncan at codespeak.net) Date: Fri, 9 Nov 2007 11:15:18 +0100 (CET) Subject: [kupu-checkins] r48462 - kupu/tag/kupu-1.4.4 Message-ID: <20071109101518.4CC9081C5@code0.codespeak.net> Author: duncan Date: Fri Nov 9 11:15:16 2007 New Revision: 48462 Added: kupu/tag/kupu-1.4.4/ - copied from r48461, kupu/trunk/kupu/ Log: Tagged Kupu 1.4.4 From duncan at codespeak.net Fri Nov 9 15:08:39 2007 From: duncan at codespeak.net (duncan at codespeak.net) Date: Fri, 9 Nov 2007 15:08:39 +0100 (CET) Subject: [kupu-checkins] r48472 - in kupu/branch/kupu-1.4: . common common/kupudrawers default doc plone plone/kupu_plone_layer plone/kupu_references plone/profiles/default plone/tests plone/tests/output Message-ID: <20071109140839.EC78D81E1@code0.codespeak.net> Author: duncan Date: Fri Nov 9 15:08:37 2007 New Revision: 48472 Modified: kupu/branch/kupu-1.4/common/kupubasetools.js kupu/branch/kupu-1.4/common/kupucontentfilters.js kupu/branch/kupu-1.4/common/kupudrawers.js kupu/branch/kupu-1.4/common/kupudrawers/drawer.xsl kupu/branch/kupu-1.4/common/kupudrawerstyles.css kupu/branch/kupu-1.4/common/kupueditor.js kupu/branch/kupu-1.4/common/kupuhelpers.js kupu/branch/kupu-1.4/common/sarissa.js kupu/branch/kupu-1.4/default/drawers.kupu kupu/branch/kupu-1.4/default/toolbar.kupu kupu/branch/kupu-1.4/doc/CHANGES.txt kupu/branch/kupu-1.4/doc/PLONE2.txt kupu/branch/kupu-1.4/i18n.bat kupu/branch/kupu-1.4/plone/body.kupu kupu/branch/kupu-1.4/plone/helpers.py kupu/branch/kupu-1.4/plone/html2captioned.py kupu/branch/kupu-1.4/plone/kupu_config.pt kupu/branch/kupu-1.4/plone/kupu_plone_layer/kupu_captioned_image.pt kupu/branch/kupu-1.4/plone/kupu_plone_layer/kupu_wysiwyg_support.html kupu/branch/kupu-1.4/plone/kupu_plone_layer/kupuplone.css.dtml kupu/branch/kupu-1.4/plone/kupu_plone_layer/kupuploneeditor.js kupu/branch/kupu-1.4/plone/kupu_plone_layer/kupusearch.xml.pt kupu/branch/kupu-1.4/plone/kupu_plone_layer/sample-kupu-customisation-policy.py kupu/branch/kupu-1.4/plone/kupu_references/referencebrowser.pt kupu/branch/kupu-1.4/plone/plonedrawers.py kupu/branch/kupu-1.4/plone/plonelibrarytool.py kupu/branch/kupu-1.4/plone/profiles/default/kupu.xml kupu/branch/kupu-1.4/plone/save.kupu kupu/branch/kupu-1.4/plone/tests/output/linked.out kupu/branch/kupu-1.4/plone/tests/output/notquoted.out kupu/branch/kupu-1.4/plone/tests/output/simple.out kupu/branch/kupu-1.4/plone/tests/test_html2captioned.py kupu/branch/kupu-1.4/plone/util.py kupu/branch/kupu-1.4/plone/wire.kupu kupu/branch/kupu-1.4/plone/z3interfaces.py kupu/branch/kupu-1.4/plone/zmi_docs.pt kupu/branch/kupu-1.4/version.txt Log: Bring 1.4 branch up to date with 1.4.4 trunk Modified: kupu/branch/kupu-1.4/common/kupubasetools.js ============================================================================== --- kupu/branch/kupu-1.4/common/kupubasetools.js (original) +++ kupu/branch/kupu-1.4/common/kupubasetools.js Fri Nov 9 15:08:37 2007 @@ -677,7 +677,7 @@ this._removeStyle = function() { function needbreak(e) { if (isblock && e) { - if (blocktagre.test(e.nodeName) || e.nodeName=='BR') return; + if (blocktagre.test(e.nodeName) || /^br$/i.test(e.nodeName)) return; parent.insertBefore(ed.newElement('br'), n); } } @@ -1039,14 +1039,15 @@ linkWindow.focus(); }; - this.updateLink = function (linkel, url, type, name, target, title, className) { + this.updateLink = function (linkel, url, type, name, target, title, className, bForce) { if (type && type == 'anchor') { linkel.removeAttribute('href'); linkel.setAttribute('name', name); } else { linkel.href = url; - if (linkel.innerHTML == "") { + if (linkel.innerHTML == "" || (bForce && linkel.innerHTML==url)) { var doc = this.editor.getInnerDocument(); + while (linkel.firstChild) { linkel.removeChild(linkel.firstChild); }; linkel.appendChild(doc.createTextNode(title || url)); } if (title) { @@ -1069,13 +1070,13 @@ }; }; - this.formatSelectedLink = function(url, type, name, target, title, className) { + this.formatSelectedLink = function(url, type, name, target, title, className, bForce) { var currnode = this.editor.getSelectedNode(); // selection inside link var linkel = this.editor.getNearestParentOfType(currnode, 'A'); if (linkel) { - this.updateLink(linkel, url, type, name, target, title, className); + this.updateLink(linkel, url, type, name, target, title, className, bForce); return true; } @@ -1088,7 +1089,7 @@ for (var i = 0; i < linkelements.length; i++) { linkel = linkelements[i]; if (selection.containsNode(linkel)) { - this.updateLink(linkel, url, type, name, target, title, className); + this.updateLink(linkel, url, type, name, target, title, className, bForce); containsLink = true; } }; @@ -1116,7 +1117,7 @@ if (!this.formatSelectedLink(url, type, name, target, title, className)) { // No links inside or outside. this.editor.execCommand("CreateLink", url); - if (!this.formatSelectedLink(url, type, name, target, title, className)) { + if (!this.formatSelectedLink(url, type, name, target, title, className, true)) { // Insert link with no text selected, insert the title // or URI instead. var doc = this.editor.getInnerDocument(); @@ -1711,8 +1712,7 @@ for (var i=0; i < currtable.childNodes.length; i++) { var currtbody = currtable.childNodes[i]; if (currtbody.nodeType != 1 || - (currtbody.nodeName.toUpperCase() != "THEAD" && - currtbody.nodeName.toUpperCase() != "TBODY")) { + (/^thead|tbody$/i.test(currtbody.nodeName))) { continue; } for (var j=0; j < currtbody.childNodes.length; j++) { @@ -1808,7 +1808,7 @@ this._isBodyRow = function(row) { for (var node = row.firstChild; node; node=node.nextSibling) { - if (/TD/.test(node.nodeName)) { + if (/^td$/i.test(node.nodeName)) { return true; } } @@ -1819,7 +1819,7 @@ // Remove formatted div or p from a cell var nxt, n; for (var node = el.firstChild; node;) { - if (/^DIV|P$/i.test(node.nodeName)) { + if (/^div|p$/i.test(node.nodeName)) { for (var n = node.firstChild; n;) { var nxt = n.nextSibling; el.insertBefore(n, node); // Move nodes out of div @@ -1857,7 +1857,7 @@ var row = rows[i]; var currnumcols = 0; for (var node = row.firstChild; node; node=node.nextSibling) { - if (/td|th/i.test(node.nodeName)) { + if (/^(td|th)$/i.test(node.nodeName)) { currnumcols += parseInt(node.getAttribute('colSpan') || '1'); }; }; @@ -1879,7 +1879,7 @@ } for (var node = row.firstChild; node;) { var nxt = node.nextSibling; - if (/TD|TH/.test(node.nodeName)) { + if (/^(td|th)$/i.test(node.nodeName)) { this._cleanCell(node); newrow.appendChild(node); }; @@ -1936,13 +1936,13 @@ var hrows = [], brows = [], frows = []; for (var node = table.firstChild; node; node = node.nextSibling) { - var nodeName = node.nodeName; - if (/TR/.test(node.nodeName)) { + var nodeName = node.nodeName.toLowerCase(); + if (/tr/i.test(node.nodeName)) { brows.push(node); - } else if (/THEAD|TBODY|TFOOT/.test(node.nodeName)) { - var rows = nodeName=='THEAD' ? hrows : nodeName=='TFOOT' ? frows : brows; + } else if (/thead|tbody|tfoot/i.test(node.nodeName)) { + var rows = nodeName=='thead' ? hrows : nodeName=='tfoot' ? frows : brows; for (var inode = node.firstChild; inode; inode = inode.nextSibling) { - if (/TR/.test(inode.nodeName)) { + if (/tr/i.test(inode.nodeName)) { rows.push(inode); }; }; @@ -2308,11 +2308,12 @@ var path = ''; var url = null; // for links we want to display the url too var currnode = selNode; - while (currnode != null && currnode.nodeName != '#document') { - if (currnode.nodeName.toLowerCase() == 'a') { + var nn; + while (currnode != null && (nn=currnode.nodeName.toLowerCase()) != '#document') { + if (nn=='a') { url = currnode.getAttribute('href'); }; - path = '/' + currnode.nodeName.toLowerCase() + path; + path = '/' + nn + path; currnode = currnode.parentNode; } 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 Fri Nov 9 15:08:37 2007 @@ -724,7 +724,7 @@ var kid = kids[i]; if (kid.parentNode !== htmlnode) { - if (kid.tagName == 'BODY') { + if (kid.tagName.toLowerCase()=='body') { if (nodename != 'html') continue; } else if (kid.parentNode.tagName === htmlnode.tagName) { continue; // IE bug: nodes appear multiple places 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 Fri Nov 9 15:08:37 2007 @@ -155,9 +155,9 @@ event = event || window.event; var target = event.currentTarget || event.srcElement; var el = target; - while (el.nodeName != 'LI') { el = el.parentNode; }; + while (!/^li$/i.test(el.nodeName)) { el = el.parentNode; }; var thistab = el; - while (el.nodeName != 'UL') { el = el.parentNode; }; + while (!/^ul$/i.test(el.nodeName)) { el = el.parentNode; }; var tabs = el.getElementsByTagName('li'); for (var i = 0; i < tabs.length; i++) { var el = tabs[i]; @@ -243,21 +243,19 @@ proto.anchorText = function(a) { // Text inside anchor, or immediate sibling block tag, or parent block. - var blocktag = /^DIV|P|BODY|TD|H.$/; + var blocktag = /^div|p|body|td|h.$/i; var txt = ''; var prefix = '#' + a.name; -findlabel: + for (var node = a; node && !txt; node=node.parentNode) { var txt = node.textContent || node.innerText || ''; if (txt || blocktag.test(node.nodeName)) { break; } - for (var sibling = node.nextSibling; sibling; sibling = sibling.nextSibling) { - if (sibling.nodeName=='#text') { + for (var sibling = node.nextSibling; sibling && !txt; sibling = sibling.nextSibling) { + if (sibling.nodeName.toLowerCase()=='#text') { txt = sibling.data.strip(); - } else if (blocktag.test(sibling.nodeName)) { - break findlabel; } else { txt += sibling.textContent || sibling.innerText ||''; }; @@ -371,7 +369,7 @@ this.editor.resumeEditing(); if (this.getMode()) { var url = input.value; - this.tool.createLink(url, null, null, this.target, 'external-link'); + this.tool.createLink(url, null, null, this.target, null, 'external-link'); input.value = ''; } else { // Import the html @@ -442,7 +440,7 @@ var there = preview.contentWindow.location.href; } catch(e) { return; } - if (here != there && !(/^about:/.test(there))) { + if (there && here != there && !(/^about:/.test(there))) { input.value = there; } this.showAnchors(currentAnchor()); @@ -928,8 +926,10 @@ if (this.editor.getBrowserName() == 'IE') { newitemsnode = newitemsnode.cloneNode(true); + if (newbc) newbc = newbc.cloneNode(true); } else { newitemsnode = this.xmldata.importNode(newitemsnode, true); + if (newbc) newbc = this.xmldata.importNode(newbc, true); } if (newbc) { if (bcnode) { @@ -1299,7 +1299,7 @@ if (this.editor.getBrowserName() == 'IE') { resultlib = resultlib.cloneNode(true); } else { - this.xmldata.importNode(resultlib, true); + resultlib = this.xmldata.importNode(resultlib, true); } var libraries = this.xmldata.selectSingleNode("/libraries"); libraries.appendChild(resultlib); @@ -1400,10 +1400,20 @@ } this.createContent = function() { + function getSel(sel, p, t) { + var nodes = p.getElementsByTagName(t); + for (var i = 0; i < nodes.length; i++) { + if (sel.containsNode(nodes[i])) { + return nodes[i]; + }; + }; + } var ed = this.editor; + var sel = ed.getSelection(); var currnode = ed.getSelectedNode(); - var currimg = ed.getNearestParentOfType(currnode, 'OBJECT') || ed.getNearestParentOfType(currnode, 'IMG'); - this.selectedSrc = currimg.data||currimg.src||null; + var currimg = ed.getNearestParentOfType(currnode, 'OBJECT') || ed.getNearestParentOfType(currnode, 'IMG') || + getSel(sel, currnode, 'object') || getSel(sel, currnode, 'img'); + this.selectedSrc = currimg?(currimg.data||currimg.src||null):null; this.options = {}; if (currimg) { ed.getSelection().selectNodeContents(currimg); @@ -1711,7 +1721,7 @@ if (level==0) { toc.appendChild(li); } else { - if (!toc.lastChild || toc.lastChild.nodeName != 'ul') { + if (!toc.lastChild || toc.lastChild.nodeName.toLowerCase() != 'ul') { toc.appendChild(ed.newElement('ul')); } toc.lastChild.appendChild(li); @@ -1735,10 +1745,10 @@ }; } var node = ed.getSelection().parentElement(); - if (node.nodeName == 'BODY') { + if (node.nodeName.toLowerCase() == 'body') { node.insertBefore(toc, node.firstChild); } else { - while (node.parentNode.nodeName != 'BODY') { + while (node.parentNode.nodeName.toLowerCase() != 'body') { node = node.parentNode; } node.parentNode.insertBefore(toc, node); Modified: kupu/branch/kupu-1.4/common/kupudrawers/drawer.xsl ============================================================================== --- kupu/branch/kupu-1.4/common/kupudrawers/drawer.xsl (original) +++ kupu/branch/kupu-1.4/common/kupudrawers/drawer.xsl Fri Nov 9 15:08:37 2007 @@ -390,9 +390,10 @@ -