Commit ca0fc063 authored by Gabriel Monnerat's avatar Gabriel Monnerat

2010-01-10 gabriel

* Add gadget view on UNG template and added script to add a gadget

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42171 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f73f2269
<?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>portal_catalog = context.portal_catalog\n
\n
website_uid = context.getUid()\n
knowledge_pad = portal_catalog.getResultValue(portal_type="Knowledge Pad",\n
publication_section_uid=website_uid,\n
validation_state="visible")\n
\n
knowledge_box = knowledge_pad.newContent(portal_type="Knowledge Box")\n
\n
knowledge_box.setSpecialise("portal_gadgets/%s" % gadget_id)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>tab_title, gadget_id</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSection_addGadget</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -68,7 +68,7 @@ else:\n ...@@ -68,7 +68,7 @@ else:\n
portal_type_list = request.form.get("portal_type")\n portal_type_list = request.form.get("portal_type")\n
searchable_text = request.form.get("SearchableText")\n searchable_text = request.form.get("SearchableText")\n
return context.Base_redirect("unfoldDomain", \n return context.Base_redirect("unfoldDomain", \n
keep_items = dict(domain_url="ung_domain/all_document_list",\n keep_items = dict(domain_url="ung_domain/all_documents",\n
form_id="erp5_web_ung_layout",\n form_id="erp5_web_ung_layout",\n
list_selection_name="ung_document_list_selection",\n list_selection_name="ung_document_list_selection",\n
domain_depth=0,\n domain_depth=0,\n
......
...@@ -151,7 +151,7 @@ $(document).ready(function(){\n ...@@ -151,7 +151,7 @@ $(document).ready(function(){\n
$(this).css("padding-right", "82px")\n $(this).css("padding-right", "82px")\n
}\n }\n
if ($(this).text().length > 16){\n if ($(this).text().length > 16){\n
$(this).css("padding-right", "35px")\n $(this).css("padding-right", "24px")\n
}\n }\n
});\n });\n
if ($("div.gadget-column").length == 1) {\n if ($("div.gadget-column").length == 1) {\n
...@@ -267,7 +267,24 @@ $(document).ready(function(){\n ...@@ -267,7 +267,24 @@ $(document).ready(function(){\n
modal: true,\n modal: true,\n
buttons: {\n buttons: {\n
"Add": function(){\n "Add": function(){\n
var gadgetId = null;\n
$("table#gadget-table tbody tr td input").each(function(){\n
if (this.checked){\n
gadgetId = $(this).attr("id");\n
return false;\n
};\n
});\n
if (gadgetId == null){\n
$(this).dialog("close");\n
};\n
var tabTitle = $("div#tabs ul li.tab_selected span").html();\n
$.ajax({\n
url:"WebSection_addGadget",\n
data: "tab_title=" + tabTitle + "&gadget_id=" + gadgetId,\n
success: function(data) {\n
window.location.reload();\n window.location.reload();\n
}\n
});\n
},\n },\n
}\n }\n
});\n });\n
...@@ -396,10 +413,6 @@ $(document).ready(function(){\n ...@@ -396,10 +413,6 @@ $(document).ready(function(){\n
});\n });\n
}\n }\n
});\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 $.getJSON("WebSection_getGadgetPathList", function(data){\n
gadgetList = jQuery(data);\n gadgetList = jQuery(data);\n
gadgetList.each(function(){\n gadgetList.each(function(){\n
...@@ -425,6 +438,16 @@ $(document).ready(function(){\n ...@@ -425,6 +438,16 @@ $(document).ready(function(){\n
);\n );\n
});\n });\n
});\n });\n
$("span#knowledge_pad_module_8_titlean").text("1");\n
if ($("#tab-list-container #tabs ul li").length > 2) {\n
$("li#add_new_tab_dialog_link.tab").hide()\n
};\n
$("div#add_new_gadget_link a#add-gadgets").removeAttr("onclick");\n
$("div#add_new_gadget_link a#add-gadgets").click(function(event){\n
event.preventDefault();\n
$("div.gadget-listbox").dialog("open");\n
});\n
$("div#page_wrapper div#portal-column-1.portal-column, div#page_wrapper div#portal-column-2.portal-column").remove();\n
return false;\n return false;\n
}); });
......
...@@ -107,7 +107,7 @@ div.share-action-area {\n ...@@ -107,7 +107,7 @@ div.share-action-area {\n
/* Main classes */\n /* Main classes */\n
\n \n
div.main-right {\n div.main-right {\n
width:82%;\n width:80.5%;\n
float:right;\n float:right;\n
border-left: 4px solid #BBCCFF;\n border-left: 4px solid #BBCCFF;\n
}\n }\n
...@@ -376,7 +376,7 @@ a.ung_docs img {\n ...@@ -376,7 +376,7 @@ a.ung_docs img {\n
\n \n
div.main-left {\n div.main-left {\n
margin-left:-4px;\n margin-left:-4px;\n
width: 18%;\n width: 19.5%;\n
float:left;\n float:left;\n
background-color: #DAE6F6;\n background-color: #DAE6F6;\n
height:4em;\n height:4em;\n
...@@ -823,7 +823,7 @@ div.listbox-domain-tree-container select {\n ...@@ -823,7 +823,7 @@ div.listbox-domain-tree-container select {\n
\n \n
div.listbox-tree {\n div.listbox-tree {\n
font-size: 13px;\n font-size: 13px;\n
width: 98.7%;\n width: 106.7%;\n
overflow: hidden;\n overflow: hidden;\n
height: 233px;\n height: 233px;\n
}\n }\n
...@@ -946,6 +946,19 @@ table#gadget-table tbody tr {\n ...@@ -946,6 +946,19 @@ table#gadget-table tbody tr {\n
\n \n
table#gadget-table {\n table#gadget-table {\n
width: 100%;\n width: 100%;\n
}\n
\n
div.gadget-action div.front_pad {\n
font-size: 10px;\n
width: 240px;\n
}\n
\n
h3.handle {\n
color: #222222 !important;\n
}\n
\n
div.portal-column {\n
width: 100% !important;\n
} }
]]></string> </value> ]]></string> </value>
......
2010-01-10 gabriel
* Add gadget view on UNG template and added script to add a gadget
2010-01-07 gabriel 2010-01-07 gabriel
* Add dialog to display the list of gadget * Add dialog to display the list of gadget
......
153 154
\ No newline at end of file \ 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