Commit bc339b13 authored by Łukasz Nowak's avatar Łukasz Nowak

Checkpoint: Implement AJAX request call.

parent 7f43f0c6
<?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 encoding="cdata"><![CDATA[
if computer:\n
filter_xml = """<?xml version=\'1.0\' encoding=\'utf-8\'?>\n
<instance>\n
<parameter id="computer_guid">%s</parameter>\n
</instance>""" % computer\n
else:\n
filter_xml = None\n
\n
if not instance_xml:\n
instance_xml = None\n
return context.getPortalObject().portal_slap.requestComputerPartition(\n
software_release=software_release_url,\n
software_type=\'RootSoftwareInstance\',\n
partition_reference=title,\n
partition_parameter_xml=instance_xml,\n
filter_xml=filter_xml\n
)\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>software_release_url, title, instance_xml, computer</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_requestComputerPartitionAsJSON</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts21374348.43</string> </value>
<value> <string>ts21375380.89</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
......@@ -118,7 +118,16 @@ function processRequest() {\n
url = $(\'#url\').val();\n
title = $(\'#software_instance_title\').val();\n
xml = $(\'#software_instance_xml\').val();\n
alert(computer + url + title + xml);\n
\n
$.post(vifib[\'site_url\'] + "/ERP5Site_requestComputerPartitionAsJSON", {\n
\'software_release_url\': url,\n
\'title\': title,\n
\'instance_xml\': xml,\n
\'computer\': computer\n
},\n
function () {\n
alert(\'Your Software Instance has been requested\');\n
});\n
}\n
\n
function drawRequest(data) {\n
......@@ -236,7 +245,7 @@ function mainController() {\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>5869</int> </value>
<value> <int>6102</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
328
\ No newline at end of file
329
\ 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