Commit Graph
2947 Commits
Author SHA1 Message Date
Xavier Morel c3368bf2bb [FIX] use native DOM methods to programmatically set focus on an element
jQuery breaks the expected ordering of triggered consequential events
to a focusing (a blur event on the source field, a focus event on the
destination one), which in turn breaks the expectations of the
auto-saving o2m, making the o2m field attempt to auto-save immediately
after having saved a row (via the [Return] key) e.g. create a new row
in a list o2m, press [Return], the widget creates a new empty row and
immediately tries to save it resulting — depending on the view's setup
— in either an empty row being saved or a bunch of fields being marked
as invalid even though the user hasn't done anything yet.

Bypass jquery to avoid this issue.

jQuery tracker ref: http://bugs.jquery.com/ticket/12094

bzr revid: xmo@openerp.com-20120717130251-q2cjoj6rkxh0bvdq
2012-07-17 15:02:51 +02:00
Xavier Morel 75c2845fb5 [ADD] default_get support on new row creation
bzr revid: xmo@openerp.com-20120716110430-9uv352m46d3mn1bx
2012-07-16 13:04:30 +02:00
Xavier Morel 0c872cf469 [FIX] trailing comma in array literal creates a single undefined element in IE8
bzr revid: xmo@openerp.com-20120712120657-14j2izo6idppq5aq
2012-07-12 14:06:57 +02:00
Xavier Morel 0bccd9be59 [FIX] tests: update jquery link, fix broken searchview test following merge
bzr revid: xmo@openerp.com-20120712115552-7adsu941o3wjtrmr
2012-07-12 13:55:52 +02:00
Xavier Morel 35b5732bba [IMP] keep 'save row' button hidden in o2m list
bzr revid: xmo@openerp.com-20120711144327-gyhad79cmd730tb4
2012-07-11 16:43:27 +02:00
Xavier Morel 8812a84ba8 [FIX] don't let [Return] key hit in a text field bubble, or it validates editable list rows
bzr revid: xmo@openerp.com-20120711143213-ug1u98evn6nxhi5r
2012-07-11 16:32:13 +02:00
Xavier Morel ce11683e92 [FIX] re-enable delete button for o2m list items
bzr revid: xmo@openerp.com-20120711142604-9jw3kikvqje8reu6
2012-07-11 16:26:04 +02:00
Xavier Morel 16559cd6ae [ADD] discard 'link-ish' to editable list view
bzr revid: xmo@openerp.com-20120711142048-covvchmiscjlhji0
2012-07-11 16:20:48 +02:00
Xavier Morel 6b907bb4d0 [FIX] can't perform action on a o2m record which is not saved in db, so forbid it.
Also yet-another-shitty-undoc-change to the way widgets and form view communicate

bzr revid: xmo@openerp.com-20120711141402-1x7frd0v3vc3649e
2012-07-11 16:14:02 +02:00
Xavier Morel 9b570343a5 [FIX] handling of clicking on a row for a record being created (and not existing yet)
bzr revid: xmo@openerp.com-20120711131804-u8l2taeq2k1gc5v0
2012-07-11 15:18:04 +02:00
Xavier Morel cd02216c28 [FIX] selector for edit-on-click-on-empty-row
bzr revid: xmo@openerp.com-20120711122424-355c6ed4vnmrr69n
2012-07-11 14:24:24 +02:00
Xavier Morel e431cda2d3 [MERGE} from trunk
bzr revid: xmo@openerp.com-20120711112959-tcb9epdfc9frt6ux
2012-07-11 13:29:59 +02:00
Xavier Morel 3efc9c033a [ADD] create new record when clicking on an empty row
bzr revid: xmo@openerp.com-20120711111027-6vtyoxx17fw8dmvc
2012-07-11 13:10:27 +02:00
Xavier Morel c0e9d320f3 [ADD] one more styling hook for the exact type of the field rendered in the cell
bzr revid: xmo@openerp.com-20120711101740-8po45qujkny5gk6a
2012-07-11 12:17:40 +02:00
niv-openerp 9ca07da784 [IMP] made buttons in o2m red
bzr revid: nicolas.vanhoren@openerp.com-20120711081953-7vlui2plb4tk6p1n
2012-07-11 10:19:53 +02:00
Xavier Morel e0a62b4bed [FIX] modifiers handling in list view, add class for readonly fields
bzr revid: xmo@openerp.com-20120711081116-ao854p4ebsgyelp3
2012-07-11 10:11:16 +02:00
Xavier Morel 52723ef052 [FIX] monkey around keyboard handling to ensure we don't cancel a cancelled edition or any other such thing.
maybe the form should be explicitly blurred when saved/cancelled?

