Browse Source

PORT][FIX] minor change in js file due to changes in arch of the page;

pull/180/head
Sylvain LE GAL 9 years ago
parent
commit
ca8da56eda
  1. 9
      web_dashboard_tile/static/src/js/custom_js.js

9
web_dashboard_tile/static/src/js/custom_js.js

@ -45,12 +45,7 @@ _.mixin({
}, },
save_tile: function () { save_tile: function () {
var self = this; var self = this;
var getParent = this.getParent();
var view_parent = this.getParent().getParent(); var view_parent = this.getParent().getParent();
if (! view_parent.action || ! this.$el.find("select").val()) {
this.do_warn("Can't find dashboard action");
return;
}
var $name = this.$('#dashboard_tile_new_name'); var $name = this.$('#dashboard_tile_new_name');
@ -62,8 +57,8 @@ _.mixin({
return false; return false;
} }
var search = this.view.build_search_data(); var search = this.view.build_search_data();
var context = new instance.web.CompoundContext(getParent.dataset.get_context() || []);
var domain = new instance.web.CompoundDomain(getParent.dataset.get_domain() || []);
var context = new instance.web.CompoundContext(view_parent.dataset.get_context() || []);
var domain = new instance.web.CompoundDomain(view_parent.dataset.get_domain() || []);
_.each(search.contexts, context.add, context); _.each(search.contexts, context.add, context);
_.each(search.domains, domain.add, domain); _.each(search.domains, domain.add, domain);

Loading…
Cancel
Save