Commit Graph

306 Commits

Author SHA1 Message Date
niv-openerp 42e493e73e Added Gruntfile with jshint and corrected most js errors
bzr revid: nicolas.vanhoren@openerp.com-20130725100749-0i82gf3k3nvt4r44
2013-07-25 12:07:49 +02:00
Olivier Dony cf9d7aaa5f [MERGE] Forward-port of latest bugfixes from 7.0 up to rev 4007 (launchpad_translations_on_behalf_of_openerp-20130730045810-58du4wi80axs0t81)
bzr revid: dle@openerp.com-20130627115936-iw2x6yjejabkc8ys
bzr revid: chs@openerp.com-20130702141958-zxkppo4c6zvpo0uf
bzr revid: odo@openerp.com-20130731072914-0uk62hnao5x502hh
2013-07-31 09:29:14 +02:00
Xavier Morel a3b9994a3e [FIX] correctly escape labels in search view completion
lp bug: https://launchpad.net/bugs/1191699 fixed

bzr revid: xmo@openerp.com-20130618111059-v7tx4kpzv72c9pz0
2013-06-18 13:10:59 +02:00
Christophe Simonis 6263673720 [MERGE] forward port of branch 7.0 up to revid 3973 chs@openerp.com-20130611145028-f98x6inytlr3ijjg
bzr revid: chs@openerp.com-20130611155251-zk0qkk70z30n81vl
2013-06-11 17:52:51 +02:00
Xavier Morel d72773015e [IMP] close search autocompletion list while completing
Looks slightly worse as results don't seamlessly update in-place, but
limits/avoids the risk of quick-typing, hitting [Return] and getting
an incomplete/incorrect query because the completion didn't catch up
(e.g. slow network) and [Return] validated the previously retrieved
completion.

lp bug: https://launchpad.net/bugs/1183746 fixed

bzr revid: xmo@openerp.com-20130605144949-jbzs2hppr6c1djg3
2013-06-05 16:49:49 +02:00
Xavier Morel bdcb553128 [FIX] MSIE9 issue where complete.previous would be '' instead of undefined
bzr revid: xmo@openerp.com-20130605105227-6e5a6ckxshk8uwkg
2013-06-05 12:52:27 +02:00
Xavier Morel 431e0761c0 [FIX] assertion errors in search view when selecting all of a search input's content
Force normalization of the input's root node, Firefox tends to spawn
multiple text node children then create selection ranges over all of
them and worse.

lp bug: https://launchpad.net/bugs/1169945 fixed

bzr revid: xmo@openerp.com-20130604150551-0m0b48aifg9favz8
2013-06-04 17:05:51 +02:00
Anael Closson 9db02eae90 [FIX] typo & imp
bzr revid: acl@openerp.com-20130507152103-0gm36pnuc4pp6wet
2013-05-07 17:21:03 +02:00
Anael Closson 74dcc49bd8 [FIX] OPW 590091 : not searchable functional fields aren't removed from advanced search
bzr revid: acl@openerp.com-20130507092734-zmmm0g5c1t8va1dl
2013-05-07 11:27:34 +02:00
Olivier Dony ba5710962e [MERGE] Forward-port of 7.0 bugfixes, up to rev. 3912
revision-id: nicolas.vanhoren@openerp.com-20130430094843-9m1629m517vjtm1o

bzr revid: xmo@openerp.com-20130424102025-w33zyopm96r7q09p
bzr revid: odo@openerp.com-20130430103337-i9wuj8zf3h41h1ay
2013-04-30 12:33:37 +02:00
Olivier Dony 35d61bbd8b [FIX] web search: correct previous fix to properly handle searching for 0 on number fields
Also removed useless HTML escaping and added basic tests.

bzr revid: odo@openerp.com-20130328153502-v71q2m60wh37ganq
2013-03-28 16:35:02 +01:00
Olivier Dony 300d5be0e6 [FIX] web: int/float fields were not offering auto-completion in search views, making them un-searchable except via advanced search
Added the missing complete() function and removed the incorrect
value_from() override that seemed to be a leftover remnant
of the 6.1 search field implementation of get_value(), wrongly
renamed for 7.0.