bzr revid: xmo@openerp.com-20120710143323-fye927s9k455mqls
2012-07-10 16:33:23 +02:00
Xavier Morel 46da3547ca [IMP] move saving a row from per-row buttons to a single global button replacing [Create]
bzr revid: xmo@openerp.com-20120710143228-mqfuaxw894x9khkc
2012-07-10 16:32:28 +02:00
Xavier Morel 5b6df7ebeb [ADD] Collection#pred as well, while we're at it
bzr revid: xmo@openerp.com-20120710131205-voi1nc5rkvewjr2f
2012-07-10 15:12:05 +02:00
Xavier Morel 079e90afbb [ADD] successor method to list collections, to safely get the "next" record in a nested (groupby) context
bzr revid: xmo@openerp.com-20120710123718-kiot6zzji07a4iao
2012-07-10 14:37:18 +02:00
Xavier Morel 611fc6cc4f [FIX] handling of resize event during edition so form fields don't get all fubar
bzr revid: xmo@openerp.com-20120710103557-584hsyats0fdzpo1
2012-07-10 12:35:57 +02:00
Fabien Pinckaers 78967f6a89 [merge] mit
bzr revid: fp@tinyerp.com-20120710101318-72l203bwgba4hkaq
2012-07-10 12:13:18 +02:00
Fabien Pinckaers cbc1ed31b3 [IMP] better form css
bzr revid: fp@tinyerp.com-20120710101205-y0im0xzehzw6jm9p
2012-07-10 12:12:05 +02:00
Fabien Meghazi 7880aa4beb [IMP] FormView: support for @style of fields
bzr revid: fme@openerp.com-20120710094431-tgsrrnkdyxlulkqt
2012-07-10 11:44:31 +02:00
niv-openerp 24a54675ee [FIX] problem with css classes of view managers
bzr revid: nicolas.vanhoren@openerp.com-20120710091821-qpc49vwq60k1xt3f
2012-07-10 11:18:21 +02:00
niv-openerp f078da8a52 [IMP] make the m2o a little more complex
bzr revid: nicolas.vanhoren@openerp.com-20120710085441-dt2kn4z5rk2482sy
2012-07-10 10:54:41 +02:00
Fabien Pinckaers 2e02a7ab0b [IMP] form css
bzr revid: fp@tinyerp.com-20120710075753-l922o72cghj9f0f3
2012-07-10 09:57:53 +02:00
Fabien Pinckaers 6917d464c9 [IMP] form layout
bzr revid: fp@tinyerp.com-20120710075054-ftlm3g69yrsgni1u
2012-07-10 09:50:54 +02:00
Fabien Pinckaers 597835db3c [IMP] form layout
bzr revid: fp@tinyerp.com-20120710074946-llxeomd8o5e83y9i
2012-07-10 09:49:46 +02:00
Xavier Morel 9568c463b3 [FIX] conflicts between save-on-blur and action buttons in o2m
bzr revid: xmo@openerp.com-20120710073928-riswpz7f9mddqjgf
2012-07-10 09:39:28 +02:00
Fabien Pinckaers fe368d23c8 [IMP] padding between groups in forms
bzr revid: fp@tinyerp.com-20120710073145-l0rmppe2d7mpterz
2012-07-10 09:31:45 +02:00
Minh Tran 3c67b48a2a Improvements to dropdown menu, form view buttons and kanban vignette
bzr revid: mit@openerp.com-20120709170807-f9x3v147bqamg7wd
2012-07-09 19:08:07 +02:00
Minh Tran d6100f371f Changed popup overlay and added style for label in kanban vignette
bzr revid: mit@openerp.com-20120709150257-t50t470tyxmomrt4
2012-07-09 17:02:57 +02:00
niv-openerp b79f9b5807 [FIX] small problem with m2o
bzr revid: nicolas.vanhoren@openerp.com-20120709115727-gtxyt4kzg9c7tqot
2012-07-09 13:57:27 +02:00
Xavier Morel 46e511d1f2 [FIX] o2m validation workflow for lists, to match new edition methods
bzr revid: xmo@openerp.com-20120709110426-w6v512ff5dskmr3x
2012-07-09 13:04:26 +02:00
Xavier Morel e9921d62df [FIX] ensures the o2m is correctly saved before activating action buttons, even when a row is being edited
bzr revid: xmo@openerp.com-20120709110112-dgpm1jhb9o2lmweg
2012-07-09 13:01:12 +02:00
Xavier Morel d51c9a8590 [FIX] double-include of ids in the dataset, and double-save in some cases ~/projects/tiny/web/current
on [change] of a listview record, if there was no id on the record
(id=false) we need to add one. But depending how the creation/addition
of the record was done, the id may already have been inserted e.g. by
the formview.

