[kupu-checkins] r43939 - in kupu/trunk/kupu: . common plone plone/kupu_plone_layer

duncan at codespeak.net duncan at codespeak.net
Thu May 31 14:44:53 CEST 2007


Author: duncan
Date: Thu May 31 14:44:51 2007
New Revision: 43939

Modified:
   kupu/trunk/kupu/common/kupudrawers.js
   kupu/trunk/kupu/common/kupueditor.js
   kupu/trunk/kupu/jslint.opts
   kupu/trunk/kupu/plone/html2captioned.py
   kupu/trunk/kupu/plone/kupu_plone_layer/kupuploneinit.js
Log:
Lint clean again.
Captioned images now go <dl><dt/><dd/></dl> instead of <div><div/><div/></div>.


Modified: kupu/trunk/kupu/common/kupudrawers.js
==============================================================================
--- kupu/trunk/kupu/common/kupudrawers.js	(original)
+++ kupu/trunk/kupu/common/kupudrawers.js	Thu May 31 14:44:51 2007
@@ -143,7 +143,7 @@
         st.position = 'absolute';
         st.display = '';
     }
-}
+};
 
 proto.switchMode = function(event) {
     event = event || window.event;
@@ -187,7 +187,6 @@
     function onloadEvent() {
         var state = anchorframe.readyState;
         if (state && !(/complete/.test(state))) {
-            console.log("state="+state+", limit="+limit);
             if (limit-- && anchorframe.src==src) {
                 timer_instance.registerFunction(this, onloadEvent, 500);
             } else {
@@ -202,8 +201,7 @@
     };
 
     var id = 'kupu-linkdrawer-anchors';
-    var base = this.anchorui = getBaseTagClass(this.element, 'div', id);
-    var self = this;
+    var base = (this.anchorui = getBaseTagClass(this.element, 'div', id));
     if (base) {
         var inp = base.getElementsByTagName('input');
         if (inp.length > 1) {
@@ -376,7 +374,7 @@
             var dummy = doc.createElement("div");
             dummy.innerHTML = embed.value;
             try {
-                for (i=dummy.childNodes.length-1; i >= 0; i--) {
+                for (var j=dummy.childNodes.length-1; j >= 0; j--) {
                     var c = dummy.childNodes[i];
                     if (/^\//.test(c.nodeName))
                     {

Modified: kupu/trunk/kupu/common/kupueditor.js
==============================================================================
--- kupu/trunk/kupu/common/kupueditor.js	(original)
+++ kupu/trunk/kupu/common/kupueditor.js	Thu May 31 14:44:51 2007
@@ -593,7 +593,7 @@
 
     this.onSelectionChange = function(event) {
         this._saveSelection();
-    }
+    };
 
     this._isDocumentSelected = function() {
         var editable_body = this.getInnerDocument().getElementsByTagName('body')[0];
@@ -819,13 +819,13 @@
             this.setClass('kupu-busy');
         }
         busycount++;
-    }
+    };
     this.notbusy = function(force) {
         busycount = force?0:busycount?busycount-1:0;
         if (busycount <= 0) {
             this.clearClass('kupu-busy');
         }
-    }
+    };
 
     this.suspendEditing = function() {
         this._previous_range = this.getSelection().getRange();

Modified: kupu/trunk/kupu/jslint.opts
==============================================================================
--- kupu/trunk/kupu/jslint.opts	(original)
+++ kupu/trunk/kupu/jslint.opts	Thu May 31 14:44:51 2007
@@ -2,7 +2,7 @@
 --extern _,_IE_VERSION,_SARISSA_IS_IE,_SARISSA_IS_MOZ,ActiveXObject
 --extern addEventHandler,AnchorDrawer,AnchorTool,CleanupExpressionsTool
 --extern ColorchooserTool,ContextFixer,ContextMenu,ContextMenuElement
---extern DefinitionListTool,DrawerTool,extern,getBaseTagClass,getFromSelector
+--extern DefinitionListTool,DrawerTool,extern,getBaseTagClass,getFromSelector, getOuterHtml
 --extern IESelection,ImageLibraryDrawer,ImageTool,ImageToolBox,initKupu,kupu
 --extern KupuButton,kupuButtonDisable,kupuButtonEnable,KupuDocument,KupuEditor,kupuFixImage
 --extern KupuInspector,KupuRemoveElementButton,KupuSpellChecker,KupuStateButton

Modified: kupu/trunk/kupu/plone/html2captioned.py
==============================================================================
--- kupu/trunk/kupu/plone/html2captioned.py	(original)
+++ kupu/trunk/kupu/plone/html2captioned.py	Thu May 31 14:44:51 2007
@@ -52,14 +52,14 @@
 ALT_PATTERN = re.compile('\\balt\s*=\s*("[^"]*"|[^" \/>]+)')
 END_TAG_PATTERN = re.compile('(<img[^>]*?)( */?>)')
 IMAGE_TEMPLATE = '''\
-<div class="%(class)s" style="width:%(width)spx;">
- <div style="width:%(width)spx;">
+<dl class="%(class)s" style="width:%(width)spx;">
+ <dt style="width:%(width)spx;">
   %(tag)s
- </div>
- <div class="image-caption">
+ </dt>
+ <dd class="image-caption">
   %(caption)s
- </div>
-</div>
+ </dd>
+</dl>
 '''
 
 UID_PATTERN = re.compile('(?P<tag><(?:a|img|object|param)\\s[^>]*(?:src|href|data|value)\s*=\s*")(?P<url>[^"]*resolveuid/(?P<uid>[^/"#? ]*))', re.DOTALL | re.IGNORECASE)

Modified: kupu/trunk/kupu/plone/kupu_plone_layer/kupuploneinit.js
==============================================================================
--- kupu/trunk/kupu/plone/kupu_plone_layer/kupuploneinit.js	(original)
+++ kupu/trunk/kupu/plone/kupu_plone_layer/kupuploneinit.js	Thu May 31 14:44:51 2007
@@ -19,7 +19,6 @@
     };
     iframe._kupuIsInitialized = true;
     var textarea = getFromSelector(prefix+'textarea.kupu-editor-textarea');
-    var ibody = iframe.contentWindow.document.body;
     var form = textarea.form;
     var initialtext = textarea.value || (_SARISSA_IS_IE?'<p></p>':'<p><br></p>');
 


More information about the kupu-checkins mailing list