[Checkins] SVN: zope3org/trunk/src/zorg/wikification/browser/ Fixed a position problem of the wikilink menu.

Uwe Oestermeier uwe_oestermeier at iwm-kmrc.de
Sun Jul 2 09:15:02 EDT 2006


Log message for revision 68953:
  Fixed a position problem of the wikilink menu.

Changed:
  U   zope3org/trunk/src/zorg/wikification/browser/scripts/link.js
  U   zope3org/trunk/src/zorg/wikification/browser/style/main.css
  U   zope3org/trunk/src/zorg/wikification/browser/style/screen.css
  U   zope3org/trunk/src/zorg/wikification/browser/templates/edit.pt
  U   zope3org/trunk/src/zorg/wikification/browser/templates/view.pt
  U   zope3org/trunk/src/zorg/wikification/browser/wikipage.py

-=-
Modified: zope3org/trunk/src/zorg/wikification/browser/scripts/link.js
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/scripts/link.js	2006-07-02 13:11:41 UTC (rev 68952)
+++ zope3org/trunk/src/zorg/wikification/browser/scripts/link.js	2006-07-02 13:15:00 UTC (rev 68953)
@@ -17,7 +17,7 @@
             }
       
         target = $(dropmenuID);
-            
+           
         if (window.event) 
             event.cancelBubble=true
         else if (e.stopPropagation) 
@@ -38,6 +38,12 @@
               
                 dropmenuobj.x= (WikiMenu.x != -1) ? WikiMenu.x : getposOffset(obj, "left")
                 dropmenuobj.y= getposOffset(obj, "top")
+                
+                if ($("wiki_content")) {
+                    var offsets = Position.positionedOffset($("wiki_content"))
+                    dropmenuobj.x -= offsets[0];
+                    dropmenuobj.y -= offsets[1];
+                    }
              
                 dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
                 dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
@@ -88,7 +94,7 @@
             timestamp = "&modification_stamp=" + timestamp;
             
             new Ajax.Updater('wiki_link_form', './@@wikiCommandForm', 
-                { parameters: 'cmd=' + cmd + '&menu_id='+ id + timestamp + WikiMenu.extraInfo});
+                { parameters: 'cmd=' + cmd + '&menu_id='+ id + timestamp});  // + WikiMenu.extraInfo
             WikiMenu.linkID = id;  
             WikiMenu.placeNextTo(WikiMenu.caller);
             }

Modified: zope3org/trunk/src/zorg/wikification/browser/style/main.css
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/style/main.css	2006-07-02 13:11:41 UTC (rev 68952)
+++ zope3org/trunk/src/zorg/wikification/browser/style/main.css	2006-07-02 13:15:00 UTC (rev 68953)
@@ -43,7 +43,6 @@
 }
 
 
-
 #wiki_link_form {
     position:absolute;
     z-index: 100;

Modified: zope3org/trunk/src/zorg/wikification/browser/style/screen.css
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/style/screen.css	2006-07-02 13:11:41 UTC (rev 68952)
+++ zope3org/trunk/src/zorg/wikification/browser/style/screen.css	2006-07-02 13:15:00 UTC (rev 68953)
@@ -1,3 +1,4 @@
 /* screen media style sheets */
 @import'/@@/style/html.css';
 @import'/@@/style/main.css';
+ at import'/@@/style/anylink.css';
\ No newline at end of file

Modified: zope3org/trunk/src/zorg/wikification/browser/templates/edit.pt
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/templates/edit.pt	2006-07-02 13:11:41 UTC (rev 68952)
+++ zope3org/trunk/src/zorg/wikification/browser/templates/edit.pt	2006-07-02 13:15:00 UTC (rev 68953)
@@ -51,9 +51,8 @@
 						<a href="@@wiki.html">
 							View 
 						</a>
-						&nbsp; | &nbsp; Edit &nbsp;|&nbsp
-						<a href="@@wikicomment.html">Comments</a>&nbsp;&nbsp;&nbsp;&nbsp;
-					</div>
+						&nbsp; | &nbsp; Edit &nbsp;
+				    </div>
 				</div>
 			</div>
 			

Modified: zope3org/trunk/src/zorg/wikification/browser/templates/view.pt
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/templates/view.pt	2006-07-02 13:11:41 UTC (rev 68952)
+++ zope3org/trunk/src/zorg/wikification/browser/templates/view.pt	2006-07-02 13:15:00 UTC (rev 68953)
@@ -29,8 +29,7 @@
 		<div class="col second">
             <div id="action-navigation" class="itemViews">
               View&nbsp; |  &nbsp;
-              <a href="@@wikiedit.html">Edit</a>&nbsp;|&nbsp
-              <a href="@@wikicomment.html">Comments</a>&nbsp;&nbsp;&nbsp;&nbsp;
+              <a href="@@wikiedit.html">Edit</a>&nbsp;&nbsp;&nbsp;&nbsp;
            </div>
 		</div>		
     </div>
@@ -61,7 +60,7 @@
     
 	<div id="layout-columns" class="columns">
 		<div class="bg">
-			<div class="col first">
+			<div id="wiki_content" class="col first">
 				<div id="main">
 					<div tal:content="structure view/renderBody" />
 				</div>

Modified: zope3org/trunk/src/zorg/wikification/browser/wikipage.py
===================================================================
--- zope3org/trunk/src/zorg/wikification/browser/wikipage.py	2006-07-02 13:11:41 UTC (rev 68952)
+++ zope3org/trunk/src/zorg/wikification/browser/wikipage.py	2006-07-02 13:15:00 UTC (rev 68953)
@@ -192,12 +192,12 @@
             
         return html
              
-    def wikiCommandForm(self, cmd, id, modification_stamp, current_stamp=None) :
+    def wikiCommandForm(self, cmd, menu_id, modification_stamp) :
         """ Render the link command form. """
         
         processor = self.processor = ILinkProcessor(self)
-        link_id = processor.createLinkId(id)
-        menu_id = processor.createMenuId(id)
+        link_id = processor.createLinkId(menu_id)
+        menu_id = processor.createMenuId(menu_id)
         processor.render_form = True
         processor.link_id = link_id
         processor.command = cmd
@@ -205,18 +205,15 @@
         processor.feed(body)
         placeholder = processor.placeholders.get(link_id)
         
-        if current_stamp is None :
-            current_stamp = self.getModificationStamp()
+        current_stamp = self.getModificationStamp()
         if placeholder is None :
             return self.message('Invalid link &quot;%s&quot;' % menu_id)
-        
+     
         if modification_stamp != current_stamp :
             return self._outdated()
         
-        form = placeholder._form()
-       #  print "Form:"
-#         print form
-        return form
+        return  placeholder._form()
+ 
 
     def getBaseURL(self) :
         return zapi.absoluteURL(self.container, self.request) + '/'



More information about the Checkins mailing list