Commit 37ba16d8 authored by Jérome Perrin's avatar Jérome Perrin

Translate "Hide tabs" and "Show tabs" from the front page.

To do so, we include both messages in hidden span, and we switch visiblility of element in javascript

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36669 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 37180afe
......@@ -184,10 +184,10 @@
tal:attributes="class python: test(is_tabs_visible,\n
\'border_bottom1px\',\n
\'border_bottom0px\');">\n
<span i18n:translate="" i18n:domain="ui"\n
tal:condition="not: is_tabs_visible">Show tabs</span>\n
<span i18n:translate="" i18n:domain="ui" \n
tal:condition="is_tabs_visible">Hide tabs</span>\n
<span i18n:translate="" i18n:domain="ui" id="tab_switcher_hidden"\n
tal:attributes="style python: test(is_tabs_visible, \'display:none\', None)">Show tabs</span>\n
<span i18n:translate="" i18n:domain="ui" id="tab_switcher_visible"\n
tal:attributes="style python: test(is_tabs_visible, None, \'display:none\')">Hide tabs</span>\n
</div>\n
</td>\n
<td id="tab-list-container">\n
......
......@@ -15,7 +15,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts68379872.09</string> </value>
<value> <string>ts77806058.72</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -23,7 +23,7 @@
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
<value> <string>application/x-javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
......@@ -323,20 +323,22 @@ function initialize(){\n
})}\n
\n
// enable show/hide tabs\n
tabs = getElement(\'tabs\');\n
tabs_switcher = getElement(\'tabs_switcher\');\n
add_gadget = getElement(\'add_new_gadget_link\')\n
tabs = getElement(\'tabs\');\n
tabs_switcher = getElement(\'tabs_switcher\');\n
add_gadget = getElement(\'add_new_gadget_link\')\n
if(tabs_switcher){\n
connect(tabs_switcher, \'onclick\', function (){\n
var is_tabs_visible=0;\n
if(tabs.style.display!=\'block\'){\n
is_tabs_visible=1;\n
tabs_switcher.innerHTML = \'Hide tabs\';\n
getElement("tab_switcher_visible").style.display = "block";\n
getElement("tab_switcher_hidden").style.display = "none";\n
add_gadget.className = "border_bottom1px";\n
tabs_switcher.className = "border_bottom1px";\n
}\n
else{\n
tabs_switcher.innerHTML = \'Show tabs\';\n
getElement("tab_switcher_hidden").style.display = "block";\n
getElement("tab_switcher_visible").style.display = "none";\n
add_gadget.className = "border_bottom0px";\n
tabs_switcher.className = "border_bottom0px";\n
}\n
......@@ -399,7 +401,7 @@ MochiKit.DOM.addLoadEvent(initialize);\n
</item>
<item>
<key> <string>size</string> </key>
<value> <long>14577</long> </value>
<value> <int>14748</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
529
\ No newline at end of file
530
\ 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