Commit 6f14a04d authored by Vincent Desmares's avatar Vincent Desmares

2008-10-1 vincentd

* Add a js file for overwrite the js of normal access-tab (to access to the sales of Express products), and put a hight priority for
the skin folder

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23953 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 69ed8c9d
......@@ -9,12 +9,33 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>300.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_wizard</string> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="DTMLMethod" module="OFS.DTMLMethod"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>erp5_tabber.js</string> </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[
var loading_deferred = undefined;\n
\n
function replaceContent(req) {\n
if (loading_deferred) {\n
loading_deferred.cancel();\n
loading_deferred = undefined;\n
}\n
\n
var container = $(\'container\');\n
//log(\'container is \', container);\n
//log(\'response is \', req.responseText);\n
// replaceChildNodes(container, req.responseXML);\n
container.innerHTML = req.responseText;\n
\n
addOnClickEventsToTabs(req);\n
}\n
\n
function showLoadingMessage() {\n
var container = $(\'container\');\n
container.innerHTML = \'<div><p style="text-align: left; vertical-align: middle; font-size: large;">Loading...</p></div>\';\n
loading_deferred = undefined;\n
}\n
\n
function selectTab(e) {\n
var tab_box = $(\'tab_box\');\n
var item_list = tab_box.getElementsByTagName(\'li\');\n
for (var i = 0; i < item_list.length; i++) {\n
var item = item_list[i];\n
var node = item.getElementsByTagName(\'a\')[0];\n
if (this == node) {\n
if (getNodeAttribute(item, \'class\') != \'selected\') {\n
setNodeAttribute(item, \'class\', \'selected\');\n
}\n
node.blur();\n
} else {\n
if (getNodeAttribute(item, \'class\') != \'non_selected\') {\n
setNodeAttribute(item, \'class\', \'non_selected\');\n
}\n
}\n
disconnectAll(node, \'onclick\');\n
connect(node, \'onclick\', function (e) { e.stop(); });\n
}\n
\n
var mapping = {\n
<dtml-in prefix="tab" expr="ERP5Site_getTabList()">\n
<dtml-var expr="tab_item[\'id\']">: "<dtml-var expr="tab_item[\'renderer\']">"<dtml-if sequence-end><dtml-else>,</dtml-if>\n
\n
</dtml-in>\n
};\n
\n
var url = mapping[this.parentNode.id];\n
//log(\'calling \', this, url);\n
var d = doSimpleXMLHttpRequest(url);\n
d.addBoth(replaceContent)\n
//var container = $(\'container\');\n
//container.innerHTML = \'\';\n
e.stop();\n
\n
loading_deferred = callLater(0.3, showLoadingMessage);\n
\n
// Set a cookie.\n
document.cookie = \'erp5_site_selected_tab=\' + escape(this.parentNode.id);\n
}\n
\n
function showProductList() {\n
var url = "ERP5Site_getExpressProductListFrame";\n
var d = doSimpleXMLHttpRequest(url);\n
d.addBoth(replaceContent)\n
loading_deferred = callLater(0.3, showLoadingMessage);\n
}\n
\n
function showProduct(uid) {\n
var url = "ERP5Site_getExpressProductFrame?product_uid=";\n
url = url + uid;\n
var d = doSimpleXMLHttpRequest(url);\n
d.addBoth(replaceContent)\n
loading_deferred = callLater(0.3, showLoadingMessage);\n
}\n
\n
function addOnClickEventsToTabs(e) {\n
var tab_box = $(\'tab_box\');\n
var item_list = tab_box.getElementsByTagName(\'li\');\n
for (var i = 0; i < item_list.length; i++) {\n
//connect(item_list[i], \'onclick\', function(e){e.stop();})\n
var node = item_list[i].getElementsByTagName(\'a\')[0];\n
disconnectAll(node, \'onclick\');\n
connect(node, \'onclick\', selectTab);\n
//log(node);\n
}\n
return true;\n
}\n
\n
connect(window, \'onload\', addOnClickEventsToTabs);\n
\n
var tmp = window.location.search.substring(1).split("&");\n
\n
var GET = [];\n
for (var i in tmp)\n
if (tmp[i].indexOf("=")!=-1)\n
GET[decodeURI(tmp[i].substring(0, tmp[i].indexOf("=")))] = decodeURI(tmp[i].substring(tmp[i].indexOf("=")+1));\n
else\n
GET[decodeURI(tmp[i])]=\'\';\n
if (GET["jumptab"])\n
{\n
if (GET["product"])\n
{\n
showProduct(GET["product"])\n
}\n
else\n
{\n
showProductList();\n
}\n
}\n
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2008-10-1 vincentd
* Add a js file for overwrite the js of normal access-tab (to access to the sales of Express products), and put a hight priority for
the skin folder
2008-09-25 ivan
* Wizard uses client's preferred language settings
......
99
\ No newline at end of file
105
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment