[kupu-checkins] r43562 - in kupu/trunk/kupu: common default plone/kupu_plone_layer
duncan at codespeak.net
duncan at codespeak.net
Tue May 22 15:03:43 CEST 2007
Author: duncan
Date: Tue May 22 15:03:41 2007
New Revision: 43562
Modified:
kupu/trunk/kupu/common/kupudrawers.js
kupu/trunk/kupu/common/kupudrawerstyles.css
kupu/trunk/kupu/default/drawers.kupu
kupu/trunk/kupu/plone/kupu_plone_layer/kupu_wysiwyg_support.html
kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml
Log:
Anchor drawer now has tabs instead of radio buttons.
Modified: kupu/trunk/kupu/common/kupudrawers.js
==============================================================================
--- kupu/trunk/kupu/common/kupudrawers.js (original)
+++ kupu/trunk/kupu/common/kupudrawers.js Tue May 22 15:03:41 2007
@@ -1464,18 +1464,18 @@
this.initialize = function(editor, tool) {
Drawer.prototype.initialize.apply(this, [editor, tool]);
- this.table = this.element.getElementsByTagName('table')[0];
+ this.panel = getBaseTagClass(this.element, 'div', 'kupu-panels');
this.style1 = getFromSelector('kupu-bm-sel1');
this.style2 = getFromSelector('kupu-bm-sel2');
this.ostyle = getFromSelector('kupu-bm-outcls');
this.nstyle = getFromSelector('kupu-bm-number');
- this.radio1 = getFromSelector('kupu-ins-bm');
- this.radio2 = getFromSelector('kupu-toc');
+ var tabs = getBaseTagClass(this.element, 'ul', 'kupu-tabs').getElementsByTagName('a');
this.paralist = getBaseTagClass(this.element, 'div', 'kupu-bm-paras');
this.checkall = getFromSelector('kupu-bm-checkall');
-
- addEventHandler(this.radio1, 'click', this.switchMode, this);
- addEventHandler(this.radio2, 'click', this.switchMode, this);
+
+ for (var i = 0; i < tabs.length; i++) {
+ addEventHandler(tabs[i], 'click', this.switchMode, this);
+ }
addEventHandler(this.checkall, 'click', this.checkAll, this);
addEventHandler(this.style1, 'change', this.fillList, this);
addEventHandler(this.style2, 'change', this.fillList, this);
@@ -1484,7 +1484,7 @@
this.tool.fillStyleSelect(this.ostyle);
};
this.getMode = function() {
- return this.radio1.checked;
+ return !!(/kupu-ins-bm/.test(this.panel.className));
};
this.checkAll = function() {
@@ -1497,8 +1497,11 @@
this.switchMode = function(event) {
event = event || window.event;
var target = event.currentTarget || event.srcElement;
- this.table.className = target.id;
+ this.panel.className = 'kupu-panels '+target.parentNode.className;
this.fillList();
+ if (event.preventDefault) { event.preventDefault();}
+ event.returnValue = false;
+ return false;
};
this.fillList = function() {
var el = newElement;
@@ -1539,7 +1542,6 @@
};
};
this.createContent = function() {
- if (this.radio2.checked) this.table.className=this.radio2.id;
this.fillList();
this.element.style.display = 'block';
this.focusElement();
Modified: kupu/trunk/kupu/common/kupudrawerstyles.css
==============================================================================
--- kupu/trunk/kupu/common/kupudrawerstyles.css (original)
+++ kupu/trunk/kupu/common/kupudrawerstyles.css Tue May 22 15:03:41 2007
@@ -130,6 +130,7 @@
margin: 0;
padding: 0;
border: 0;
+ clear:left;
}
td.panel {
@@ -267,6 +268,14 @@
white-space: nowrap;
}
+.kupu-tabs { border-bottom: 1px solid; margin: 0; padding: 0.5em 0 0 1.5em; }
+.kupu-tabs li {
+ display: inline; padding: 2px; border: 1px solid; margin: 0 5px 0 0;
+}
+.kupu-tabs a { text-decoration: none; }
+.kupu-ins-bm li.kupu-ins-bm, .kupu-toc li.kupu-toc { background: white; border-bottom: none !IMPORTANT; padding-bottom: 3px;}
+table.kupu-tabbed { border-spacing: 0;}
+
.kupu-ins-bm #kupu-bm-sel2, .kupu-ins-bm .kupu-bm-heading {
display:none;
}
Modified: kupu/trunk/kupu/default/drawers.kupu
==============================================================================
--- kupu/trunk/kupu/default/drawers.kupu (original)
+++ kupu/trunk/kupu/default/drawers.kupu Tue May 22 15:03:41 2007
@@ -47,6 +47,10 @@
<h1 class="kupu-drawer-title" i18n:translate="">External Link</h1>
<div id="kupu-linkdrawer-addlink" class="kupu-panels kupu-linkdrawer-addlink">
+ <ul>
+ <li><a href="#">Link to url</a></li>
+ <li><a href="#">Embed external object</a></li>
+ </ul>
<table cellspacing="0">
<tr><td><div class="kupu-toolbox-label">
<!-- Link to items matching the keyword -->
@@ -240,20 +244,12 @@
<kupu:part name="anchordrawer">
<div id="kupu-anchordrawer" class="kupu-drawer kupu-anchordrawer">
<h1 class="kupu-drawer-title" i18n:translate="anchordrawer_title">Anchors</h1>
- <div class="kupu-panels">
- <table class="kupu-ins-bm">
- <tr style="margin-bottom: 5px">
- <td colspan="2">
- <label i18n:translate="" for="kupu-ins-bm">
- Link to anchor
- </label>
- <input type="radio" name="kupu-bm-mode" checked="checked" id="kupu-ins-bm"/>
- <label for="kupu-toc" i18n:translate="">
- Table of contents
- </label>
- <input type="radio" name="kupu-bm-mode" id="kupu-toc"/>
- </td>
- </tr>
+ <div class="kupu-panels kupu-ins-bm">
+ <ul class="kupu-tabs">
+ <li class="kupu-ins-bm"><a href="#" i18n:translate="">Link to anchor</a></li>
+ <li class="kupu-toc"><a href="#" i18n:translate="">Table of contents</a></li>
+ </ul>
+ <table class="kupu-tabbed">
<tr>
<td class="kupu-bm-select">
<select id="kupu-bm-sel1" size="10"> </select>
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 Tue May 22 15:03:41 2007
@@ -21,7 +21,7 @@
<!--$Id: wire.kupu 25247 2006-04-03 11:23:02Z fschulze $-->
<!--$Id: head.kupu 34332 2006-11-07 14:50:40Z duncan $-->
<!--$Id: xmlconfig.kupu 35367 2006-12-06 09:06:21Z duncan $-->
- <!--$Id: body.kupu 43479 2007-05-18 13:02:42Z duncan $-->
+ <!--$Id: body.kupu 43482 2007-05-18 13:47:41Z duncan $-->
<!--$Id: toolbar.kupu 35491 2006-12-08 15:41:49Z duncan $-->
<!--$Id save.kupu (not yet in svn) $-->
<!--$Id: drawers.kupu 35477 2006-12-08 13:20:38Z duncan $-->
@@ -227,6 +227,10 @@
<h1 class="kupu-drawer-title" i18n:translate="">External Link</h1>
<div id="kupu-linkdrawer-addlink" class="kupu-panels kupu-linkdrawer-addlink">
+ <ul>
+ <li><a href="#">Link to url</a></li>
+ <li><a href="#">Embed external object</a></li>
+ </ul>
<table cellspacing="0">
<tr><td><div class="kupu-toolbox-label">
@@ -366,20 +370,12 @@
<div id="kupu-anchordrawer" class="kupu-drawer kupu-anchordrawer">
<h1 class="kupu-drawer-title" i18n:translate="anchordrawer_title">Anchors</h1>
- <div class="kupu-panels">
- <table class="kupu-ins-bm">
- <tr style="margin-bottom: 5px">
- <td colspan="2">
- <label i18n:translate="" for="kupu-ins-bm">
- Link to anchor
- </label>
- <input type="radio" name="kupu-bm-mode" checked="checked" id="kupu-ins-bm"/>
- <label for="kupu-toc" i18n:translate="">
- Table of contents
- </label>
- <input type="radio" name="kupu-bm-mode" id="kupu-toc"/>
- </td>
- </tr>
+ <div class="kupu-panels kupu-ins-bm">
+ <ul class="kupu-tabs">
+ <li class="kupu-ins-bm"><a href="#" i18n:translate="">Link to anchor</a></li>
+ <li class="kupu-toc"><a href="#" i18n:translate="">Table of contents</a></li>
+ </ul>
+ <table class="kupu-tabbed">
<tr>
<td class="kupu-bm-select">
<select id="kupu-bm-sel1" size="10"> </select>
Modified: kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml
==============================================================================
--- kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml (original)
+++ kupu/trunk/kupu/plone/kupu_plone_layer/kupuplone.css.dtml Tue May 22 15:03:41 2007
@@ -84,6 +84,14 @@
border:1px solid &dtml-contentViewBorderColor;;
}
+ul.kupu-tabs li {
+ background-color:&dtml-contentViewBackgroundColor;;
+ border:1px solid &dtml-contentViewBorderColor;;
+}
+ul.kupu-tabs {
+ border-bottom: 1px solid &dtml-contentViewBorderColor;;
+}
+
.kupu-tb-buttons button {
width: 24px;
height: 24px;
More information about the kupu-checkins
mailing list