Commit b42a89f5 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

erp5_officejs: Update design and synchronization parameters for ERP5

parent 34707b7a
...@@ -114,10 +114,9 @@ ...@@ -114,10 +114,9 @@
today = new Date();\n today = new Date();\n
doc.parent_relative_url = "web_page_module";\n doc.parent_relative_url = "web_page_module";\n
doc.portal_type = "Web Page";\n doc.portal_type = "Web Page";\n
// Supsended until modification_date is handled for synchronization\n doc.modification_date = today.getDate()\n
//doc.modification_date = today.getDate()\n + \'/\' + (today.getMonth() + 1)\n
// + \'/\' + (today.getMonth() - 2)\n + \'/\' + today.getFullYear();\n
// + \'/\' + today.getFullYear();\n
for (i = 0; i < submit_event.target.length; i += 1) {\n for (i = 0; i < submit_event.target.length; i += 1) {\n
// XXX Should check input type instead\n // XXX Should check input type instead\n
if (submit_event.target[i].name) {\n if (submit_event.target[i].name) {\n
...@@ -202,6 +201,7 @@ ...@@ -202,6 +201,7 @@
.declareMethod("render", function (options) {\n .declareMethod("render", function (options) {\n
var gadget = this;\n var gadget = this;\n
gadget.options = options;\n gadget.options = options;\n
gadget.options.doc.title = gadget.options.doc.title || "";\n
return new RSVP.Queue()\n return new RSVP.Queue()\n
.push(function () {\n .push(function () {\n
return gadget.translateHtml(template(options.doc));\n return gadget.translateHtml(template(options.doc));\n
...@@ -413,7 +413,7 @@ ...@@ -413,7 +413,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>945.61376.26272.49152</string> </value> <value> <string>945.62635.52426.43195</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -431,7 +431,7 @@ ...@@ -431,7 +431,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1443020943.97</float> <float>1443095776.25</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -144,7 +144,6 @@ ...@@ -144,7 +144,6 @@
.push(function () {\n .push(function () {\n
var doc = {\n var doc = {\n
// XXX Hardcoded\n // XXX Hardcoded\n
title: "Undefined Title",\n
parent_relative_url: "web_page_module",\n parent_relative_url: "web_page_module",\n
portal_type: "Web Page"\n portal_type: "Web Page"\n
};\n };\n
...@@ -296,7 +295,7 @@ ...@@ -296,7 +295,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>945.18327.39274.43895</string> </value> <value> <string>945.34038.48545.63795</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -314,7 +313,7 @@ ...@@ -314,7 +313,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1440437280.54</float> <float>1443093586.17</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -113,18 +113,18 @@ ...@@ -113,18 +113,18 @@
type: "replicate",\n type: "replicate",\n
// XXX This drop the signature lists...\n // XXX This drop the signature lists...\n
query: {\n query: {\n
query: \'portal_type:"Web Page" \',\n query: \'portal_type:"Web Page" \'\n
// XX Synchonizing the whole module is too much, here is a way to start quietly\n // XX Synchonizing the whole module is too much, here is a way to start quietly\n
// Supsended until modification_date is handled for synchronization\n // Supsended until modification_date is handled for synchronization\n
// + \' AND modification_date:>="\'\n + \' AND modification_date:>="\'\n
// + today.getDate() + \'/\' + (today.getMonth() - 2) + \'/\' + today.getFullYear() + \'" \',\n + today.getDate() + \'/\' + (today.getMonth() - 2) + \'/\' + today.getFullYear() + \'" \',\n
limit: [0, 1234567890]\n limit: [0, 1234567890]\n
},\n },\n
use_remote_post: true,\n use_remote_post: true,\n
conflict_handling: 2,\n conflict_handling: 2,\n
check_local_modification: true,\n check_local_modification: true,\n
check_local_creation: true,\n check_local_creation: true,\n
check_local_deletion: true,\n check_local_deletion: false,\n
check_remote_modification: true,\n check_remote_modification: true,\n
check_remote_creation: true,\n check_remote_creation: true,\n
check_remote_deletion: true,\n check_remote_deletion: true,\n
...@@ -379,7 +379,7 @@ ...@@ -379,7 +379,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>945.61375.20078.28842</string> </value> <value> <string>945.62750.27719.2184</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -397,7 +397,7 @@ ...@@ -397,7 +397,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1443020972.18</float> <float>1443102632.01</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -117,13 +117,20 @@ ...@@ -117,13 +117,20 @@
\n \n
<script src="rsvp.js"></script>\n <script src="rsvp.js"></script>\n
<script src="renderjs.js"></script>\n <script src="renderjs.js"></script>\n
<script src="handlebars.js"></script>\n
<script src="gadget_global.js" ></script>\n <script src="gadget_global.js" ></script>\n
\n \n
<script id="page-template" type="text/x-handlebars-template">\n <script src="gadget_officejs_page_login.js"></script>\n
<div class="ui-grid-b ui-responsive">\n </head>\n
<div class="ui-block-a"></div>\n \n
<div class="ui-block-b">\n <body>\n
<article class="ui-content ui-body-c">\n
<section class="ui-content-header-plain">\n
<h3 class="ui-content-title ui-body-c">\n
<span class="ui-icon ui-icon-custom ui-icon-user">&nbsp;</span>\n
Login\n
</h3>\n
</section>\n
<section class="ui-body-c ui-content-section">\n
<form class="login-form">\n <form class="login-form">\n
<div class="ui-field-contain">\n <div class="ui-field-contain">\n
<label data-i18n="Login">Login</label>\n <label data-i18n="Login">Login</label>\n
...@@ -133,17 +140,18 @@ ...@@ -133,17 +140,18 @@
<label data-i18n="Password">Password</label>\n <label data-i18n="Password">Password</label>\n
<input type="password" name="passwd" placeholder="Ex: A1bcF$99" value="" required>\n <input type="password" name="passwd" placeholder="Ex: A1bcF$99" value="" required>\n
</div>\n </div>\n
<input data-inline="true" type="submit" data-i18n="[value]Log In" value="Log In" data-theme="b">\n <div class="ui-grid-b ui-responsive">\n
</form>\n <div class="ui-block-a">\n
</div>\n </div>\n
<div class="ui-block-c"></div>\n <div class="ui-block-b">\n
</div>\n </div>\n
</script>\n <div class="ui-block-c">\n
\n <button class="ui-btn ui-btn-b" type="submit" data-i18n="Log In">Log In</button>\n
<script src="gadget_officejs_page_login.js"></script>\n </div>\n
</head>\n </div>\n
\n </form>\n
<body>\n </section>\n
</article>\n
</body>\n </body>\n
</html>\n </html>\n
...@@ -285,7 +293,7 @@ ...@@ -285,7 +293,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>945.18369.48314.20172</string> </value> <value> <string>945.62650.43414.46660</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -303,7 +311,7 @@ ...@@ -303,7 +311,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1441812708.55</float> <float>1443096971.41</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -101,22 +101,15 @@ ...@@ -101,22 +101,15 @@
</item> </item>
<item> <item>
<key> <string>text_content</string> </key> <key> <string>text_content</string> </key>
<value> <string>/*globals window, document, RSVP, rJS, promiseEventListener, Handlebars*/\n <value> <string>/*globals window, document, RSVP, rJS, promiseEventListener*/\n
/*jslint indent: 2, maxlen: 80, nomen: true*/\n /*jslint indent: 2, maxlen: 80, nomen: true*/\n
(function (window, document, RSVP, rJS, promiseEventListener, Handlebars) {\n (function (window, document, RSVP, rJS, promiseEventListener) {\n
"use strict";\n "use strict";\n
\n \n
/////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////\n
// templates\n // templates\n
/////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////\n
var gadget_klass = rJS(window),\n rJS(window)\n
templater = gadget_klass.__template_element,\n
\n
template = Handlebars.compile(\n
templater.getElementById("page-template").innerHTML\n
);\n
\n
gadget_klass\n
.ready(function (g) {\n .ready(function (g) {\n
g.props = {};\n g.props = {};\n
return g.getElement()\n return g.getElement()\n
...@@ -131,12 +124,6 @@ ...@@ -131,12 +124,6 @@
var gadget = this;\n var gadget = this;\n
return gadget.updateHeader({\n return gadget.updateHeader({\n
title: "Connect"\n title: "Connect"\n
})\n
.push(function () {\n
return gadget.translateHtml(template());\n
})\n
.push(function (html) {\n
gadget.props.element.innerHTML = html;\n
});\n });\n
})\n })\n
\n \n
...@@ -154,7 +141,7 @@ ...@@ -154,7 +141,7 @@
);\n );\n
})\n })\n
.push(function (evt) {\n .push(function (evt) {\n
gadget.props.element.querySelector("input[type=submit]")\n gadget.props.element.querySelector("button")\n
.disabled = true;\n .disabled = true;\n
var login = evt.target.elements[0].value,\n var login = evt.target.elements[0].value,\n
passwd = evt.target.elements[1].value;\n passwd = evt.target.elements[1].value;\n
...@@ -164,7 +151,7 @@ ...@@ -164,7 +151,7 @@
});\n });\n
});\n });\n
\n \n
}(window, document, RSVP, rJS, promiseEventListener, Handlebars));</string> </value> }(window, document, RSVP, rJS, promiseEventListener));</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -301,7 +288,7 @@ ...@@ -301,7 +288,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>945.41252.5943.7082</string> </value> <value> <string>945.62644.11371.29525</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -319,7 +306,7 @@ ...@@ -319,7 +306,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1441812760.42</float> <float>1443096382.27</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -79,8 +79,8 @@ ...@@ -79,8 +79,8 @@
<string>my_revision</string> <string>my_revision</string>
<string>my_language</string> <string>my_language</string>
<string>my_version</string> <string>my_version</string>
<string>my_modification_date</string>
<string>my_portal_type</string> <string>my_portal_type</string>
<string>my_modification_date</string>
</list> </list>
</value> </value>
</item> </item>
......
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