[FIX] force renderFacets on VS search event
originally this comes from the (monkeypatch-removed) serialization and reloading of the VS searchQuery. This is needed because on ``SearchFacet#remove`` VS launches a ``searchEvent``, and counts on *that* to visually impact the removal of a given facet (by just re-rendering everything) bzr revid: xmo@openerp.com-20120320153634-rhguje7to3f0dj2p
This commit is contained in:
parent
7229320dc4
commit
fc9b3ecf20
|
@ -42,10 +42,11 @@ if (SearchBox_renderSearchInput.toString() !== VS.ui.SearchBox.prototype.renderS
|
|||
}
|
||||
var SearchBox_searchEvent = function (e) {
|
||||
var query = this.value();
|
||||
this.renderFacets();
|
||||
this.app.options.callbacks.search(query, this.app.searchQuery);
|
||||
};
|
||||
if (SearchBox_searchEvent.toString() !== VS.ui.SearchBox.prototype.searchEvent.toString().replace(
|
||||
/this\.focusSearch\(e\);\n[ ]{4}this\.value\(query\);\n[ ]{4}/, '')) {
|
||||
/this\.focusSearch\(e\);\n[ ]{4}this\.value\(query\)/, 'this.renderFacets()')) {
|
||||
throw new Error(
|
||||
"Trying to replace wrong version of VS.ui.SearchBox#searchEvent. "
|
||||
+ "Please fix replacement.");
|
||||
|
|
|
@ -99,7 +99,7 @@ Finally, :js:func:`VS.ui.SearchBox.searchEvent` is monkey-patched to
|
|||
get rid of its serialize/load round-tripping of facet data: the
|
||||
additional attributes needed by the search view don't round-trip (at
|
||||
all) so VisualSearch must not load any data from its (fairly
|
||||
simplistic) text-serialization format
|
||||
simplistic) text-serialization format.
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
Loading…
Reference in New Issue