Commit 02da0e56 authored by Gabriel Monnerat's avatar Gabriel Monnerat

2011-02-09 gabriel

* Add logo to UNG Mail
* Add Form to compose a new email
* Refactor code to display in listbox the hour instead of the date when the email was created in current day
* Add javascript file to UNG Mail

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43240 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a4db5e0e
<?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>"""\n
This script is hack to get the html of FCKEditor. \n
The goals is open the html form to send e-mail without reload the page.\n
XXX - This script will be remove as soon as possible to use a good way\n
"""\n
extra_content = extra_context = {"inputvalue": "", "inputname": "Compose Mail"}\n
\n
return context.fckeditor_wysiwyg_support.pt_render(extra_context=extra_context)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getTextEditorHtml</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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 DateTime import DateTime\n
\n
form = context.REQUEST.form\n
\n
person = context.ERP5Site_getAuthenticatedMemberPersonValue()\n
sender_email = "freecloudalliance@freecloudalliance.org"\n
\n
if person and person.getEmail():\n
sender_email = person.getEmailText()\n
\n
email_thread_module = context.email_thread_module\n
email = email_thread_module.newContent(portal_type="Email Thread")\n
email.setStartDate(DateTime())\n
email.setSender(sender_email)\n
email.setRecipient(form.get("to"))\n
email.setCcRecipient(form.get("cc"))\n
email.setBccRecipient(form.get("bcc"))\n
email.setTitle(form.get("subject"))\n
if form.get("action") == "send":\n
context.portal_workflow.doActionFor(context, \'post_action\')\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_createNewEmailThread</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<div class="compose-mail-page">\n
<button title="Send" type="submit" id="send-mail"> Send </button>\n
<button title="Save" type="submit" id="save-mail"> Save </button>\n
<button title="Discard" type="submit" id="discard-mail"> Discard </button>\n
<div class="compose-mail">\n
<form>\n
<table id="form-table">\n
<tr>\n
<td valign="top">\n
<label for="to">To: </label>\n
</td>\n
<td valign="top">\n
<textarea rows="2" type="text" cols="100" id="to" name="to"/>\n
</td>\n
</tr>\n
<tr>\n
<td valign="top">\n
</td>\n
<td valign="top">\n
<span id="add-cc-field"> Add Cc </span>\n
<span id="add-bcc-field"> Add Bcc </span>\n
</td>\n
</tr>\n
<tr id="cc">\n
<td valign="top">\n
<label for="cc">Cc: </label>\n
</td>\n
<td valign="top">\n
<textarea type="text" cols="100" id="cc">\n
</td>\n
</tr>\n
<tr id="bcc">\n
<td valign="top">\n
<label for="bcc">Bcc: </label>\n
</td>\n
<td valign="top">\n
<textarea type="text" cols="100" id="bcc">\n
</td>\n
</tr>\n
<tr>\n
<td valign="top">\n
<label for="subject">Subject: </label>\n
</td>\n
<td valign="top">\n
<input type="text" size="80" name="subject" id="subject"/>\n
</td>\n
</tr>\n
</table>\n
<br/>\n
<textarea type="text" id="text-content" cols="110" rows="15"/>\n
<form>\n
</div>\n
<br/>\n
<button title="Send" type="submit" id="send-mail"> Send </button>\n
<button title="Save" type="submit" id="save-mail"> Save </button>\n
<button title="Discard" type="submit" id="discard-mail"> Discard </button>\n
</div>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>EmailThread_formView</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -57,7 +57,10 @@
XXX - check if it is possible with DateField\n
"""\n
date = context.getStartDate()\n
return "%s %s" % (date.aMonth(), date.day())\n
if date.isCurrentDay():\n
return date.AMPMMinutes()\n
else:\n
return "%s %s" % (date.aMonth(), date.day())\n
</string> </value>
</item>
<item>
......
......@@ -42,8 +42,7 @@
</span>\n
</div>\n
<div class="separator"></div>\n
<link href="ung_css/ung_mail.css" rel="stylesheet" type="text/css"/>\n
<button title="Compose Mail" name="" type="submit" class="compose_mail">\n
<button title="Compose Mail" name="" type="submit" id="compose-mail">\n
Compose Mail\n
</button>\n
<div class="gadget-column">\n
......
......@@ -64,6 +64,7 @@
<string>navigation navigation-right</string>
<string>main main-left</string>
<string>main main-right</string>
<string>hidden</string>
</list>
</value>
</item>
......@@ -75,7 +76,17 @@
<key> <string>header header-left</string> </key>
<value>
<list>
<string>your_mail_logo_box</string>
<string>your_search_box</string>
<string>your_style_box</string>
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>your_listbox_date</string>
</list>
</value>
</item>
......@@ -95,7 +106,6 @@
<string>your_toolbar</string>
<string>your_listbox</string>
<string>your_listbox_icon</string>
<string>your_listbox_date</string>
</list>
</value>
</item>
......
......@@ -45,7 +45,7 @@ div.favorite {\n
padding-top: 1px;\n
}\n
\n
button.compose_mail {\n
button#compose-mail {\n
background-image: url("ung_images/button_background.png");\n
border: 1px solid #BBBBBB;\n
-moz-border-radius: 4px;\n
......@@ -106,6 +106,59 @@ a#advertisement-url { \n
div.favorite a {\n
float: left;\n
margin-top: 2px;\n
}\n
\n
div.header-left fieldset.widget div.field {\n
display: inline-block;\n
}\n
\n
img[alt="mail_logo_box"] {\n
position: relative;\n
top: 9px;\n
cursor: pointer;\n
}\n
\n
div.main-left, div.main-right, div.main {\n
margin-top: 0em;\n
}\n
\n
div.main-right button#save-mail,\n
div.main-right button#discard-mail,\n
div.main-right button#send-mail { \n
background-image: url("ung_images/button_background.png");\n
border: 1px solid #BBBBBB;\n
-moz-border-radius: 4px;\n
margin-left: 10px;\n
margin-top: 10px;\n
}\n
\n
div.main-right table tbody tr td:first-child {\n
text-align: right;\n
}\n
\n
div.main-right table tbody tr td label {\n
font-size: 80%;\n
font-weight: bold;\n
}\n
\n
div.main-right table tbody tr td label[for="to"],\n
div.main-right table tbody tr td label[for="cc"],\n
div.main-right table tbody tr td label[for="bcc"] {\n
color: #0000CC;\n
text-decoration: underline;\n
white-space: nowrap;\n
}\n
\n
div.main-right tr#cc, div.main-right tr#bcc{\n
display:none;\n
}\n
\n
div.main-right span#add-cc-field,\n
div.main-right span#add-bcc-field {\n
font-size: 80%;\n
color: #20C;\n
text-decoration: underline;\n
cursor: pointer;\n
}</string> </value>
</item>
<item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts97251776.15</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ung_mail_logo.png</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/png</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="base64">iVBORw0KGgoAAAANSUhEUgAAAH4AAAAcCAYAAACnHwvZAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A
/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sCCQspO0r9w4gAAAAZdE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bKuTzJVb0dpDJhAD0ht18e9W3uCe1mStXXEFnS0fjOpZaulffZGDn
HFEcExtbTbe4s9k2QWmvKgRak06l8LwZTTTWUiqWmZ4ap1KeRilFS7aTtlwHYZgiSQzlcoTWipZM
iO97KKWwxlAulzAmIQgC0mELnudhrCEqR5gkIZVKkc6EaK3RWi+B/yzn+POxVfX7drMvW564jtb6
tGvXv3/yB5yU3Zt9nWsJ/EXa9NIWXJztfzxkJmC1kHWRAAAAAElFTkSuQmCC</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>28</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>2667</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>ung_mail_logo.png</string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>126</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DTMLMethod" module="OFS.DTMLMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>ung_mail.js</string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>raw</string> </key>
<value> <string>function saveEmailThread(event){\n
event.preventDefault();\n
formData = new Array();\n
$("div.compose-mail-page textarea, div.compose-mail-page input").each(function(){\n
formData.push({name: $(this).attr("id"), value: $(this).attr("value")});\n
});\n
formData.push({name: "action", value: "save"});\n
$.ajax({\n
type: "post",\n
url: "ERP5Site_createNewEmailThread",\n
data: formData,\n
mediaType: "json",\n
});\n
}\n
\n
$().ready(function(){\n
$("button#compose-mail").click(function(event){\n
event.preventDefault();\n
$("div.main-right fieldset.widget").hide();\n
$("div.main-right").css("background-color", "#BBCCFF");\n
$("div.main-right").load("EmailThread_formView", {}, function(){\n
$("button#discard-mail").click(function(){\n
window.location.reload();\n
});\n
$("span#add-cc-field").click(function(){\n
$(this).hide();\n
$("tr#cc").show();\n
});\n
$("span#add-bcc-field").click(function(){\n
$(this).hide();\n
$("tr#bcc").show();\n
});\n
$("button#save-mail").click(saveEmailThread);\n
});\n
});\n
$("img[alt=\'mail_logo_box\']").click(function(){\n
window.location.reload();\n
});\n
});</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2011-02-07
2011-02-09 gabriel
* Add logo to UNG Mail
* Add Form to compose a new email
* Refactor code to display in listbox the hour instead of the date when the email was created in current day
* Add javascript file to UNG Mail
2011-02-07 gabriel
* Initial commit to UNG Mail
* Added Web Section and form to Mail
* Add domain to UNG Mail
......
242
\ No newline at end of file
243
\ 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