Commit Graph

148 Commits

Author SHA1 Message Date
Xavier Morel d4a9e10308 [ADD] handling of reset button on searchview
bzr revid: xmo@openerp.com-20120503193110-aqmeo3dz94y49fg0
2012-05-03 21:31:10 +02:00
Xavier Morel 94624b74b0 [FIX] get_* methods on FilterGroup
bzr revid: xmo@openerp.com-20120503192645-8x63l5rnwz2vg2yp
2012-05-03 21:26:45 +02:00
Xavier Morel 64538c181e [FIX] domain and context generation on m2o fields
by default, an m2o field should behave like a charfield (== use its
textual value), but if the domain is fully default (no filter_domain
and no custom operator) and the user explicitly selected an object
(which is the only thing he can do at this point in the new search
view), then we can generate a domain matching exactly the stored id.

bzr revid: xmo@openerp.com-20120503163709-odlnib513h3f84v6
2012-05-03 18:37:09 +02:00
Xavier Morel 5c4ac52291 [FIX] typo: remember to instantiate objects
bzr revid: xmo@openerp.com-20120503155532-q2es166215yfgn7g
2012-05-03 17:55:32 +02:00
Xavier Morel aca54c9812 [REM] pointless overrides to value_from and make_domain
- selection does not need to override get_value/value_from
- neither does boolean, its selection values can be correctly set from the start
- m2o can only facet correct values, not fuzzy, so the make_domain override is not useful

bzr revid: xmo@openerp.com-20120503154751-w5pojni831xwu6bv
2012-05-03 17:47:51 +02:00
Xavier Morel 0c99ac1333 [FIX] domain and context generation from fields, also doc
bzr revid: xmo@openerp.com-20120503154311-4pg762pcgt83416c
2012-05-03 17:43:11 +02:00
Xavier Morel 6d12c155a4 [TEST] serialization of search domains & contexts by the search view
bzr revid: xmo@openerp.com-20120503125949-2m8euott3xzyivdm
2012-05-03 14:59:49 +02:00
Xavier Morel 836dfa6aa8 [IMP] move responsibility for facet removal (on click) to the facet's view, use Model#destroy for facet removal instead of a convoluted route through SearchView#query
bzr revid: xmo@openerp.com-20120503115608-7dwyj5j9mq82gv73
2012-05-03 13:56:08 +02:00
Xavier Morel 69af9da2c8 [IMP] change minLength condition to 1 for completion
0 allows opening a completion list with nothing, but that turns out not to be very useful and it interacts weirdly with tabbing between search inputs

