Commit 29b6bdd0 authored by Gabriel Monnerat's avatar Gabriel Monnerat

2010-01-07 gabriel

* Add dialog to display the list of gadget

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42127 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0db7cfc9
<?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[
from Products.ERP5Type.JSONEncoder import encodeInJson as dumps\n
\n
gadget_list = context.portal_catalog(portal_type="Gadget")\n
\n
gadget_data_list = []\n
for gadget in gadget_list:\n
image_url = gadget.getRelativeUrl() + "/default_image?resolution=75.0&display=thumbnail&format=png"\n
gadget_data_list.append(dict(title=gadget.getTitle(),\n
image_url=image_url,\n
id=gadget.getId()))\n
\n
return dumps(gadget_data_list)\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSection_getGadgetPathList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -260,10 +260,22 @@ $(document).ready(function(){\n
width: 346,\n
modal: true,\n
});\n
$("div.gadget-listbox").dialog({\n
autoOpen: false,\n
height: 416,\n
width: 500,\n
modal: true,\n
buttons: {\n
"Add": function(){\n
window.location.reload();\n
},\n
}\n
});\n
$("div#preference_dialog").dialog({\n
autoOpen: false,\n
height: 487,\n
width: 330,\n
modal:true,\n
buttons: {\n
"Save": function(){\n
var erp5PreferenceArgument = $("form#erp5_preference").serialize();\n
......@@ -386,6 +398,32 @@ $(document).ready(function(){\n
});\n
$("a#add_gadget").click(function(event){\n
event.preventDefault();\n
$("div.gadget-listbox").dialog("open");\n
});\n
$.getJSON("WebSection_getGadgetPathList", function(data){\n
gadgetList = jQuery(data);\n
gadgetList.each(function(){\n
$("div.gadget-listbox table#gadget-table")\n
.append($(\'<tr>\')\n
.append($(\'<td>\')\n
.append($(\'<input>\')\n
.attr(\'type\', \'checkbox\')\n
.attr(\'id\', this.id)\n
)\n
)\n
.append($(\'<td>\')\n
.append($(\'<a>\')\n
.text(this.title)\n
)\n
)\n
.append($(\'<td>\')\n
.append($(\'<img>\')\n
.attr(\'src\', this.image_url)\n
.text(this.title)\n
)\n
)\n
);\n
});\n
});\n
return false;\n
});
......
......@@ -687,7 +687,8 @@ div#edit_document fieldset label {\n
}\n
\n
span#ui-dialog-title-edit_document, \n
span#ui-dialog-title-upload_document {\n
span#ui-dialog-title-upload_document,\n
span#ui-dialog-title-gadget-listbox{\n
font-size:17px;\n
margin-left:-8px;\n
margin-top:-3px;\n
......@@ -823,8 +824,7 @@ div.listbox-domain-tree-container select {\n
div.listbox-tree {\n
font-size: 13px;\n
width: 98.7%;\n
overflow-y: hidden;\n
overflow-x: hidden;\n
overflow: hidden;\n
height: 233px;\n
}\n
\n
......@@ -927,8 +927,25 @@ div.header-right fieldset.widget a#sharing_url {\n
padding-top: 2px;\n
font-size: 11px;\n
}\n
\n
div.gadget-column div.gadget-container a {\n
padding-left: 16px;\n
}\n
\n
div.gadget-listbox {\n
display: none;\n
}\n
\n
table#gadget-table tbody tr img {\n
float: right;\n
}\n
\n
table#gadget-table tbody tr {\n
font-size: 15px;\n
}\n
\n
table#gadget-table {\n
width: 100%;\n
}
]]></string> </value>
......
2010-01-07 gabriel
* Add dialog to display the list of gadget
2010-01-05 gabriel
* Add Domains and clean up the code that generates domains
......
151
\ No newline at end of file
152
\ 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