Browse Source

Merge PR #1330 into 12.0

Signed-off-by max3903
12.0
OCA-git-bot 5 years ago
parent
commit
0f95b0fb0a
  1. 1
      web_timeline/README.rst
  2. 2
      web_timeline/i18n/web_timeline.pot
  3. 1
      web_timeline/readme/CONTRIBUTORS.rst
  4. 1
      web_timeline/static/description/index.html
  5. 32
      web_timeline/static/src/css/web_timeline.css
  6. 11
      web_timeline/static/src/js/timeline_renderer.js

1
web_timeline/README.rst

@ -183,6 +183,7 @@ Contributors
* Leonardo Donelli <donelli@webmonks.it> * Leonardo Donelli <donelli@webmonks.it>
* Adrien Didenot <adrien.didenot@horanet.com> * Adrien Didenot <adrien.didenot@horanet.com>
* Dennis Sluijk <d.sluijk@onestein.nl> * Dennis Sluijk <d.sluijk@onestein.nl>
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
Other credits Other credits
~~~~~~~~~~~~~ ~~~~~~~~~~~~~

2
web_timeline/i18n/web_timeline.pot

@ -86,7 +86,7 @@ msgstr ""
#. module: web_timeline #. module: web_timeline
#. openerp-web #. openerp-web
#: code:addons/web_timeline/static/src/js/timeline_renderer.js:467
#: code:addons/web_timeline/static/src/js/timeline_renderer.js:476
#, python-format #, python-format
msgid "Template \"timeline-item\" not present in timeline view definition." msgid "Template \"timeline-item\" not present in timeline view definition."
msgstr "" msgstr ""

1
web_timeline/readme/CONTRIBUTORS.rst

@ -4,3 +4,4 @@
* Leonardo Donelli <donelli@webmonks.it> * Leonardo Donelli <donelli@webmonks.it>
* Adrien Didenot <adrien.didenot@horanet.com> * Adrien Didenot <adrien.didenot@horanet.com>
* Dennis Sluijk <d.sluijk@onestein.nl> * Dennis Sluijk <d.sluijk@onestein.nl>
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>

1
web_timeline/static/description/index.html

@ -560,6 +560,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<li>Leonardo Donelli &lt;<a class="reference external" href="mailto:donelli&#64;webmonks.it">donelli&#64;webmonks.it</a>&gt;</li> <li>Leonardo Donelli &lt;<a class="reference external" href="mailto:donelli&#64;webmonks.it">donelli&#64;webmonks.it</a>&gt;</li>
<li>Adrien Didenot &lt;<a class="reference external" href="mailto:adrien.didenot&#64;horanet.com">adrien.didenot&#64;horanet.com</a>&gt;</li> <li>Adrien Didenot &lt;<a class="reference external" href="mailto:adrien.didenot&#64;horanet.com">adrien.didenot&#64;horanet.com</a>&gt;</li>
<li>Dennis Sluijk &lt;<a class="reference external" href="mailto:d.sluijk&#64;onestein.nl">d.sluijk&#64;onestein.nl</a>&gt;</li> <li>Dennis Sluijk &lt;<a class="reference external" href="mailto:d.sluijk&#64;onestein.nl">d.sluijk&#64;onestein.nl</a>&gt;</li>
<li>Serpent Consulting Services Pvt. Ltd. &lt;<a class="reference external" href="mailto:support&#64;serpentcs.com">support&#64;serpentcs.com</a>&gt;</li>
</ul> </ul>
</div> </div>
<div class="section" id="other-credits"> <div class="section" id="other-credits">

32
web_timeline/static/src/css/web_timeline.css

@ -29,3 +29,35 @@
left: 0px; left: 0px;
top: 0px; top: 0px;
} }
.vis-labelset {
position: relative;
width: 100%;
height: 100%;
overflow: visible !important;
}
.vis-labelset .vis-label:first-child {
background: lightgrey;
position: sticky;
top: 0px !important;
z-index: 999;
max-height: 100px;
height: 100px !important;
display: -webkit-flex;
}
.vis-foreground .vis-group:first-child {
background: lightgrey;
position: sticky;
top: 0px !important;
z-index: 999;
max-height: 100px;
height: 100px !important;
display: -webkit-flex;
overflow: auto;
}
.vis-background .vis-group:nth-child(2) .vis-line{
display:none !important;
}

11
web_timeline/static/src/js/timeline_renderer.js

@ -210,7 +210,10 @@ odoo.define('web_timeline.TimelineRenderer', function (require) {
onAdd: self.on_add, onAdd: self.on_add,
onMove: self.on_move, onMove: self.on_move,
onUpdate: self.on_update, onUpdate: self.on_update,
onRemove: self.on_remove
onRemove: self.on_remove,
horizontalScroll: false,
verticalScroll:true,
zoomKey: 'ctrlKey',
}); });
this.qweb = new QWeb(session.debug, {_s: session.origin}, false); this.qweb = new QWeb(session.debug, {_s: session.origin}, false);
if (this.arch.children.length) { if (this.arch.children.length) {
@ -223,6 +226,12 @@ odoo.define('web_timeline.TimelineRenderer', function (require) {
} }
this.timeline = new vis.Timeline(self.$timeline.empty().get(0)); this.timeline = new vis.Timeline(self.$timeline.empty().get(0));
$(this.timeline.dom.leftContainer).scroll(function() {
var hei = ($('.vis-foreground .vis-group:first-child')[0].style.height).split("px");
var itemset_height = ($('.vis-itemset')[0].style.height).split("px");
var new_height = parseInt(itemset_height[0]) - (parseInt(hei[0]) - 100)
$('.vis-itemset').css('height', new_height)
});
this.timeline.setOptions(this.options); this.timeline.setOptions(this.options);
if (self.mode && self['on_scale_' + self.mode + '_clicked']) { if (self.mode && self['on_scale_' + self.mode + '_clicked']) {
self['on_scale_' + self.mode + '_clicked'](); self['on_scale_' + self.mode + '_clicked']();

Loading…
Cancel
Save