bzr revid: odo@openerp.com-20130328120337-lao4o9i0owsbpysi
2013-03-28 13:03:37 +01:00
chirag patel 4f8f192df0 [FIX] Fixed autocomplete of search view hide behind overlay.
bzr revid: cpa@tinyerp.com-20130328063346-1aib1n3on9pdr81u
2013-03-28 12:03:46 +05:30
Xavier Morel 03330ea230 [FIX] minor presentational offset issue
missed mis-handling of oe_selected in xmo@openerp.com-20130321155123-211iht7c6zme712e

bzr revid: xmo@openerp.com-20130322103606-60ayhrsn5gmgyu2h
2013-03-22 11:36:06 +01:00
Xavier Morel 3c5d38918b [FIX] filter preceded by an invisible filter in the same group
On click on a filter in the drawer, FilterGroup would just match the
offset of the filter in the group's DOM with an index in the internal
#filters array. 

This worked until invisible fields, and then again only for filters
*preceded* by an invisible sibling in the same group: invisible
filters are not rendered in the DOM, so the indexes would get out of
sync.

Fix by using explicit indexes stored in a filter's @data-index and
using that to get the filter object/node.

An alternative fix (but hackier I think): instead of not rendering
invisible filters, render them with display: none. Remains an option
in the future if needed...

lp bug: https://launchpad.net/bugs/1157125 fixed

bzr revid: xmo@openerp.com-20130321155123-211iht7c6zme712e
2013-03-21 16:51:23 +01:00
niv-openerp 185b405b96 [MERGE] 7.0 branch
bzr revid: nicolas.vanhoren@openerp.com-20130319102859-rj9r9ngqtf5ep3a3
2013-03-19 11:28:59 +01:00
niv-openerp a6a8d71a0e [FIX] calls to fields_view_get do not pass the correct context, fails in o2m
lp bug: https://launchpad.net/bugs/1091204 fixed

bzr revid: nicolas.vanhoren@openerp.com-20130318174503-7xp04ccghdbqfvrl
2013-03-18 18:45:03 +01:00
Xavier Morel 1899141b38 [FIX] groupby groups fetching of their ancestor searchview
Implementation of invisibles in search view altered handling of search
inputs: their parent may not be the searchview anymore (usually is a
instance.web.search.Group). GroupbyGroup assumed parent was view and
was actually unused until
xmo@openerp.com-20130307124222-1ypzfopbktxmad4z, which exposed the
incorrect underlying assumption.

Make GroupbyGroup access its view when it wants its view, not its
parent.

bzr revid: xmo@openerp.com-20130312092824-z7sh4h3ityo4g00v
2013-03-12 10:28:24 +01:00
Xavier Morel 617c03a19c [FIX] broken inference of groupby groups in search view filters
Before the valpocalypse, filter contexts were "literal" (parsed
objects) when reaching the search view, and `.attrs.context.group_by`
would return the right thing (namely the group_by attribute of the
context object).

After the valpocalypse, contexts & domains on view fields (and
filters) are not evaluated on the Python side anymore and reach view
objects as strings, the access chain above thus always returns a falsy
value (undefined) as strings don't have a .group_by.

Fix FilterGroup to correctly parse filter's @context before trying to
see if it has a group_by.

lp bug: https://launchpad.net/bugs/1116432 fixed

bzr revid: xmo@openerp.com-20130307124222-1ypzfopbktxmad4z
2013-03-07 13:42:22 +01:00
Xavier Morel 71ec2c9439 [FIX] search view field visible through dropdown menu
xmo@openerp.com-20130305093619-s1e5fbl80r7qnk5l added zIndex on wrong
element of search view (view itself instead of just the autocompletion
drop-down) leading to the search view text field being visible over
the "more" section of the menu.

Move zIndex setting to the right place (on the missing
`autocomplete('widget')` indirection, and on open as jquery ui
autocomplete apparently decides to reset the dropdown's z-index each
time it is open)

bzr revid: xmo@openerp.com-20130306110051-1wfhxaylsn71skjp
2013-03-06 12:00:51 +01:00
Xavier Morel 25baf23e23 [FIX] stacking of various "drop-down" elements
The search view's completion list should be in front of the search
view's drawer, which itself should (probably) be on top of the graph
view's "action" dropdown.

The graph view's dropdown itself needs a z-index > 0 to be in front of
the graph itself, otherwise it is inactive and unusable: it's visible
through the graph but not activable.

