[IMP] uncomment for perf

bzr revid: fp@tinyerp.com-20131021153918-zpnp0xhisorgg3ws
This commit is contained in:
Fabien Pinckaers 2013-10-21 17:39:18 +02:00
parent 05476f9b31
commit 24e87a724a
1 changed files with 17 additions and 19 deletions

View File

@ -967,25 +967,23 @@
_drag_and_drop_after_insert_dropzone: function(){
var self = this;
// commented for perf
// var $zones = $(".row:has(> .oe_drop_zone)").each(function () {
// var $row = $(this);
// var width = $row.innerWidth();
// var pos = 0;
// while (width > pos + self.size.width) {
// var $last = $row.find("> .oe_drop_zone:last");
// $last.each(function () {
// pos = $(this).position().left;
// });
// if (width > pos + self.size.width) {
// $row.append("<div class='col-md-1 oe_drop_to_remove'/>");
// var $add_drop = $last.clone();
// $row.append($add_drop);
// self._drag_and_drop_active_drop_zone($add_drop);
// }
// }
// });
var $zones = $(".row:has(> .oe_drop_zone)").each(function () {
var $row = $(this);
var width = $row.innerWidth();
var pos = 0;
while (width > pos + self.size.width) {
var $last = $row.find("> .oe_drop_zone:last");
$last.each(function () {
pos = $(this).position().left;
});
if (width > pos + self.size.width) {
$row.append("<div class='col-md-1 oe_drop_to_remove'/>");
var $add_drop = $last.clone();
$row.append($add_drop);
self._drag_and_drop_active_drop_zone($add_drop);
}
}
});
},
_drag_and_drop_start: function () {
this._super();