[kupu-checkins] r32844 - in kupu/trunk/kupu: common default

duncan at codespeak.net duncan at codespeak.net
Tue Oct 3 16:35:22 CEST 2006


Author: duncan
Date: Tue Oct  3 16:35:21 2006
New Revision: 32844

Modified:
   kupu/trunk/kupu/common/kupudrawers.js
   kupu/trunk/kupu/common/kupudrawerstyles.css
   kupu/trunk/kupu/default/drawers.kupu
Log:
Anchor links created when nothing is selected should insert something meaningful as the link text.
Added some help text to the anchor drawer.

Modified: kupu/trunk/kupu/common/kupudrawers.js
==============================================================================
--- kupu/trunk/kupu/common/kupudrawers.js	(original)
+++ kupu/trunk/kupu/common/kupudrawers.js	Tue Oct  3 16:35:21 2006
@@ -1463,9 +1463,7 @@
             }
         }
 
-        var paras = this.tool.grubParas(s[0], s[1]);
-        this.nodelist = paras;
-
+        var paras = this.nodelist = this.tool.grubParas(s[0], s[1]);
         for (var i = 0; i < paras.length; i++) {
             var node = paras[i][0];
             var text = Sarissa.getText(node, true).strip().truncate(60);
@@ -1508,13 +1506,12 @@
                 var node = nodeinfo[0];
                 var level = nodeinfo[1];
                 var a = this.tool.getAnchor(node);
+                var caption = Sarissa.getText(node).truncate(140);
                 if (isSingle) {
-                    var title = '[' +(this.styleNames[nodeinfo[1]] + ' ' + nodeinfo[2]).strip() + ']';
-                    this.tool.createLink('#'+a, null, null, null, title);
+                    this.tool.createLink('#'+a, null, null, null, caption);
                     break;
                 } else {
                     /* Insert TOC entry here */
-                    var caption = Sarissa.getText(node).truncate(140);
                     var number;
                     if (level==0) {
                         number = ++lvl1;

Modified: kupu/trunk/kupu/common/kupudrawerstyles.css
==============================================================================
--- kupu/trunk/kupu/common/kupudrawerstyles.css	(original)
+++ kupu/trunk/kupu/common/kupudrawerstyles.css	Tue Oct  3 16:35:21 2006
@@ -253,6 +253,9 @@
 .kupu-ins-bm #kupu-bm-sel2, .kupu-ins-bm .kupu-bm-heading {
    display:none;
 }
+.kupu-ins-bm .kupu-bm-helptoc,.kupu-toc .kupu-bm-helpanchor {
+  display: none;
+}
 
 table.kupu-ins-bm, table.kupu-toc {
    height: 20em;
@@ -261,7 +264,7 @@
    width: 1%;
 }
 .kupu-bm-paras {
-  height: 18em; width:100%;
+   height: 18em; width:100%;
    white-space: nowrap;
    overflow: auto;
 }

Modified: kupu/trunk/kupu/default/drawers.kupu
==============================================================================
--- kupu/trunk/kupu/default/drawers.kupu	(original)
+++ kupu/trunk/kupu/default/drawers.kupu	Tue Oct  3 16:35:21 2006
@@ -269,7 +269,13 @@
                 </label>
                 <input type="checkbox" checked="checked" id="kupu-bm-checkall"/>
               </div>
-              <div class="kupu-bm-paras"/>
+              <div class="kupu-bm-paras">&nbsp;</div>
+              <div class="kupu-bm-helpanchor">
+                Select a paragraph style then choose a paragraph and Ok to insert a link to that location.
+              </div>
+              <div class="kupu-bm-helptoc">
+                Select one or two paragraph styles, then Ok to insert a table of contents.
+              </div>
             </td>
           </tr>
           <tr>


More information about the kupu-checkins mailing list