bzr revid: xmo@openerp.com-20130305093619-s1e5fbl80r7qnk5l
2013-03-05 10:36:19 +01:00
Xavier Morel b921444d6f [FIX] implement forgotten @invisible handling on search view fields
bzr revid: xmo@openerp.com-20130304152047-8xaczg9qdx6ug2p1
2013-03-04 16:20:47 +01:00
Xavier Morel d46c61d784 [FIX] don't store user context properties into custom filter @context
This leads to any subsequent view overwriting the current user's lang
or timezone with the one active when the filter was created,
generating dismay and discontent (e.g. part of the user interface
switching from spanish to english or english to german, depending on
the respective settings of the current user and the filter creator —
at time of filter creation).

bzr revid: xmo@openerp.com-20130304101414-mm6ai1dkltd7ard5
2013-03-04 11:14:14 +01:00
Xavier Morel 6803c0048f [IMP] add view's context to m2o completion name_search
bzr revid: xmo@openerp.com-20130225165236-386r8438h4vz6fav
2013-02-25 17:52:36 +01:00
Xavier Morel ece114024f [ADD] @domains handling to searchview m2o field during completion
bzr revid: xmo@openerp.com-20130225164255-y3qkcjozr7rbtz1v
2013-02-25 17:42:55 +01:00
Xavier Morel 94c2c42be6 [MERGE] from 7.0
bzr revid: xmo@openerp.com-20130313094909-u21ee88l2lak9p2x
2013-03-13 10:49:09 +01:00
niv-openerp d04d532201 [MERGE] some others fixes from 7.0
bzr revid: nicolas.vanhoren@openerp.com-20130227141209-kemu3v78npynip87
bzr revid: nicolas.vanhoren@openerp.com-20130227142021-oc8i22kpfgmgv9jh
2013-02-27 15:20:21 +01:00
Thibault Delavallée 5e09c5c361 [FWD] [MERGE] Foward port of web-7.0 until rev 3771.
bzr revid: tde@openerp.com-20130221110355-p00935eqn4tstkx9
2013-02-21 12:03:55 +01:00
Fabien Meghazi f20c884cf5 [IMP] Custom filters: restore checkboxes and make them exclusive
bzr revid: fme@openerp.com-20130220163306-14xwsgvu8rw2ciny
2013-02-20 17:33:06 +01:00
Xavier Morel e00db293d1 [IMP] move domain section and label to ExtendedSearchProposition.Field
Simplifies and linearizes control flow

bzr revid: xmo@openerp.com-20130214142952-e59q9aoz4ngx9iwb
2013-02-14 15:29:52 +01:00
Xavier Morel fcf4f4443c [FIX] wrong object accessed leading to incorrect show/hide of things
bzr revid: xmo@openerp.com-20130214142545-lbog33w0bzpn354q
2013-02-14 15:25:45 +01:00
Xavier Morel 195fef053e [ADD] re-introduce 'is set' and 'is not set' operators which were added to 6.1 but never ported to 7.0
lp bug: https://launchpad.net/bugs/1013528 fixed

bzr revid: xmo@openerp.com-20130214140637-rk46j7csu0i4an31
2013-02-14 15:06:37 +01:00
Xavier Morel ab816b74fb [FIX] correctly handle invisible or empty groups in total filters count computation
bzr revid: xmo@openerp.com-20130214075906-kg83zi0pan61au1d
2013-02-14 08:59:06 +01:00
Xavier Morel 9852c6ff1e [FIX] missing support for invisible fields and groups in new search view
lp bug: https://launchpad.net/bugs/1122183 fixed

