Commit 44a92999 authored by Gabriel Monnerat's avatar Gabriel Monnerat

2010-12-22 gabriel

* Initial commit to load part of user and system preferences

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41686 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8a8023f6
<?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>from Products.ERP5Type.JSONEncoder import encodeInJson as dumps\n
\n
portal_preferences = context.portal_preferences\n
print dumps(dict(preference=portal_preferences.getActivePreference().getRelativeUrl(), \n
system_preference=portal_preferences.getActiveSystemPreference().getRelativeUrl()))\n
\n
return printed\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </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>_print_</string>
<string>_print</string>
<string>Products.ERP5Type.JSONEncoder</string>
<string>encodeInJson</string>
<string>dumps</string>
<string>_getattr_</string>
<string>context</string>
<string>portal_preferences</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>Base_getPreferencePathList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -40,6 +40,7 @@
enctype string:multipart/form-data;\n
portal_path python:website.absolute_url();">\n
<a id="right_message">Not Implemented yet</a>\n
<div id="preference_dialog" title="UNG Preferences"></div> \n
<tal:block tal:condition="here/portal_membership/isAnonymousUser">\n
<a id="login" tal:attributes="href string: #">Sign in</a>\n
</tal:block>\n
......
......@@ -103,6 +103,23 @@ function update(){\n
$("a#loading_message").append(".");\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
if ($("div#preference_dialog").html() == "") {\n
$.get(preference, function(data){\n
$("div#preference_dialog").append("<fieldset class=\'center editable\'>" + \n
$(data).find(\'fieldset.center.editable\').html() +\n
"</fieldset>");\n
});\n
$.get(system_preference, function(data){\n
$("div#preference_dialog").append("<fieldset class=\'right editable\'>" + \n
$(data).find(\'fieldset.right.editable\').html() +\n
"</fieldset>");\n
});\n
}\n
});\n
\n
$(document).ready(function(){\n
if ($("div.gadget-column").length == 0 && window.location.href.split("?").length > 1) {\n
parameterList = getUrlParameterList();\n
......@@ -111,12 +128,16 @@ $(document).ready(function(){\n
$("a#loading_message").show();\n
setTimeout(checkConversion(), 1000);\n
}\n
if (getWebEditorName() == "WebPage_viewEditor" || getWebEditorName() == "WebTable_viewEditor")\n
$("div.content").css({"position":"fixed", "bottom": "0px", "left": "0px", "right": "0px"});\n
if (getWebEditorName() == "WebPage_viewEditor")\n
$("div.content").css({"top": "5em"});\n
if (getWebEditorName() == "WebTable_viewEditor")\n
$("div.content").css({"top": "6em"});\n
switch (getWebEditorName()) {\n
case "WebPage_viewEditor":\n
$("div.content").css({"position":"fixed", "bottom": "0px", "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({"top": "6em"});\n
break;\n
}\n
}\n
$("a[name=\'document_title\']").html(getObjectPropertyValue("getTitle"));\n
$("input#upload").click(function(event){\n
......@@ -214,6 +235,12 @@ $(document).ready(function(){\n
width: 346,\n
modal: true,\n
});\n
$("div#preference_dialog").dialog({\n
autoOpen: false,\n
height: 140,\n
width: 330,\n
modal: true,\n
});\n
$("p#more_properties")\n
.click(function(){\n
$("div#more_property").show();\n
......@@ -228,19 +255,24 @@ $(document).ready(function(){\n
.css("width", "35%");\n
$("div#more_property input").css("width", "47%");\n
$("p#more_properties").hide();\n
});\n
});\n
$("p#hide_properties")\n
.click(function(){\n
$("div#more_property").hide();\n
$("p#more_properties").show();\n
$("p#hide_properties").hide();\n
$("div#edit_document fieldset input").css("width", "95%")\n
.css("margin-top", "14px");\n
$("div#edit_document fieldset").animate({"height": "69px"}, "slow");\n
$("div.ui-dialog").animate({"height": "148px"}, "slow");\n
$("div#edit_document").animate({"height": "78px"}, "slow");\n
})\n
$("button.ui-button, span.ui-icon").click(function(){$("p#hide_properties").click()})\n
$("div#more_property").hide();\n
$("p#more_properties").show();\n
$("p#hide_properties").hide();\n
$("div#edit_document fieldset input").css("width", "95%")\n
.css("margin-top", "14px");\n
$("div#edit_document fieldset").animate({"height": "69px"}, "slow");\n
$("div.ui-dialog").animate({"height": "148px"}, "slow");\n
$("div#edit_document").animate({"height": "78px"}, "slow");\n
});\n
$("a#settings")\n
.click(function(event){\n
event.preventDefault();\n
$("div#preference_dialog").dialog("open");\n
});\n
$("button.ui-button, span.ui-icon").click(function(){$("p#hide_properties").click()});\n
$("a[name=\'document_title\']")\n
.click(function(){\n
$("div#more_property").hide();\n
......@@ -256,7 +288,7 @@ $(document).ready(function(){\n
$("input#sort_index.sort_index").attr("value", getObjectPropertyValue("getIntIndex"));\n
$("#edit_document").dialog("open"); \n
});\n
$("a#settings, a#help").click(function(event){\n
$("a#help").click(function(event){\n
event.preventDefault();\n
showNotImplementedMessage("a#right_message");\n
});\n
......
......@@ -883,9 +883,31 @@ div#login_form {\n
}\n
\n
div#login_form input {\n
vertical-align: middle; \n
vertical-align: middle; \n
}\n
\n
div#preference_dialog {\n
display:none;\n
width: 308px !important;\n
}\n
\n
fieldset.center.editable, fieldset.right.editable {\n
border: 0;\n
padding: 0.15em 0.35em 0.400em;\n
font-size: 14px;\n
margin-left: -11px;\n
}\n
\n
fieldset.center.editable div.field label, \n
fieldset.right.editable div.field label {\n
display: block;\n
}\n
\n
span#ui-dialog-title-preference_dialog {\n
margin: 0;\n
margin-top: -3px;\n
margin-left: -10px;\n
}
]]></string> </value>
</item>
......
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.
* Clean up the script to generate the UNG Domains and remove not used scripts.
......
138
\ No newline at end of file
139
\ 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