Commit 640f2656 authored by Gabriel Monnerat's avatar Gabriel Monnerat

refactor to change only the language of Web Site

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45113 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d0055b7c
......@@ -36,7 +36,7 @@
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<tal:block tal:define="current_language python: here.getAvailableLanguage()">\n
<tal:block tal:define="current_language python: here.getWebSiteValue().getAvailableLanguage()">\n
<div id="select_language">\n
<li>\n
<span id="available_language" tal:content="python: current_language">Current Language</span>\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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
Script used to change the language of web site.\n
"""\n
web_site = context.getWebSiteValue()\n
web_site.setDefaultAvailableLanguage(language)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>language</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_changeLanguage</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -36,13 +36,14 @@ function getCurrentObjectUrl(){\n
\n
function changeLanguage(language){\n
$.ajax({\n
url: "setDefaultAvailableLanguage?value=" + language,\n
url: "WebSite_changeLanguage?language=" + language,\n
async: false,\n
success: function(){\n
window.location.reload();\n
},\n
});\n
}\n
\n
function getWebEditorName(){\n
currentUrlSplitted = window.location.href.split("?")[0].split("/");\n
return currentUrlSplitted[currentUrlSplitted.length-1];\n
......
335
\ No newline at end of file
336
\ 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