bzr revid: xmo@openerp.com-20130214074302-rwm2hcmv9mpvp9dv
2013-02-14 08:43:02 +01:00
Xavier Morel 2d87d908e2 [IMP] do not add empty filter groups to the drawer columns
bzr revid: xmo@openerp.com-20130213125606-ykbb2kg9wvfbs2ho
2013-02-13 13:56:06 +01:00
Xavier Morel dfb7493034 [FIX] add support for invisibility to fields (don't complete an invisible field)
bzr revid: xmo@openerp.com-20130213090108-h38emnwscgb5v1pu
2013-02-13 10:01:08 +01:00
Xavier Morel 0ad34228e2 [FIX] small issue with adding an attribute called 'id' to a backbone model
triggers backbone's thinking that the model is 'not new' and trying to sync it with a remote on e.g. removal

bzr revid: xmo@openerp.com-20130131135125-1x7czib7q0kafok8
2013-01-31 14:51:25 +01:00
Xavier Morel 69171aa805 [CHG] allow deselecting a custom filter by clicking on it again in the drawer
as asked in project.task:4837:

> Cannot uncheck a custom filter by clicking on it (it's possible on
> classic filters)

bzr revid: xmo@openerp.com-20130131112617-8vul65bb4lbfbfvk
2013-01-31 12:26:17 +01:00
Olivier Dony 02a6c638a9 [MERGE] Latest bugfixes from 7.0, up to rev 3731
rev 3731 = revision-id: fme@openerp.com-20130129142638-81uffjq3aiopr8ta

bzr revid: odo@openerp.com-20130129163725-feesf1n2xf0wbpro
2013-01-29 17:37:25 +01:00
Xavier Morel 8192977f3c [IMP] add confirmation message when removing a global custom filter
lp bug: https://launchpad.net/bugs/1103410 fixed

bzr revid: xmo@openerp.com-20130123105320-pbmeqoudpb48s87m
2013-01-23 11:53:20 +01:00
Xavier Morel d5ab8a4241 [IMP] IE9 supports window.getSelection
remove IE <9 usage of document.selection as we don't support these browsers anyway

bzr revid: xmo@openerp.com-20130123092946-wgtvfz3493l7p7cw
2013-01-23 10:29:46 +01:00
Xavier Morel 01ee5f60ee [FIX] pasting HTML content into the text box, then trying to navigate/alter it
Navigation implementation can only deal with straight text (and
asserts that), if HTML is pasted in a search input
InputView#getSelection will throw errors and refuse to act.

Clean up input content after a paste event, to ensure only plain text
is present so it can be navigated.

Don't forget to correctly re-set the cursor at the end of the input
data, otherwise the user will face various deep DOM errors when trying
to move around the input with the arrow keys (which he would usually
be able to do after a paste).

lp bug: https://launchpad.net/bugs/1102237 fixed

bzr revid: xmo@openerp.com-20130123091600-nd4rwqpin6qj8ult
2013-01-23 10:16:00 +01:00
Xavier Morel e5ad5f8e10 [FIX] move filter added at xmo@openerp.com-20130122135139-s3ui9hb44xd7afba to after map
If the filter is executed first, the "iteratee" is transformed to an
array (from an object) and the "key" is lost, replaced by the indices
to the array (and thus the name of the fields end up as "0", "1", "2",
... instead of their actual logical names)

bzr revid: xmo@openerp.com-20130123084422-tbl05l5j72sx528n
2013-01-23 09:44:22 +01:00
Xavier Morel f0e8441130 [FIX] correctly pass context to fields_get of advanced search so fields are correctly translated & localized
bzr revid: xmo@openerp.com-20130122141657-sabov4ht6xp3so1a
2013-01-22 15:16:57 +01:00
Bhumi Thakkar (Open ERP) 85579d5022 [FIX] Advanced search does not support local language.--fixes:lp1099833
bzr revid: bth@tinyerp.com-20130122121332-9iw75g5ddunzam58
2013-01-22 17:43:32 +05:30
Bhumi Thakkar (Open ERP) 71b2aecf50 [FIX] Add filter for deprecated in ExtendedSearchProposition.
bzr revid: bth@tinyerp.com-20130122102857-86sbqqvlldxb2zhc
2013-01-22 15:58:57 +05:30
Fabien Meghazi 8afb54980a [MERGE] Forward-port of latest 7.0 changes, (revision 3701)
bzr revid: odo@openerp.com-20130114103535-43fmqnzg9bh8ptpj
bzr revid: fme@openerp.com-20130114140243-ea81b61n1jhehj5o
2013-01-14 15:02:43 +01:00
Fabien Meghazi 31237c0b58 [ADD] Backward compatibility layer for 7.0
bzr revid: fme@openerp.com-20130114135145-z51tp204vybz0dr3
2013-01-14 14:51:45 +01:00
Fabien Meghazi 8c1f9dc490 [FIX] Fix one custom filter bug (only scratch the surface of this problem)
bzr revid: fme@openerp.com-20130114093014-5sv1sfk5u2uemwlr
2013-01-14 10:30:14 +01:00
niv-openerp 906ceba948 [IMP] lot of small improvements to better detect when a view has finished loading
bzr revid: nicolas.vanhoren@openerp.com-20121213140914-8d1u01h17r2x4fpu
2012-12-13 15:09:14 +01:00