bzr revid: xmo@openerp.com-20120503080723-i4u9vl91rhlfhmg8
2012-05-03 10:07:23 +02:00
Xavier Morel 23ef3f9b96 [ADD] correct focus of facets in input sequence, ability to remove facet via backspace/delete
bzr revid: xmo@openerp.com-20120502153439-0374v3dqz5fbe1ju
2012-05-02 17:34:39 +02:00
Xavier Morel f04eb6a29d [IMP] comments for event bindings
bzr revid: xmo@openerp.com-20120502151011-4j8t9wworl7frndh
2012-05-02 17:10:11 +02:00
Xavier Morel dce41d8aea [ADD] automatic selection of first completion item in the list
bzr revid: xmo@openerp.com-20120502150808-jpqiq63574ds2c1g
2012-05-02 17:08:08 +02:00
Xavier Morel f009c76598 [ADD] focus last input if the user clicks somewhere in the search view, outside of a search view control
bzr revid: xmo@openerp.com-20120502134312-0tuspwcmtlw5el3o
2012-05-02 15:43:12 +02:00
Xavier Morel a40e410d1a [ADD] correct handling of input blurring
bzr revid: xmo@openerp.com-20120502132743-dr29i2fvrpo6tute
2012-05-02 15:27:43 +02:00
Xavier Morel 25a30ad0ce [ADD] autocompletion correctly using input values
bzr revid: xmo@openerp.com-20120502131226-w4agkq7qq5ni8nwl
2012-05-02 15:12:26 +02:00
Xavier Morel a4918562a0 [ADD] selection/deselection of facets
bzr revid: xmo@openerp.com-20120430155912-c6tbyaqul6jc329u
2012-04-30 17:59:12 +02:00
Xavier Morel 7064a5b85e [FIX] filter name fallback if there is no string on the filter
bzr revid: xmo@openerp.com-20120430150613-ifvar5ncjtakzpki
2012-04-30 17:06:13 +02:00
Xavier Morel 8be95a5549 [ADD] facet removal
bzr revid: xmo@openerp.com-20120430150330-qdypxzwvrd4x4hkz
2012-04-30 17:03:30 +02:00
Xavier Morel b7626a59c3 [IMP] style search view/query
bzr revid: xmo@openerp.com-20120430143907-xqqyvtgazos70knw
2012-04-30 16:39:07 +02:00
Xavier Morel 24e104fcbe [IMP] alias backbone to ensure searchview doesn't care about POS stomping an old-as-shit backbone on top of the more recent one bundled with core
bzr revid: xmo@openerp.com-20120427154614-otxpbsc9lio9azko
2012-04-27 17:46:14 +02:00
Xavier Morel 7dd114798d [TEST] toggling of filters within a group
bzr revid: xmo@openerp.com-20120427153638-bkm6x2dfqf4tnjw9
2012-04-27 17:36:38 +02:00
Xavier Morel 1f0b1673e2 [TEST] rendering of drawer
bzr revid: xmo@openerp.com-20120427150436-3wxgyyp59l5vefr5
2012-04-27 17:04:36 +02:00
Xavier Morel 661eddb330 [REF] extract building of a facet descriptor from m2o/selection pairs into a function
bzr revid: xmo@openerp.com-20120427083024-zqq9hs203uaywlbr
2012-04-27 10:30:24 +02:00
Xavier Morel 8f5a591ab0 [TESTS] completion call on various widgets, fixed corresponding implementations
bzr revid: xmo@openerp.com-20120427080607-1bw1jpmu7h6zxdin
2012-04-27 10:06:07 +02:00
Xavier Morel 19e771dd9f [IMP] remove redundancy in creating a facet from a default value in m2o fields
bzr revid: xmo@openerp.com-20120426141033-5blb5ifdfnzeea03
2012-04-26 16:10:33 +02:00
Xavier Morel 6d02c640bf [TEST] defaults handling for selection & m2o fields, fix bugs in them
bzr revid: xmo@openerp.com-20120426135817-wesh3nkytuieilky
2012-04-26 15:58:17 +02:00
Xavier Morel eb989f68a8 [TEST] behavior when selecting a given completion, fix handler
bzr revid: xmo@openerp.com-20120426121210-012l0doboktnic8s
2012-04-26 14:12:10 +02:00
Xavier Morel 2591fa5e1e [FIX] missing state propagation in searchview initialization, test defaults calling on fields
bzr revid: xmo@openerp.com-20120426102949-xtv3inug3sue0h6a
2012-04-26 12:29:49 +02:00
Xavier Morel 595eec05a6 [FIX] make SearchQuery#add(Array) work correctly (fixing #reset at the same time)
bzr revid: xmo@openerp.com-20120424123824-x3nsecztz9gsiar4
2012-04-24 14:38:24 +02:00
Xavier Morel 9046ab46fa [WIP] VS-less search view: remove visualsearch, start building coherent model backing to the view
bzr revid: xmo@openerp.com-20120424105941-x8dvot5mjruvxcho
2012-04-24 12:59:41 +02:00
niv-openerp 0a78144741 [fix] problem in search view, seems like a typo
bzr revid: nicolas.vanhoren@openerp.com-20120418131202-uxbwgb4if01t3pzo
2012-04-18 15:12:02 +02:00
niv-openerp 827964936f [imp] refactored search.js
bzr revid: nicolas.vanhoren@openerp.com-20120417120210-kejvstgamtpufbeq
2012-04-17 14:02:10 +02:00
Xavier Morel dbc5bde43d [FIX] hack around double-search: prevent loading of defaults in search view from triggering a search
which requires manually requesting a facets repaint, as that hinges on the query's events

bzr revid: xmo@openerp.com-20120410072434-nsjb97cc32rxb9ju
2012-04-10 09:24:34 +02:00
Antony Lesuisse 7b158acee5 core refactoring, split core into corelib.js and coresetup.js
bzr revid: al@openerp.com-20120409003901-uo5wn6lj27yb6w7x
2012-04-09 02:39:01 +02:00
Xavier Morel 4b2e41c665 [FIX] start selection of first field in advanced search
Picking very first field of the sequence is completely broken as it
might very well be non-searchable, and not even displayed in the
options list.

