Browse Source

[FIX] floating blocks

pull/1/head
Ivan Yelizariev 10 years ago
parent
commit
93b1b7b1e9
  1. 1
      mail_wall_menu_views.xml
  2. 1
      static/lib/masonry.pkgd.min.js
  3. 4
      static/src/css/mail_wall_menu.css
  4. 18
      static/src/js/mail_wall_menu.js

1
mail_wall_menu_views.xml

@ -4,6 +4,7 @@
<template id="assets_backend" name="assets" inherit_id="mail.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/mail_wall_menu/static/src/css/mail_wall_menu.css"/>
<script type="text/javascript" src="/mail_wall_menu/static/lib/masonry.pkgd.min.js"></script>
<script type="text/javascript" src="/mail_wall_menu/static/src/js/mail_wall_menu.js"></script>
</xpath>
</template>

1
static/lib/masonry.pkgd.min.js
File diff suppressed because it is too large
View File

4
static/src/css/mail_wall_menu.css

@ -20,6 +20,8 @@
.openerp .oe_mail_wall .dashboard_only .oe_goal{
background-color: #ededf6;
width:280px;
float:left;
margin:5px;
position:absolute;
left:-300px;
}

18
static/src/js/mail_wall_menu.js

@ -6,6 +6,24 @@ openerp.mail_wall_menu = function(instance){
start: function(){
if (this.action.params.disable_thread){
$('.oe_view_manager_body').addClass('dashboard_only');
var msnry = new Masonry( '.oe_mail_wall_aside', {
// options
columnWidth: 290,
itemSelector: '.oe_goal',
transitionDuration: 0
});
var update = -10;
setInterval(function(){
update++;
if (update > 0 && update % 5 != 0)
return;
if (update > 0)
update = 0;
msnry.reloadItems();
msnry.layout();
}, 1000)
return;
}
this._super.apply(this, arguments)

Loading…
Cancel
Save