[Erp5-report] r20209 - in /experimental/bt5/erp5_xhtml_style_experimental: SkinTemplateItem...

nobody at svn.erp5.org nobody at svn.erp5.org
Sat Mar 29 12:52:32 CET 2008


Author: bartek
Date: Sat Mar 29 12:52:32 2008
New Revision: 20209

URL: http://svn.erp5.org?rev=20209&view=rev
Log:
Support for asynchronuous (aka AJAX) way of getting boxover data (see wiki for more)

Added:
    experimental/bt5/erp5_xhtml_style_experimental/SkinTemplateItem/portal_skins/erp5_xhtml_style_experimental/ERP5Site_renderBoxoverResponse.xml
    experimental/bt5/erp5_xhtml_style_experimental/SkinTemplateItem/portal_skins/erp5_xhtml_style_experimental/ERP5Site_renderBoxoverTitle.xml
    experimental/bt5/erp5_xhtml_style_experimental/SkinTemplateItem/portal_skins/erp5_xhtml_style_experimental/boxover_async.js.xml
Modified:
    experimental/bt5/erp5_xhtml_style_experimental/bt/revision

Added: experimental/bt5/erp5_xhtml_style_experimental/SkinTemplateItem/portal_skins/erp5_xhtml_style_experimental/ERP5Site_renderBoxoverResponse.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_xhtml_style_experimental/SkinTemplateItem/portal_skins/erp5_xhtml_style_experimental/ERP5Site_renderBoxoverResponse.xml?rev=20209&view=auto
==============================================================================
--- experimental/bt5/erp5_xhtml_style_experimental/SkinTemplateItem/portal_skins/erp5_xhtml_style_experimental/ERP5Site_renderBoxoverResponse.xml (added)
+++ experimental/bt5/erp5_xhtml_style_experimental/SkinTemplateItem/portal_skins/erp5_xhtml_style_experimental/ERP5Site_renderBoxoverResponse.xml Sat Mar 29 12:52:32 2008
@@ -1,0 +1,164 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+"""\n
+  Render response for boxover\n
+  receives a dict of data - header, body, possibly styling\n
+  and/or delay.\n
+  # XXX to be later genericized ad renderAJAXResponse\n
+"""\n
+\n
+data_string = \' \'.join([\'%s=[%s]\' % (k, v) for k,v in kw.items()])\n
+return \'<content>%s</content>\' % data_string\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>**kw</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>kw</string>
+                            <string>_getattr_</string>
+                            <string>append</string>
+                            <string>$append0</string>
+                            <string>_getiter_</string>
+                            <string>k</string>
+                            <string>v</string>
+                            <string>data_string</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>ERP5Site_renderBoxoverResponse</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: experimental/bt5/erp5_xhtml_style_experimental/SkinTemplateItem/portal_skins/erp5_xhtml_style_experimental/ERP5Site_renderBoxoverTitle.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_xhtml_style_experimental/SkinTemplateItem/portal_skins/erp5_xhtml_style_experimental/ERP5Site_renderBoxoverTitle.xml?rev=20209&view=auto
==============================================================================
--- experimental/bt5/erp5_xhtml_style_experimental/SkinTemplateItem/portal_skins/erp5_xhtml_style_experimental/ERP5Site_renderBoxoverTitle.xml (added)
+++ experimental/bt5/erp5_xhtml_style_experimental/SkinTemplateItem/portal_skins/erp5_xhtml_style_experimental/ERP5Site_renderBoxoverTitle.xml Sat Mar 29 12:52:32 2008
@@ -1,0 +1,154 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>"""\n
+  Turns kw args into a string formatted for boxover\n
+"""\n
+\n
+return \' \'.join([\'%s=[%s]\' % (k, v) for k,v in kw.items()])\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>header=\'\', body=\'\', **kw</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>2</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>header</string>
+                            <string>body</string>
+                            <string>kw</string>
+                            <string>_getattr_</string>
+                            <string>append</string>
+                            <string>$append0</string>
+                            <string>_getiter_</string>
+                            <string>k</string>
+                            <string>v</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <string></string>
+                <string></string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>ERP5Site_renderBoxoverTitle</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: experimental/bt5/erp5_xhtml_style_experimental/SkinTemplateItem/portal_skins/erp5_xhtml_style_experimental/boxover_async.js.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_xhtml_style_experimental/SkinTemplateItem/portal_skins/erp5_xhtml_style_experimental/boxover_async.js.xml?rev=20209&view=auto
==============================================================================
--- experimental/bt5/erp5_xhtml_style_experimental/SkinTemplateItem/portal_skins/erp5_xhtml_style_experimental/boxover_async.js.xml (added)
+++ experimental/bt5/erp5_xhtml_style_experimental/SkinTemplateItem/portal_skins/erp5_xhtml_style_experimental/boxover_async.js.xml Sat Mar 29 12:52:32 2008
@@ -1,0 +1,491 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="DTMLDocument" module="OFS.DTMLDocument"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>__name__</string> </key>
+            <value> <string>boxover_async.js</string> </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_vars</string> </key>
+            <value>
+              <dictionary/>
+            </value>
+        </item>
+        <item>
+            <key> <string>globals</string> </key>
+            <value>
+              <dictionary/>
+            </value>
+        </item>
+        <item>
+            <key> <string>raw</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+/* --- BoxOver ---\n
+/* --- v 2.1 17th June 2006\n
+By Oliver Bryant with help of Matthew Tagg\n
+http://boxover.swazz.org */\n
+/* with some patches by Bartek Gorny (March 2008) to make it usable through AJAX */\n
+/* Requires: MochiKit/Base.js, MochiKit/Async.js, MochiKit/Iter.js, MochiKit/DOM.js */\n
+\n
+if (typeof document.attachEvent!=\'undefined\') {\n
+   window.attachEvent(\'onload\',init);\n
+   document.attachEvent(\'onmousemove\',moveMouse);\n
+   document.attachEvent(\'onclick\',checkMove); }\n
+else {\n
+   window.addEventListener(\'load\',init,false);\n
+   document.addEventListener(\'mousemove\',moveMouse,false);\n
+   document.addEventListener(\'click\',checkMove,false);\n
+}\n
+\n
+var oDv=document.createElement("div");\n
+var dvHdr=document.createElement("div");\n
+var dvBdy=document.createElement("div");\n
+var windowlock,boxMove,fixposx,fixposy,lockX,lockY,fixx,fixy,ox,oy,boxLeft,boxRight,boxTop,boxBottom,evt,mouseX,mouseY,boxOpen,totalScrollTop,totalScrollLeft;\n
+boxOpen=false;\n
+ox=10;\n
+oy=10;\n
+lockX=0;\n
+lockY=0;\n
+\n
+function init() {\n
+\toDv.appendChild(dvHdr);\n
+\toDv.appendChild(dvBdy);\n
+\toDv.style.position="absolute";\n
+\toDv.style.visibility=\'hidden\';\n
+\tdocument.body.appendChild(oDv);\t\n
+}\n
+\n
+function defHdrStyle() {\n
+\tdvHdr.innerHTML=\'<img  style="vertical-align:middle"  src="info.gif">&nbsp;&nbsp;\'+dvHdr.innerHTML;\n
+\tdvHdr.style.fontWeight=\'bold\';\n
+\tdvHdr.style.width=\'300px\';\n
+\tdvHdr.style.fontFamily=\'arial\';\n
+\tdvHdr.style.border=\'1px solid #A5CFE9\';\n
+\tdvHdr.style.padding=\'3\';\n
+\tdvHdr.style.fontSize=\'11\';\n
+\tdvHdr.style.color=\'#4B7A98\';\n
+\tdvHdr.style.background=\'#D5EBF9\';\n
+\tdvHdr.style.filter=\'alpha(opacity=85)\'; // IE\n
+\tdvHdr.style.opacity=\'0.85\'; // FF\n
+}\n
+\n
+function defBdyStyle() {\n
+\tdvBdy.style.borderBottom=\'1px solid #A5CFE9\';\n
+\tdvBdy.style.borderLeft=\'1px solid #A5CFE9\';\n
+\tdvBdy.style.borderRight=\'1px solid #A5CFE9\';\n
+\tdvBdy.style.width=\'300px\';\n
+\tdvBdy.style.fontFamily=\'arial\';\n
+\tdvBdy.style.fontSize=\'11\';\n
+\tdvBdy.style.padding=\'3\';\n
+\tdvBdy.style.color=\'#1B4966\';\n
+\tdvBdy.style.background=\'#FFFFFF\';\n
+\tdvBdy.style.filter=\'alpha(opacity=85)\'; // IE\n
+\tdvBdy.style.opacity=\'0.85\'; // FF\n
+}\n
+\n
+function checkElemBO(txt) {\n
+if (!txt || typeof(txt) != \'string\') return false;\n
+if ((txt.indexOf(\'header\')>-1)&&(txt.indexOf(\'body\')>-1)&&(txt.indexOf(\'[\')>-1)&&(txt.indexOf(\'[\')>-1)) \n
+   return true;\n
+else\n
+   return false;\n
+}\n
+\n
+function scanBO(curNode) {\n
+\t  if (checkElemBO(curNode.title)) {\n
+         curNode.boHDR=getParam(\'header\',curNode.title);\n
+         curNode.boBDY=getParam(\'body\',curNode.title);\n
+         // BG: additional parameter - url to asynchronuously get data\n
+         curNode.source_url=getParam(\'url\',curNode.title);\n
+\t\t\tcurNode.boCSSBDY=getParam(\'cssbody\',curNode.title);\t\t\t\n
+\t\t\tcurNode.boCSSHDR=getParam(\'cssheader\',curNode.title);\n
+\t\t\tcurNode.IEbugfix=(getParam(\'hideselects\',curNode.title)==\'on\')?true:false;\n
+\t\t\tcurNode.fixX=parseInt(getParam(\'fixedrelx\',curNode.title));\n
+\t\t\tcurNode.fixY=parseInt(getParam(\'fixedrely\',curNode.title));\n
+\t\t\tcurNode.absX=parseInt(getParam(\'fixedabsx\',curNode.title));\n
+\t\t\tcurNode.absY=parseInt(getParam(\'fixedabsy\',curNode.title));\n
+\t\t\tcurNode.offY=(getParam(\'offsety\',curNode.title)!=\'\')?parseInt(getParam(\'offsety\',curNode.title)):10;\n
+\t\t\tcurNode.offX=(getParam(\'offsetx\',curNode.title)!=\'\')?parseInt(getParam(\'offsetx\',curNode.title)):10;\n
+\t\t\tcurNode.fade=(getParam(\'fade\',curNode.title)==\'on\')?true:false;\n
+\t\t\tcurNode.fadespeed=(getParam(\'fadespeed\',curNode.title)!=\'\')?getParam(\'fadespeed\',curNode.title):0.04;\n
+\t\t\tcurNode.delay=(getParam(\'delay\',curNode.title)!=\'\')?parseInt(getParam(\'delay\',curNode.title)):0;\n
+\t\t\tif (getParam(\'requireclick\',curNode.title)==\'on\') {\n
+\t\t\t\tcurNode.requireclick=true;\n
+\t\t\t\tdocument.all?curNode.attachEvent(\'onclick\',showHideBox):curNode.addEventListener(\'click\',showHideBox,false);\n
+\t\t\t\tdocument.all?curNode.attachEvent(\'onmouseover\',hideBox):curNode.addEventListener(\'mouseover\',hideBox,false);\n
+\t\t\t}\n
+\t\t\telse {// Note : if requireclick is on the stop clicks are ignored   \t\t\t\n
+   \t\t\tif (getParam(\'doubleclickstop\',curNode.title)!=\'off\') {\n
+   \t\t\t\tdocument.all?curNode.attachEvent(\'ondblclick\',pauseBox):curNode.addEventListener(\'dblclick\',pauseBox,false);\n
+   \t\t\t}\t\n
+   \t\t\tif (getParam(\'singleclickstop\',curNode.title)==\'on\') {\n
+   \t\t\t\tdocument.all?curNode.attachEvent(\'onclick\',pauseBox):curNode.addEventListener(\'click\',pauseBox,false);\n
+   \t\t\t}\n
+   \t\t}\n
+\t\t\tcurNode.windowLock=getParam(\'windowlock\',curNode.title).toLowerCase()==\'off\'?false:true;\n
+\t\t\tcurNode.title=\'\';\n
+\t\t\tcurNode.hasbox=1;\n
+\t   }\n
+\t   else\n
+\t      curNode.hasbox=2;   \n
+       // BG: if there is a remote url send AJAX request\n
+       if((curNode.source_url != undefined) && (curNode.source_url != \'\'))\n
+           boxover_getRemoteData(curNode, curNode.source_url);\n
+}\n
+\n
+\n
+function getParam(param,list) {\n
+\tvar reg = new RegExp(\'([^a-zA-Z]\' + param + \'|^\' + param + \')\\\\s*=\\\\s*\\\\[\\\\s*(((\\\\[\\\\[)|(\\\\]\\\\])|([^\\\\]\\\\[]))*)\\\\s*\\\\]\');\n
+\tvar res = reg.exec(list);\n
+\tvar returnvar;\n
+\tif(res)\n
+\t\treturn res[2].replace(\'[[\',\'[\').replace(\']]\',\']\');\n
+\telse\n
+\t\treturn \'\';\n
+}\n
+\n
+function Left(elem){\t\n
+\tvar x=0;\n
+\tif (elem.calcLeft)\n
+\t\treturn elem.calcLeft;\n
+\tvar oElem=elem;\n
+\twhile(elem){\n
+\t\t if ((elem.currentStyle)&& (!isNaN(parseInt(elem.currentStyle.borderLeftWidth)))&&(x!=0))\n
+\t\t \tx+=parseInt(elem.currentStyle.borderLeftWidth);\n
+\t\t x+=elem.offsetLeft;\n
+\t\t elem=elem.offsetParent;\n
+\t  } \n
+\toElem.calcLeft=x;\n
+\treturn x;\n
+\t}\n
+\n
+function Top(elem){\n
+\t var x=0;\n
+\t if (elem.calcTop)\n
+\t \treturn elem.calcTop;\n
+\t var oElem=elem;\n
+\t while(elem){\t\t\n
+\t \t if ((elem.currentStyle)&& (!isNaN(parseInt(elem.currentStyle.borderTopWidth)))&&(x!=0))\n
+\t\t \tx+=parseInt(elem.currentStyle.borderTopWidth); \n
+\t\t x+=elem.offsetTop;\n
+\t         elem=elem.offsetParent;\n
+ \t } \n
+ \t oElem.calcTop=x;\n
+ \t return x;\n
+ \t \n
+}\n
+\n
+var ah,ab;\n
+function applyStyles(elem) {\n
+        /* BG: patched to allow passing element as an argument\n
+        * because in callback the mouse may be somewhere else and \n
+        * CBE is different or non-existent */\n
+        if(elem==undefined) elem = CBE;\n
+\tif(ab)\n
+\t\toDv.removeChild(dvBdy);\n
+\tif (ah)\n
+\t\toDv.removeChild(dvHdr);\n
+\tdvHdr=document.createElement("div");\n
+\tdvBdy=document.createElement("div");\n
+\telem.boCSSBDY?dvBdy.className=elem.boCSSBDY:defBdyStyle();\n
+\telem.boCSSHDR?dvHdr.className=elem.boCSSHDR:defHdrStyle();\n
+\tdvHdr.innerHTML=elem.boHDR;\n
+\tdvBdy.innerHTML=elem.boBDY;\n
+\tah=false;\n
+\tab=false;\n
+\tif (elem.boHDR!=\'\') {\t\t\n
+\t\toDv.appendChild(dvHdr);\n
+\t\tah=true;\n
+\t}\t\n
+\tif (elem.boBDY!=\'\'){\n
+\t\toDv.appendChild(dvBdy);\n
+\t\tab=true;\n
+\t}\t\n
+}\n
+\n
+var CSE,iterElem,LSE,CBE,LBE, totalScrollLeft, totalScrollTop, width, height ;\n
+var ini=false;\n
+\n
+// Customised function for inner window dimension\n
+function SHW() {\n
+   if (document.body && (document.body.clientWidth !=0)) {\n
+      width=document.body.clientWidth;\n
+      height=document.body.clientHeight;\n
+   }\n
+   if (document.documentElement && (document.documentElement.clientWidth!=0) && (document.body.clientWidth + 20 >= document.documentElement.clientWidth)) {\n
+      width=document.documentElement.clientWidth;   \n
+      height=document.documentElement.clientHeight;   \n
+   }   \n
+   return [width,height];\n
+}\n
+\n
+\n
+var ID=null;\n
+function moveMouse(e) {\n
+   //boxMove=true;\n
+\te?evt=e:evt=event;\n
+\t\n
+\tCSE=evt.target?evt.target:evt.srcElement;\n
+\t\n
+\tif (!CSE.hasbox) {\n
+\t   // Note we need to scan up DOM here, some elements like TR don\'t get triggered as srcElement\n
+\t   iElem=CSE;\n
+\t   while ((iElem.parentNode) && (!iElem.hasbox)) {\n
+\t      scanBO(iElem);\n
+\t      iElem=iElem.parentNode;\n
+\t   }\t   \n
+\t}\n
+\t\n
+\tif ((CSE!=LSE)&&(!isChild(CSE,dvHdr))&&(!isChild(CSE,dvBdy))){\t\t\n
+\t   if (!CSE.boxItem) {\n
+\t\t\titerElem=CSE;\n
+\t\t\twhile ((iterElem.hasbox==2)&&(iterElem.parentNode))\n
+\t\t\t\t\titerElem=iterElem.parentNode; \n
+\t\t\tCSE.boxItem=iterElem;\n
+\t\t\t}\n
+\t\titerElem=CSE.boxItem;\n
+\t\tif (CSE.boxItem&&(CSE.boxItem.hasbox==1))  {\n
+\t\t\tLBE=CBE;\n
+\t\t\tCBE=iterElem;\n
+\t\t\tif (CBE!=LBE) {\n
+\t\t\t\tapplyStyles();\n
+\t\t\t\tif (!CBE.requireclick)\n
+\t\t\t\t\tif (CBE.fade) {\n
+\t\t\t\t\t\tif (ID!=null)\n
+\t\t\t\t\t\t\tclearTimeout(ID);\n
+\t\t\t\t\t\tID=setTimeout("fadeIn("+CBE.fadespeed+")",CBE.delay);\n
+\t\t\t\t\t}\n
+\t\t\t\t\telse {\n
+\t\t\t\t\t\tif (ID!=null)\n
+\t\t\t\t\t\t\tclearTimeout(ID);\n
+\t\t\t\t\t\tCOL=1;\n
+\t\t\t\t\t\tID=setTimeout("oDv.style.visibility=\'visible\';ID=null;",CBE.delay);\t\t\t\t\t\t\n
+\t\t\t\t\t}\n
+\t\t\t\tif (CBE.IEbugfix) {hideSelects();} \n
+\t\t\t\tfixposx=!isNaN(CBE.fixX)?Left(CBE)+CBE.fixX:CBE.absX;\n
+\t\t\t\tfixposy=!isNaN(CBE.fixY)?Top(CBE)+CBE.fixY:CBE.absY;\t\t\t\n
+\t\t\t\tlockX=0;\n
+\t\t\t\tlockY=0;\n
+\t\t\t\tboxMove=true;\n
+\t\t\t\tox=CBE.offX?CBE.offX:10;\n
+\t\t\t\toy=CBE.offY?CBE.offY:10;\n
+\t\t\t}\n
+\t\t}\n
+\t\telse if (!isChild(CSE,dvHdr) && !isChild(CSE,dvBdy) && (boxMove))\t{\n
+\t\t\t// The conditional here fixes flickering between tables cells.\n
+\t\t\tif ((!isChild(CBE,CSE)) || (CSE.tagName!=\'TABLE\')) {   \t\t\t\n
+   \t\t\tCBE=null;\n
+   \t\t\tif (ID!=null)\n
+  \t\t\t\t\tclearTimeout(ID);\n
+   \t\t\tfadeOut();\n
+   \t\t\tshowSelects();\n
+\t\t\t}\n
+\t\t}\n
+\t\tLSE=CSE;\n
+\t}\n
+\telse if (((isChild(CSE,dvHdr) || isChild(CSE,dvBdy))&&(boxMove))) {\n
+\t\ttotalScrollLeft=0;\n
+\t\ttotalScrollTop=0;\n
+\t\t\n
+\t\titerElem=CSE;\n
+\t\twhile(iterElem) {\n
+\t\t\tif(!isNaN(parseInt(iterElem.scrollTop)))\n
+\t\t\t\ttotalScrollTop+=parseInt(iterElem.scrollTop);\n
+\t\t\tif(!isNaN(parseInt(iterElem.scrollLeft)))\n
+\t\t\t\ttotalScrollLeft+=parseInt(iterElem.scrollLeft);\n
+\t\t\titerElem=iterElem.parentNode;\t\t\t\n
+\t\t}\n
+\t\tif (CBE!=null) {\n
+\t\t\tboxLeft=Left(CBE)-totalScrollLeft;\n
+\t\t\tboxRight=parseInt(Left(CBE)+CBE.offsetWidth)-totalScrollLeft;\n
+\t\t\tboxTop=Top(CBE)-totalScrollTop;\n
+\t\t\tboxBottom=parseInt(Top(CBE)+CBE.offsetHeight)-totalScrollTop;\n
+\t\t\tdoCheck();\n
+\t\t}\n
+\t}\n
+\t\n
+\tif (boxMove&&CBE) {\n
+\t\t// This added to alleviate bug in IE6 w.r.t DOCTYPE\n
+\t\tbodyScrollTop=document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;\n
+\t\tbodyScrollLet=document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft;\n
+\t\tmouseX=evt.pageX?evt.pageX-bodyScrollLet:evt.clientX-document.body.clientLeft;\n
+\t\tmouseY=evt.pageY?evt.pageY-bodyScrollTop:evt.clientY-document.body.clientTop;\n
+\t\tif ((CBE)&&(CBE.windowLock)) {\n
+\t\t\tmouseY < -oy?lockY=-mouseY-oy:lockY=0;\n
+\t\t\tmouseX < -ox?lockX=-mouseX-ox:lockX=0;\n
+\t\t\tmouseY > (SHW()[1]-oDv.offsetHeight-oy)?lockY=-mouseY+SHW()[1]-oDv.offsetHeight-oy:lockY=lockY;\n
+\t\t\tmouseX > (SHW()[0]-dvBdy.offsetWidth-ox)?lockX=-mouseX-ox+SHW()[0]-dvBdy.offsetWidth:lockX=lockX;\t\t\t\n
+\t\t}\n
+\t\toDv.style.left=((fixposx)||(fixposx==0))?fixposx:bodyScrollLet+mouseX+ox+lockX+"px";\n
+\t\toDv.style.top=((fixposy)||(fixposy==0))?fixposy:bodyScrollTop+mouseY+oy+lockY+"px";\t\t\n
+\t\t\n
+\t}\n
+}\n
+\n
+function doCheck() {\t\n
+\tif (   (mouseX < boxLeft)    ||     (mouseX >boxRight)     || (mouseY < boxTop) || (mouseY > boxBottom)) {\n
+\t\tif (!CBE.requireclick)\n
+\t\t\tfadeOut();\n
+\t\tif (CBE.IEbugfix) {showSelects();}\n
+\t\tCBE=null;\n
+\t}\n
+}\n
+\n
+function pauseBox(e) {\n
+   e?evt=e:evt=event;\n
+\tboxMove=false;\n
+\tevt.cancelBubble=true;\n
+}\n
+\n
+function showHideBox(e) {\n
+\toDv.style.visibility=(oDv.style.visibility!=\'visible\')?\'visible\':\'hidden\';\n
+}\n
+\n
+function hideBox(e) {\n
+\toDv.style.visibility=\'hidden\';\n
+}\n
+\n
+var COL=0;\n
+var stopfade=false;\n
+function fadeIn(fs) {\n
+\t\tID=null;\n
+\t\tCOL=0;\n
+\t\toDv.style.visibility=\'visible\';\n
+\t\tfadeIn2(fs);\n
+}\n
+\n
+function fadeIn2(fs) {\n
+\t\tCOL=COL+fs;\n
+\t\tCOL=(COL>1)?1:COL;\n
+\t\toDv.style.filter=\'alpha(opacity=\'+parseInt(100*COL)+\')\';\n
+\t\toDv.style.opacity=COL;\n
+\t\tif (COL<1)\n
+\t\t setTimeout("fadeIn2("+fs+")",20);\t\t\n
+}\n
+\n
+\n
+function fadeOut() {\n
+\toDv.style.visibility=\'hidden\';\n
+\t\n
+}\n
+\n
+function isChild(s,d) {\n
+\twhile(s) {\n
+\t\tif (s==d) \n
+\t\t\treturn true;\n
+\t\ts=s.parentNode;\n
+\t}\n
+\treturn false;\n
+}\n
+\n
+var cSrc;\n
+function checkMove(e) {\n
+\te?evt=e:evt=event;\n
+\tcSrc=evt.target?evt.target:evt.srcElement;\n
+\tif ((!boxMove)&&(!isChild(cSrc,oDv))) {\n
+\t\tfadeOut();\n
+\t\tif (CBE&&CBE.IEbugfix) {showSelects();}\n
+\t\tboxMove=true;\n
+\t\tCBE=null;\n
+\t}\n
+}\n
+\n
+function showSelects(){\n
+   var elements = document.getElementsByTagName("select");\n
+   for (i=0;i< elements.length;i++){\n
+      elements[i].style.visibility=\'visible\';\n
+   }\n
+}\n
+\n
+function hideSelects(){\n
+   var elements = document.getElementsByTagName("select");\n
+   for (i=0;i< elements.length;i++){\n
+   elements[i].style.visibility=\'hidden\';\n
+   }\n
+}\n
+\n
+/* BG additional functions to set title once it is\n
+* received from the server */\n
+\n
+function boxover_setElementTitle(elem, title){\n
+  /* set element title and recreate the box so that\n
+   * the effect is immediately visible */\n
+  // TODO preserve current settings so that the new title\n
+  // overwrites only what it defines leaving what was set previously\n
+  // (e.g. styling)\n
+  elem.title = title;\n
+  refreshBox(elem);\n
+}\n
+\n
+function refreshBox(elem){\n
+  /* force title scan and refreshing the box */\n
+  elem.hasbox = false;\n
+  scanBO(elem);\n
+  applyStyles(elem);\n
+}\n
+\n
+\n
+function boxover_getRemoteData(elem, url){\n
+  var req = getXMLHttpRequest();\n
+  if (req.overrideMimeType) {\n
+      req.overrideMimeType("text/xml");\n
+  }\n
+  req.open("GET", url, true);\n
+  var d = sendXMLHttpRequest(req)\n
+  d.addCallback(boxover_makeCallBack(elem));\n
+  d.addErrback(boxover_errHandler);\n
+}\n
+\n
+\n
+function boxover_makeCallBack(elem){\n
+  /* returns a callback function referencing the\n
+  * element in question so that the callback can do something\n
+  * to the element (meaning: set its title and refresh boxover) */\n
+  return function (req){\n
+    var doc = req.responseXML;\n
+    boxover_setElementTitle(elem, scrapeText(doc));\n
+  }\n
+}\n
+\n
+\n
+function boxover_errHandler(res){\n
+  alert(res);\n
+}\n
+\n
+// vim:set filetype=javascript shiftwidth=2 expandtab:\n
+\n
+\n
+\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: experimental/bt5/erp5_xhtml_style_experimental/bt/revision
URL: http://svn.erp5.org/experimental/bt5/erp5_xhtml_style_experimental/bt/revision?rev=20209&r1=20208&r2=20209&view=diff
==============================================================================
--- experimental/bt5/erp5_xhtml_style_experimental/bt/revision (original)
+++ experimental/bt5/erp5_xhtml_style_experimental/bt/revision Sat Mar 29 12:52:32 2008
@@ -1,1 +1,1 @@
-7
+9




More information about the Erp5-report mailing list