Changed to simply call changed() at the end of the initialization
code, this goes through all the supposedly correct code pathways
without having to duplicate fields filtering (which is also done while
rendering the view)

bzr revid: xmo@openerp.com-20120406140520-rvol79gmf4yv97tx
2012-04-06 16:05:20 +02:00
Xavier Morel 233a72f850 [IMP] rename 'q' category of advanced filters to 'Advanced'
bzr revid: xmo@openerp.com-20120406115141-6qwitdq993a5h4lw
2012-04-06 13:51:41 +02:00
Xavier Morel bbd702c9cf [IMP] rename q filter category to Filter (temp)
bzr revid: xmo@openerp.com-20120406115026-tb7vqvkbwmp9odqr
2012-04-06 13:50:26 +02:00
Xavier Morel dee501948e [IMP] quick change (to better fix when facets are re-done): make all facets read-only
rco review feedback for essential fixes

bzr revid: xmo@openerp.com-20120406114633-mp0ws7n3d2cokddd
2012-04-06 13:46:33 +02:00
Xavier Morel 30ba123a1f [IMP] partially fix group_by handling
* Don't just use the domain out of a FilterGroup as group_by keys in filters will overwrite one another
* Add dedicated get_groupby API returning an array of groups to evaluate

limitation: can't intersperse groupby from a different FilterGroup, that'll have to be fixed by ungrouping buttons

bzr revid: xmo@openerp.com-20120403120742-o3liksqaigsnxvb4
2012-04-03 14:07:42 +02:00
Xavier Morel 71c98a510b [REM] unused instance variable of searchview.Advanced
bzr revid: xmo@openerp.com-20120403095716-rjxnc8zafxup8os1
2012-04-03 11:57:16 +02:00
Xavier Morel 4abfb09d32 [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
2012-04-03 11:56:15 +02:00
Xavier Morel d4aa6b6fea [IMP] close drawer when creating an advanced search view
bzr revid: xmo@openerp.com-20120403095303-1tu2p0novxaof0ph
2012-04-03 11:53:03 +02:00
Xavier Morel 7f80cd83fc [IMP] don't trigger three searches when creating an advanced search with three conditions
bzr revid: xmo@openerp.com-20120403095146-26emkw284lxrahwk
2012-04-03 11:51:46 +02:00
Xavier Morel ac5eed3c6c [ADD] completion and values fetching for Date and Datetime fields, based on datejs's fuzzy date-ish parsing
bzr revid: xmo@openerp.com-20120403090807-6ct56fqkd1a6jcg1
2012-04-03 11:08:07 +02:00
Xavier Morel 81732f3ad0 [FIX] keyboard handling around read-only facets
bzr revid: xmo@openerp.com-20120403073946-4zq4vmods3ot77ot
2012-04-03 09:39:46 +02:00
Xavier Morel 846349bbe1 [IMP] make advanced search criterion look very slighly less bad
bzr revid: xmo@openerp.com-20120402123200-gp808tru9rdtkyy9
2012-04-02 14:32:00 +02:00
Xavier Morel 1cf64f448f [IMP] slightly improve label of advanced search (still not very good)
bzr revid: xmo@openerp.com-20120402114459-1oa6v66uce4cpl0t
2012-04-02 13:44:59 +02:00
Xavier Morel 93e70362e5 [ADD] groundworks for advanced search
* Possible to add an advanced search domain
* Looks like shit
* The facet itself uses a hardcoded name
* Quite a few hacks

bzr revid: xmo@openerp.com-20120330154227-gw1640rbb3rs9x5m
2012-03-30 17:42:27 +02:00
Xavier Morel 1b0c140834 [MERGE] from trunk
bzr revid: xmo@openerp.com-20120329110300-z4l730o4y4swmadx
2012-03-29 13:03:00 +02:00
Xavier Morel 6ecd85d826 [FIX] todo note and stray quotes in doc
bzr revid: xmo@openerp.com-20120329094824-w0tviwz4pe85e0k1
2012-03-29 11:48:24 +02:00