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