Commit Graph

139 Commits

Author SHA1 Message Date
Xavier Morel 9bf9ca7a67 [FIX] list view to use View#load_view rather than its own implementation thereof
bzr revid: xmo@openerp.com-20121023085329-y01e1u77vfz2n7a9
2012-10-23 10:53:29 +02:00
Xavier Morel b5be361c55 [FIX] various listview issues
bzr revid: xmo@openerp.com-20121018150108-althdcxk3jc2bkun
2012-10-18 17:01:08 +02:00
Xavier Morel 4223b1e786 [IMP] add overridable dimension-setting method on form fields
bzr revid: xmo@openerp.com-20121018145712-am4y6bdnz2x14i2c
2012-10-18 16:57:12 +02:00
vta vta@openerp.com ae8efbed06 [FIX] Fixed on_loaded in editable list.
bzr revid: vta@openerp.com-20121018115451-vx4i66o75kld3io9
2012-10-18 13:54:51 +02:00
Xavier Morel 8e54c76845 [FIX] fetching of table cells to match form inputs to
Only fetch the table cells of the row being edited *after* having
saved a pending edition.

Otherwise, when re-editing the same record (e.g. click between buttons
or on a readonly field), the cells are saved, the record is refreshed
destroying the cells, and when trying to get the cell positions to
position form fields correctly... the cells which don't exist anymore
return 0, 0 as their position and nothing works correctly.

bzr revid: xmo@openerp.com-20121017134351-lpmz27f1iemmsfoq
2012-10-17 15:43:51 +02:00
niv-openerp 38582c8410 [FIX] Problem in editable list view: in sale orders, when we add a line in the order lines o2m then select a product, some strange numbers appear on the top left of the list view.
bzr revid: nicolas.vanhoren@openerp.com-20121015123856-j4sgaqtf3oexg6of
2012-10-15 14:38:56 +02:00
Vidhin Mehta (OpenERP) ffb5a9c802 [IMP]method name change.
bzr revid: vme@tinyerp.com-20121012083827-hq8xrnn333foyiu3
2012-10-12 14:08:27 +05:30
vta vta@openerp.com 40eceb20a3 [FIX] Fixed on_record_loaded.
bzr revid: vta@openerp.com-20121010100233-tulf3c1fvnt2s85e
2012-10-10 12:02:33 +02:00
Raphael Collet b339be1450 [MERGE] trunk-access-ui-jam (hide buttons or disable actions to create/edit/delete that are not permitted to user)
bzr revid: rco@openerp.com-20120905093859-oh1udej3kgyghudy
2012-09-05 11:38:59 +02:00
Raphael Collet 14e87c09f3 [IMP] rename method _is_action_enabled to is_action_enabled
bzr revid: rco@openerp.com-20120904141155-288vwhonbt07dfcs
2012-09-04 16:11:55 +02:00
Xavier Morel 1f1a0ef14b [IMP] cancel pending edition when hiding the list view, if editable
otherwise the edition disappears but part of the list view (e.g. buttons at the top) remain in the wrong state

bzr revid: xmo@openerp.com-20120904121823-kejzzquax2hdedoo
2012-09-04 14:18:23 +02:00
Xavier Morel b4e20f0c14 [IMP] use list.Column's parsed (and potentially altered) modifiers to generate the edition form view
This way, listview 'widgets' can alter the modifiers object and influence the corresponding form widget

bzr revid: xmo@openerp.com-20120904115627-v626hcb9o0s7bcrp
2012-09-04 13:56:27 +02:00
Xavier Morel fd40dcbeff [FIX] add minimum height to listview rows matching that of edition row fields
Also fix reset of border-radius: none is not a valid value for
border-radius, change to 0.

bzr revid: xmo@openerp.com-20120904101139-xyl0dskdk6dbdfe1
2012-09-04 12:11:39 +02:00
Raphael Collet 0304a1eada [MERGE] from trunk
bzr revid: jam@tinyerp.com-20120831045217-xoy25yc9ignfi94v
bzr revid: rco@openerp.com-20120831145305-4wf3sl8un59k61he
2012-08-31 16:53:05 +02:00
Antony Lesuisse b745a2038a [IMP] view_form remove used callback on do_save
bzr revid: al@openerp.com-20120829102300-0a1m4f237wbmqzv4
2012-08-29 12:23:00 +02:00
Jigar Amin - OpenERP 548672a2c3 merge lp:openerp-web
bzr revid: jam@tinyerp.com-20120827044256-engs2hibz5x5fnwh
2012-08-27 10:12:56 +05:30
niv-openerp 5e338c591a [IMP] made a whole-application replace of $element by $el
bzr revid: nicolas.vanhoren@openerp.com-20120824182707-vt91ef40ieeudwyw
2012-08-24 20:27:07 +02:00
Jigar Amin - OpenERP a02de882a2 [USA] Reomved the unxpected lines
bzr revid: jam@tinyerp.com-20120821071842-srbnqutwfia8m5cb
2012-08-21 12:48:42 +05:30
Jigar Amin - OpenERP 09f031cd99 [IMP] If edit = false and trww views Editable shoue not allow edit column instead redirect normal behaviour
bzr revid: jam@tinyerp.com-20120821071702-pknuv44poe1hvlfx
2012-08-21 12:47:02 +05:30
Fabien Pinckaers 3d48b3f877 [IMP] misc CSS improvements, mainly editable lists
bzr revid: fp@tinyerp.com-20120808193842-nxrk13vc8hv9wxlg
2012-08-08 21:38:42 +02:00
Xavier Morel 67518796c6 [ADD] editable flag on list views for fp
bzr revid: xmo@openerp.com-20120808104311-ajrne9fb9emtaoe6
2012-08-08 12:43:11 +02:00
Xavier Morel 741a1541da [FIX] action button on row being *created* in editable list view
Altered action button workflow:

