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 @@
while (body.firstChild) {
body.firstChild.remove();
}
return gadget.declareGadget('nostyle_syna.html', {scope: 'renderer'})
return gadget.declareGadget('nostyle_fdl.html', {scope: 'renderer'})
.push(function (result) {
style_gadget = result;
return style_gadget.render(gadget.main_element.innerHTML);
......
......@@ -2,10 +2,10 @@
<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/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.dialog.polyfill.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/siema.carousel.min.js"></script>
<script src="portal_skins/erp5_xhtml_style/rsvp.js"></script>
<script src="portal_skins/erp5_xhtml_style/renderjs.js"></script>
......
......@@ -4,64 +4,35 @@
"use strict";
rJS(window)
.declareAcquiredMethod("getMainInnerHTML", "getMainInnerHTML")
.declareAcquiredMethod("showPage", "showPage")
.declareService(function () {
.declareMethod("render", function (main_innerhtml) {
var gadget = this;
return gadget.getMainInnerHTML()
.push(function (main_innerhtml) {
var div = document.createElement('div');
div.innerHTML = main_innerhtml;
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();
}
});
/*
var div = document.createElement('div');
div.innerHTML = main_innerhtml;
gadget.element.querySelector('div.rjs-content-container').innerHTML = div.querySelector('div.input').firstChild.innerHTML;
gadget.renderCarousel();
})
.declareService(function () {
var gadget = this,
body = gadget.element;
return new RSVP.Queue(RSVP.all([
rJS.declareCSS("https://www.fdl-lef.org/material_design_lite.1.3.0.min.css", document.head),
rJS.declareCSS("https://www.fdl-lef.org/font-awesome.5.1/font-awesome.5.1.css", document.head),
rJS.declareCSS("https://www.fdl-lef.org/fdl_complexity.css", document.head)
]))
.push(function () {
var main = body.querySelector('main');
body.innerHTML = '';
body.appendChild(main);
body.hidden = false;
.declareJob("renderCarousel", function () {
var gadget = this;
gadget.element.querySelector('main').scrollTo(0, 0);
var carousel = gadget.element.querySelector(".siema");
var s;
if (carousel) {
s = new Siema({
selector: carousel,
easing: 'ease-out',
perPage: 1,
duration: 300,
loop: true
});
console.log('aaaa');
*/
document.querySelector('.prev').addEventListener('click', function () {
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