From 59aaa765a669e5f15d083cd9c1c8579cecc57389 Mon Sep 17 00:00:00 2001 From: "vta vta@openerp.com" <> Date: Thu, 18 Oct 2012 14:46:07 +0200 Subject: [PATCH] [FIX] Fixed event name. bzr revid: vta@openerp.com-20121018124607-rifo06nfx7jo134e --- addons/web/static/src/js/search.js | 5 +++-- addons/web/static/src/js/view_form.js | 2 +- addons/web/static/src/js/views.js | 2 +- addons/web/static/test/search.js | 6 +++--- addons/web_hello/static/openerp/base_hello.js | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index d1d96f750f2..c16b65c9831 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -766,7 +766,8 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea groupbys: groupbys, errors: errors }; - }, /** + }, + /** * Performs the search view collection of widget data. * * If the collection went well (all fields are valid), then triggers @@ -786,7 +787,7 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea this.on_invalid(search.errors); return; } - return this.trigger('data_search', search.domains, search.contexts, search.groupbys); + return this.trigger('search_data', search.domains, search.contexts, search.groupbys); }, /** * Triggered after the SearchView has collected all relevant domains and diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 1a626912265..9c97f95f4c9 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -4468,7 +4468,7 @@ instance.web.form.SelectCreatePopup = instance.web.form.AbstractFormPopup.extend } this.searchview = new instance.web.SearchView(this, this.dataset, false, search_defaults); - this.searchview.on('data_search', self, function(domains, contexts, groupbys) { + this.searchview.on('search_data', self, function(domains, contexts, groupbys) { if (self.initial_ids) { self.do_search(domains.concat([[["id", "in", self.initial_ids]], self.domain]), contexts, groupbys); diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index d5123f07a9d..705bc1b214e 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -648,7 +648,7 @@ instance.web.ViewManager = instance.web.Widget.extend({ } this.searchview = new instance.web.SearchView(this, this.dataset, view_id, search_defaults, this.flags.search_view === false); - this.searchview.on('data_search', self, this.do_searchview_search); + this.searchview.on('search_data', self, this.do_searchview_search); return this.searchview.appendTo(this.$el.find(".oe_view_manager_view_search")); }, do_searchview_search: function(domains, contexts, groupbys) { diff --git a/addons/web/static/test/search.js b/addons/web/static/test/search.js index 7c6556da363..8034ece7e87 100644 --- a/addons/web/static/test/search.js +++ b/addons/web/static/test/search.js @@ -652,7 +652,7 @@ $(document).ready(function () { } }); var ds, cs, gs; - view.on('data_search', this, function (d, c, g) { + view.on('search_data', this, function (d, c, g) { ds = d, cs = c, gs = g; }); view.appendTo($fix) @@ -690,7 +690,7 @@ $(document).ready(function () { } }, {dummy: 42}); var ds, cs, gs; - view.on('data_search', this, function (d, c, g) { + view.on('search_data', this, function (d, c, g) { ds = d, cs = c, gs = g; }); view.appendTo($fix) @@ -718,7 +718,7 @@ $(document).ready(function () { } }, {dummy: 42}); var ds; - view.on('data_search', this, function (d) { ds = d; }); + view.on('search_data', this, function (d) { ds = d; }); view.appendTo($fix) .always(start) .fail(function (error) { ok(false, error.message); }) diff --git a/addons/web_hello/static/openerp/base_hello.js b/addons/web_hello/static/openerp/base_hello.js index 7bfbf7b78e8..0a22079aa53 100644 --- a/addons/web_hello/static/openerp/base_hello.js +++ b/addons/web_hello/static/openerp/base_hello.js @@ -7,7 +7,7 @@ openerp.web_hello = function(instance) { instance.web.SearchView = instance.web.SearchView.extend({ init:function() { this._super.apply(this,arguments); - this.on('data_search', this, function(){console.log('hello');}); + this.on('search_data', this, function(){console.log('hello');}); } });