Commit 6dc82693 authored by Gabriel Monnerat's avatar Gabriel Monnerat

2010-12-27 gabriel

* Fix issue with search
* Add tag to display the document's key shared in the view page.
* Refactor javascript code to checkall and uncheckall actions do not reload the page

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41789 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 75451afa
......@@ -55,27 +55,28 @@
"""\n
portal = context.getPortalObject()\n
\n
if context.REQUEST.form.has_key("key"):\n
request = context.REQUEST\n
\n
if request.form.has_key("key"):\n
webpage = context.WebSection_userFollowUpWebPage(reference=context.REQUEST.form.get("key"))\n
webpage_id = webpage.getId()\n
editor_name = context.Base_getEditorViewName(webpage.getPortalType())\n
return context.Base_redirect("/web_page_module/%s/%s" % (webpage_id, editor_name),\n
keep_items=dict(editable_mode=1))\n
\n
else:\n
portal_type_list = request.form.get("portal_type")\n
searchable_text = request.form.get("SearchableText")\n
return context.Base_redirect("unfoldDomain", \n
keep_items = dict(domain_url="ung_domain/all_document_list",\n
form_id="erp5_web_ung_layout",\n
list_selection_name="ung_document_list_selection",\n
domain_depth=0,\n
SearchableText=searchable_text,\n
portal_type=portal_type_list,\n
reset=1))\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
......@@ -90,61 +91,10 @@ else:\n
</tuple>
</value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>webpage</string>
<string>webpage_id</string>
<string>editor_name</string>
<string>dict</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSection_renderer</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -60,6 +60,7 @@
</li>\n
</tal:block>\n
</div>\n
<a id=\'sharing_url\'></a>\n
</tal:block>
]]></unicode> </value>
......
......@@ -103,6 +103,12 @@ function update(){\n
$("a#loading_message").append(".");\n
}\n
\n
function changeCheckBoxValue(value){\n
$("table.listbox tbody tr td.listbox-table-select-cell input").each(function(){\n
this.checked = value;\n
});\n
}\n
\n
$.getJSON("Base_getPreferencePathList", function(data){\n
preference = data.preference + \'/Preference_viewHtmlStyle?editable_mode:int=1\';\n
system_preference = data.system_preference + \'/SystemPreference_view?editable_mode:int=1\';\n
......@@ -130,11 +136,13 @@ $(document).ready(function(){\n
}\n
switch (getWebEditorName()) {\n
case "WebPage_viewEditor":\n
$("div.content").css({"position":"fixed", "bottom": "0px", "left": "0px", "right": "0px"});\n
$("div.content").css({"position":"fixed", "bottom": "0px",\n
"left": "0px", "right": "0px"});\n
$("div.content").css({"top": "5em"});\n
break;\n
case "WebTable_viewEditor":\n
$("div.content").css({"position":"fixed", "bottom": "0px", "left": "0px", "right": "0px"});\n
$("div.content").css({"position":"fixed", "bottom": "0px",\n
"left": "0px", "right": "0px"});\n
$("div.content").css({"top": "6em"});\n
break;\n
}\n
......@@ -192,17 +200,26 @@ $(document).ready(function(){\n
if ($("a[name=\'document_state\']").text() == "Draft") {\n
$("div.action_menu li ul").append("<li><a id=\'share_document\' href=\'#\'>" + \n
"<h6>Share this Document</h6></a></li>");\n
$("div.action_menu li ul").css("height", 101);\n
$("div.action_menu ul li a#share_document").click(function(event){\n
event.preventDefault();\n
reference = $.ajax({\n
url: \'WebSection_shareDocument\',\n
async: false,\n
}).responseText;\n
alert(reference);\n
$.ajax({\n
url: \'WebSection_shareDocument\',\n
async: false,\n
});\n
location.reload();\n
});\n
}\n
}\n
};\n
$("div.action_menu li ul").css("height",\n
$("div.action_menu li ul li").length * 25.3 + "px");\n
if ($("a[name=\'document_state\']").text() == "Shared"){\n
reference = $.ajax({\n
url: \'getReference\',\n
async: false,\n
}).responseText;\n
keyUrl = location.href.split("web_page_module")[0] + "?key=" + reference;\n
$("div.header-right fieldset.widget a#sharing_url").text(keyUrl);\n
};\n
};\n
$("#edit_document").dialog({\n
autoOpen: false,\n
height: 146,\n
......@@ -307,6 +324,14 @@ $(document).ready(function(){\n
});\n
}\n
});\n
$("input.listbox-check-all").click(function(event){\n
event.preventDefault();\n
changeCheckBoxValue(true);\n
});\n
$("input.listbox-uncheck-all").click(function(event){\n
event.preventDefault();\n
changeCheckBoxValue(false);\n
});\n
return false;\n
});
......
......@@ -912,8 +912,17 @@ span#ui-dialog-title-preference_dialog {\n
}\n
\n
div#preference_dialog div.field {\n
padding-bottom: 1px;\n
padding-top: 1px;\n
padding-bottom: 1px;\n
padding-top: 1px;\n
}\n
\n
div.header-right fieldset.widget {\n
height: 29px;\n
}\n
\n
div.header-right fieldset.widget a#sharing_url {\n
padding-top: 2px;\n
font-size: 11px;\n
}
]]></string> </value>
......
2010-12-27 gabriel
* Fix issue with search
* Add tag to display the document's key shared in the view page.
* Refactor javascript code to checkall and uncheckall actions do not reload the page
2010-12-22 gabriel
* Initial commit to load part of user and system preferences
* Implemented code to allow which the user edit the document using the reference of the document shared.
......
142
\ No newline at end of file
143
\ 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