[IMP] apply current advanced search when pressing [Return] while altering the search
Wrap a form around the search and hook search commit on form submit, make the 'apply' button into a submit button bzr revid: xmo@openerp.com-20120403095615-r8x5ropf8odr7oxw
This commit is contained in:
parent
d4aa6b6fea
commit
4abfb09d32
|
@ -1280,7 +1280,8 @@ openerp.web.search.Advanced = openerp.web.search.Input.extend({
|
|||
self.$element.toggleClass('oe_opened');
|
||||
}).on('click', 'button.oe_add_condition', function () {
|
||||
self.append_proposition();
|
||||
}).on('click', 'button.oe_apply', function () {
|
||||
}).on('submit', 'form', function (e) {
|
||||
e.preventDefault();
|
||||
self.commit_search();
|
||||
});
|
||||
return $.when(
|
||||
|
|
|
@ -1397,13 +1397,13 @@
|
|||
</t>
|
||||
<div t-name="SearchView.advanced" class="oe_searchview_advanced">
|
||||
<h4>Advanced Search...</h4>
|
||||
<div>
|
||||
<form>
|
||||
<ul>
|
||||
|
||||
</ul>
|
||||
<button class="oe_add_condition">Add a condition</button>
|
||||
<button class="oe_apply">Apply</button>
|
||||
</div>
|
||||
<button class="oe_add_condition" type="button">Add a condition</button>
|
||||
<button class="oe_apply" type="submit">Apply</button>
|
||||
</form>
|
||||
</div>
|
||||
<t t-name="SearchView.extended_search.proposition">
|
||||
<li>
|
||||
|
|
Loading…
Reference in New Issue