summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2012-09-14 18:51:04 +0200
committerOlivier Dony <odo@openerp.com>2012-09-14 18:51:04 +0200
commitaef309a11c49a071815cf3dca1ef721251da41e6 (patch)
tree7d5f6ef3aac98c00ac5bf5c0eb84ef12813d1d88 /addons/web/static/src
parenta7b1c0ff55959013e87ca4737ada13aba960e8cd (diff)
parent2b0a842661c4458419d0e4a22222be3a3021d66c (diff)
[MERGE] Sync with trunk
bzr revid: odo@openerp.com-20120914165104-zsxkby9nslh8x2ry
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/coresetup.js2
-rw-r--r--addons/web/static/src/js/view_list.js9
2 files changed, 2 insertions, 9 deletions
diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js
index 295976eb639..ea160d6faee 100644
--- a/addons/web/static/src/js/coresetup.js
+++ b/addons/web/static/src/js/coresetup.js
@@ -170,7 +170,7 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
})
);
}
- return loaded.then(function () {
+ return loaded.pipe(function () {
return self.do_load_js(file_list);
}).then(function() {
self.on_modules_loaded();
diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js
index 015cd1636f1..8cdbcb5a9ff 100644
--- a/addons/web/static/src/js/view_list.js
+++ b/addons/web/static/src/js/view_list.js
@@ -919,8 +919,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
this.records.bind(event, callback);
}, this);
- this.$_element = $('<tbody>')
- .appendTo(document.body)
+ this.$current = $('<tbody>')
.delegate('th.oe_list_record_selector', 'click', function (e) {
e.stopPropagation();
var selection = self.get_selection();
@@ -1011,11 +1010,6 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
});
},
render: function () {
- var self = this;
- if (this.$current) {
- this.$current.remove();
- }
- this.$current = this.$_element.clone(true);
this.$current.empty().append(
QWeb.render('ListView.rows', _.extend({
render_cell: function () {
@@ -1091,7 +1085,6 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
if (!this.$current) { return; }
this.$current.remove();
this.$current = null;
- this.$_element.remove();
},
get_records: function () {
return this.records.map(function (record) {