Commit 6f381445 authored by Romain Courteaud's avatar Romain Courteaud

erp5_no_style: fdl style

parent 1b9f35ce
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</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>fdl_complexity.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
while (body.firstChild) { while (body.firstChild) {
body.firstChild.remove(); body.firstChild.remove();
} }
return gadget.declareGadget('nostyle_syna.html', {scope: 'renderer'}) return gadget.declareGadget('nostyle_fdl.html', {scope: 'renderer'})
.push(function (result) { .push(function (result) {
style_gadget = result; style_gadget = result;
return style_gadget.render(gadget.main_element.innerHTML); return style_gadget.render(gadget.main_element.innerHTML);
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<head> <head>
<link rel="stylesheet" href="https://www.fdl-lef.org/material_design_lite.1.3.0.min.css" /> <link rel="stylesheet" href="https://www.fdl-lef.org/material_design_lite.1.3.0.min.css" />
<link rel="stylesheet" href="https://www.fdl-lef.org/font-awesome.5.1/font-awesome.5.1.css" /> <link rel="stylesheet" href="https://www.fdl-lef.org/font-awesome.5.1/font-awesome.5.1.css" />
<link rel="stylesheet" href="https://www.fdl-lef.org/fdl_complexity.css" /> <link rel="stylesheet" href="fdl_complexity.css" />
<script type="text/javascript" src="https://www.fdl-lef.org/material_design_lite.1.3.0.min.js"></script> <!--script type="text/javascript" src="https://www.fdl-lef.org/material_design_lite.1.3.0.min.js"></script>
<script type="text/javascript" src="https://www.fdl-lef.org/material_design_lite.1.3.0.dialog.polyfill.js"></script> <script type="text/javascript" src="https://www.fdl-lef.org/material_design_lite.1.3.0.dialog.polyfill.js"></script-->
<script type="text/javascript" src="https://www.fdl-lef.org/siema.carousel.min.js"></script> <script type="text/javascript" src="https://www.fdl-lef.org/siema.carousel.min.js"></script>
<script src="portal_skins/erp5_xhtml_style/rsvp.js"></script> <script src="portal_skins/erp5_xhtml_style/rsvp.js"></script>
<script src="portal_skins/erp5_xhtml_style/renderjs.js"></script> <script src="portal_skins/erp5_xhtml_style/renderjs.js"></script>
......
...@@ -4,64 +4,35 @@ ...@@ -4,64 +4,35 @@
"use strict"; "use strict";
rJS(window) rJS(window)
.declareAcquiredMethod("getMainInnerHTML", "getMainInnerHTML") .declareMethod("render", function (main_innerhtml) {
.declareAcquiredMethod("showPage", "showPage")
.declareService(function () {
var gadget = this; var gadget = this;
return gadget.getMainInnerHTML() var div = document.createElement('div');
.push(function (main_innerhtml) { div.innerHTML = main_innerhtml;
var div = document.createElement('div'); gadget.element.querySelector('div.rjs-content-container').innerHTML = div.querySelector('div.input').firstChild.innerHTML;
div.innerHTML = main_innerhtml; gadget.renderCarousel();
gadget.element.querySelector('div.rjs-content-container').innerHTML = div.querySelector('div.input').firstChild.innerHTML;
return RSVP.delay(50);
})
.push(function () {
return gadget.showPage();
})
.push(function () {
var carousel = window.document.querySelector(".siema");
var s;
if (carousel) {
s = new Siema({
selector: carousel,
easing: 'ease-out',
perPage: 1,
duration: 300,
loop: true
});
document.querySelector('.prev').addEventListener('click', function () {
s.prev();
}, false);
document.querySelector('.next').addEventListener('click', function () {
s.next();
}, false);
window.componentHandler.upgradeDom();
}
});
/*
}) })
.declareService(function () { .declareJob("renderCarousel", function () {
var gadget = this, var gadget = this;
body = gadget.element; gadget.element.querySelector('main').scrollTo(0, 0);
return new RSVP.Queue(RSVP.all([
rJS.declareCSS("https://www.fdl-lef.org/material_design_lite.1.3.0.min.css", document.head), var carousel = gadget.element.querySelector(".siema");
rJS.declareCSS("https://www.fdl-lef.org/font-awesome.5.1/font-awesome.5.1.css", document.head), var s;
rJS.declareCSS("https://www.fdl-lef.org/fdl_complexity.css", document.head) if (carousel) {
])) s = new Siema({
.push(function () { selector: carousel,
var main = body.querySelector('main'); easing: 'ease-out',
perPage: 1,
body.innerHTML = ''; duration: 300,
body.appendChild(main); loop: true
body.hidden = false;
}); });
document.querySelector('.prev').addEventListener('click', function () {
console.log('aaaa'); s.prev();
*/ }, false);
document.querySelector('.next').addEventListener('click', function () {
s.next();
}, false);
// window.componentHandler.upgradeDom();
}
}); });
}()); }());
\ 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