[Erp5-report] r42415 ivan - in /erp5/trunk/bt5/erp5_xhtml_jquery_style: SkinTemplateItem/po...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jan 18 14:48:07 CET 2011


Author: ivan
Date: Tue Jan 18 14:48:07 2011
New Revision: 42415

URL: http://svn.erp5.org?rev=42415&view=rev
Log:
ERP5 front tabs rewriten using jQuery.

Added:
    erp5/trunk/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5_tabber.js.xml
Modified:
    erp5/trunk/bt5/erp5_xhtml_jquery_style/bt/revision

Added: erp5/trunk/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5_tabber.js.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5_tabber.js.xml?rev=42415&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5_tabber.js.xml (added)
+++ erp5/trunk/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5_tabber.js.xml [utf8] Tue Jan 18 14:48:07 2011
@@ -0,0 +1,133 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_Cacheable__manager_id</string> </key>
+            <value> <string>http_cache</string> </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_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <unicode encoding="cdata"><![CDATA[
+
+<tal:block define="dummy python: request.RESPONSE.setHeader(\'Content-Type\', \'application/javascript;; charset=utf-8\')"/>\n
+\n
+/*\n
+Copyright (c) 2011-2012 Nexedi SARL and Contributors. All Rights Reserved.\n
+\n
+This program is Free Software; you can redistribute it and/or\n
+modify it under the terms of the GNU General Public License\n
+as published by the Free Software Foundation; either version 2\n
+of the License, or (at your option) any later version.\n
+\n
+This program is distributed in the hope that it will be useful,\n
+but WITHOUT ANY WARRANTY; without even the implied warranty of\n
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n
+GNU General Public License for more details.\n
+\n
+You should have received a copy of the GNU General Public License\n
+along with this program; if not, write to the Free Software\n
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n
+*/\n
+\n
+function selectTab(clicked_node) {\n
+  clicked_node = $(this);\n
+  $("#tab_box").find("li").each(\n
+    function (index){\n
+      tab = $(this);\n
+      node = tab.find("a").first();\n
+      class_name = tab.attr("class");\n
+      if (clicked_node.attr("href") == node.attr("href")){\n
+        if (class_name != "selected"){tab.attr("class", "selected");}\n
+      }\n
+      else{\n
+        if (class_name != "non_selected"){tab.attr("class", "non_selected");}\n
+      }\n
+    }\n
+  );\n
+  \n
+  var mapping = {\n
+  <tal:block \n
+  tal:replace="structure python: \',\\n\'.join([\'%s: \\x22%s\\x22\' %(x[\'id\'], x[\'renderer\']) for x in context.ERP5Site_getTabList(add_all_tabs=1)])"></tal:block>\n
+  };\n
+  \n
+  $("#container") .css("opacity", 0.5);\n
+\n
+  var url = mapping[this.parentNode.id];\n
+  $.ajax({url:url,\n
+          success: function (data){\n
+                     $("#container") .css("opacity", 1.0);\n
+                     $("#container").html(data);},\n
+          error: function (data){\n
+                     $("#container").innerHTML = "Server side error.";}});\n
+  // Set a cookie.\n
+  document.cookie = \'erp5_site_selected_tab=\' + escape(this.parentNode.id);\n
+  return false;\n
+}\n
+\n
+function addOnClickEventsToTabs() {\n
+  $("#tab_box").find("li").each(\n
+    function (index){\n
+      var node = $(this).find("a").first();\n
+      node.bind("click", selectTab);})\n
+  return true;\n
+}\n
+\n
+$(document).ready(addOnClickEventsToTabs);
+
+]]></unicode> </value>
+        </item>
+        <item>
+            <key> <string>content_type</string> </key>
+            <value> <string>text/html</string> </value>
+        </item>
+        <item>
+            <key> <string>expand</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>erp5_tabber.js</string> </value>
+        </item>
+        <item>
+            <key> <string>output_encoding</string> </key>
+            <value> <string>iso-8859-15</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <unicode></unicode> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_xhtml_jquery_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_xhtml_jquery_style/bt/revision?rev=42415&r1=42414&r2=42415&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_xhtml_jquery_style/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_xhtml_jquery_style/bt/revision [utf8] Tue Jan 18 14:48:07 2011
@@ -1 +1 @@
-7
\ No newline at end of file
+8
\ No newline at end of file



More information about the Erp5-report mailing list