* Action callback (passed to ``do_button_action``) now *takes* a
  record id instead of closing over it, in case the original list does
  not have an id to start with
* ``handle_button`` partially applies the id *it* got to the callback
  via ``_.bind``
* Editable list view override of ``do_button_action`` uses ``id`` it
  got from ``ensure_saved`` in case it got id=false in

bzr revid: xmo@openerp.com-20120807092317-wk0xyfzrhxc89t94
2012-08-07 11:23:17 +02:00
Xavier Morel d8e2bec158 [FIX] state of editor after cancelled cancel() (haha), handling of a record being edited during o2m deletion
bzr revid: xmo@openerp.com-20120806150002-45c8mjq9dk5hck7y
2012-08-06 17:00:02 +02:00
Fabien Meghazi 9c31ba65d9 [FIX] Fixed form's fields autofocus
bzr revid: fme@openerp.com-20120802124909-w4li8dt6y0kktnfh
2012-08-02 14:49:09 +02:00
Xavier Morel 84bf640e67 [IMP] when trying to focus the first visible field in the editable list view, ensure that we only stop when we actually manage to focus a field
bzr revid: xmo@openerp.com-20120802100020-kbmo1s5shjwaof69
2012-08-02 12:00:20 +02:00
Fabien Meghazi 1f1770ffb7 [IMP] Disable autofocus on editable lists
bzr revid: fme@openerp.com-20120802093917-3wc9qgek6e2mba5p
2012-08-02 11:39:17 +02:00
Antony Lesuisse 574f3891a5 [MERGE] trunk
bzr revid: al@openerp.com-20120801104657-cinfl0svpnc8njs5
2012-08-01 12:46:57 +02:00
Xavier Morel de1f6488a7 [CHG] there always is an editor in the editable listview, destroy just before creating the new one
bzr revid: xmo@openerp.com-20120726143320-4cdze45po1g581lu
2012-07-26 16:33:20 +02:00
Xavier Morel bf4c39cdf1 [FIX] arrow keys handling in editable listview field when field is not a text-based input
* Correctly handle HTMLInputElement#selectionStart throwing an error
  (checkbox and radio)

* Correctly handle elements without a selectionStart at all (select)

=> should ~always let the go-to-other-field behavior go through

bzr revid: xmo@openerp.com-20120726123819-74n1gl01p6befgkp
2012-07-26 14:38:19 +02:00
Xavier Morel 46a0370273 [IMP] avoid losing the exact value of tree/@editable when checking for editability status
bzr revid: xmo@openerp.com-20120724171419-czll83665nptk3n3
2012-07-24 19:14:19 +02:00
Xavier Morel 38cb3de518 [FIX] attempt to make editability handling more logical and simpler to manage.
Also less buggy, with a bit o' luck

bzr revid: xmo@openerp.com-20120724170550-150vimuk6bvzh8y8
2012-07-24 19:05:50 +02:00
Xavier Morel df05d2cd20 [ADD] focus previous/next field when using the left/right arrow while at the start/end of a field
bzr revid: xmo@openerp.com-20120724150112-r8liahdyaxmx49o8
2012-07-24 17:01:12 +02:00
Xavier Morel 35bb49701c [IMP] keep focus in the same column when navigating to the previous/next record with up/down arrows
bzr revid: xmo@openerp.com-20120724135655-hjk2l0mxvncker4q
2012-07-24 15:56:55 +02:00
Xavier Morel ac5dc58367 [IMP] focus the clicked field when starting a row edition by clicking on a cell
bzr revid: xmo@openerp.com-20120719095742-lps9xjsrvhn5fnlh
2012-07-19 11:57:42 +02:00
Xavier Morel 85a8641e2c [FIX] cancel edition when deleting a record, so we're not left with a phantom editor for the deleted record on top of an other row
bzr revid: xmo@openerp.com-20120718133115-8cn8wqf1ra8pjrnv
2012-07-18 15:31:15 +02:00
Xavier Morel 65ac59f42a [ADD] when tabbing from the last field in an edition row, go to next edition as if we'd hit [return]
extract common code for 'save current edition and move on to next edition' to a private method

bzr revid: xmo@openerp.com-20120718130751-g8htb78n54z1b9hv
2012-07-18 15:07:51 +02:00
Xavier Morel 0f054b57c1 [IMP] add ability to change row using up/down key while editing list
* Allow asserting state of record being edited (creating or modifying) through Editor#is_editing
* Improve setup_events to also dispatch keydown events

bzr revid: xmo@openerp.com-20120718124359-q0udajwbuhzpqjmi
2012-07-18 14:43:59 +02:00
Xavier Morel 71ede66dce [FIX] handling of @onwrite
extraction was broken: using _.bind/3 will partially apply the
function (first argument) on top of binding it to a context (second
argument), but the partial application will be from the *left* (which
is pretty much the only one making sense, short of kwargs).

handle_onwrite_record took its arguments the wrong way around: the
partially applied one was specified on the right and the "actually
applied" one was on the left, so it used the wrong argument and ended
up blowing up the rest of the code.

bzr revid: xmo@openerp.com-20120718101744-bbbshq60x2kqhob6
2012-07-18 12:17:44 +02:00
Xavier Morel 01e6e3ec07 [IMP] DOWNCASE ALL THE THINGS
apparently and contrary to what I remembered, we're still supposed to use underscore_separated method names, not camelCase

bzr revid: xmo@openerp.com-20120717132308-wvpldtprt33heee3
2012-07-17 15:23:08 +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 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 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 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 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 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
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
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