So first check if the record's id is already in the dataset, and add
it if it's not.

bzr revid: xmo@openerp.com-20120709092401-p1in6bvs5e2ptp5p
2012-07-09 11:24:01 +02:00
Xavier Morel 853c5a70c0 [ADD] 'false' id to newly created records, otherwise format_cell's button rendering blows up
also fix various bits of code looking for an absence of @data-id, so that they look for a false @data-id to match the row of the new record instead

bzr revid: xmo@openerp.com-20120709084652-rt1ffu2ea20scw53
2012-07-09 10:46:52 +02:00
Xavier Morel cd59881b05 [FIX] Editor is not restartable, so don't restart it.
Instead, create a new one at each on_loaded.

Editor is not restartable because the formview wedges itself if its on_loaded is called more than once

bzr revid: xmo@openerp.com-20120709080604-er1l6bn5eespue59
2012-07-09 10:06:04 +02:00
Fabien Pinckaers bd70fe652f merge
bzr revid: fp@openerp.com-20120707071654-bomheifq0v3e6e2k
2012-07-07 09:16:54 +02:00
Minh Tran 0267ed32bb Many improvements
bzr revid: mit@openerp.com-20120706164357-c6p6z3ytoqbhmjjn
2012-07-06 18:43:57 +02:00
Fabien Pinckaers f323d4209d [IMP] width of sheet in a variable
bzr revid: fp@tinyerp.com-20120706073030-dejwb1d37cmjm738
2012-07-06 09:30:30 +02:00
Xavier Morel ee20d56357 [FIX] Create new records as a bunch of empty (false) fields, otherwise Bad Things Happen ~/projects/tiny/web/current
namely, if the list view fields have e.g. attributes associated, the
computation of the domains blow up

also, always create an editor in the listview (if the editable
listview module has been installed), avoids blowing up 'safety' calls
to #ensureSaved. An alternative would be to fix #ensureSaved not to
blow up if there's no editor, but that means third parties which
*know* there may be an editor in the list view can't easily hook up to
it.

Things will have to change anyway as currently toggling a list view
from not-editable to editable after on_loaded has been called will not
work correctly (it won't start the editor), which is shitty.

bzr revid: xmo@openerp.com-20120705143721-4fiz64k7fka4052k
2012-07-05 16:37:21 +02:00
Fabien Pinckaers edf61ae586 [IMP] original width of minh mockup
bzr revid: fp@tinyerp.com-20120705134153-mxz87km72zos9idd
2012-07-05 15:41:53 +02:00
Fabien Pinckaers 8eac49ea96 [IMP] white background
bzr revid: fp@tinyerp.com-20120705132003-palqn02yh8gq6535
2012-07-05 15:20:03 +02:00
Xavier Morel d968398d15 [ADD] events tests
bzr revid: xmo@openerp.com-20120705124342-vm0pavyzqfuwa3k5
2012-07-05 14:43:42 +02:00
Minh Tran 9d908a38fa various improvements to design
bzr revid: mit@openerp.com-20120705115847-5oncw7ynqxs5m9ig
2012-07-05 13:58:47 +02:00
Fabien Pinckaers ba64b46618 [merge] trunk
bzr revid: fp@tinyerp.com-20120705123408-lzrzfw4kiq1e9zet
2012-07-05 14:34:08 +02:00
Fabien Pinckaers 4041c0568d mege
bzr revid: fp@tinyerp.com-20120705123259-okklz6m7nfziqaqf
2012-07-05 14:32:59 +02:00
Fabien Pinckaers 4ab4e1a739 [Merge] trunk
bzr revid: fp@tinyerp.com-20120705122259-zu2hm32a2wh1g6y0
2012-07-05 14:22:59 +02:00