Commit Graph

72 Commits

Author SHA1 Message Date
Xavier Morel d6a9d86e09 [FIX] change event handling for 'new' records (records w/o an id yet)
bzr revid: xmo@openerp.com-20120702111026-twmh5gbg4i1fd4kj
2012-07-02 13:10:26 +02:00
Xavier Morel c262b2d1ae [FIX] shallow-copy info passed into Editor#edit to avoid mutating an object owned by somebody else
bzr revid: xmo@openerp.com-20120702110733-0qp0ki3hbw5b2nd3
2012-07-02 13:07:33 +02:00
Xavier Morel d1eeaaa51e [FIX] better filtering of id-less rows being selected in a ListView.List body
bzr revid: xmo@openerp.com-20120702110658-7t8pu12uso55enrh
2012-07-02 13:06:58 +02:00
Xavier Morel 3cc825994b [TODO] add todo note
bzr revid: xmo@openerp.com-20120702110607-csi1oa4hm6lxtwat
2012-07-02 13:06:07 +02:00
Xavier Morel ac2895fd62 [IMP] don't handle keypresses at the editor level, do that in the view instead
maybe the editor could do it and trigger an event of its own for the view to handle?

bzr revid: xmo@openerp.com-20120702093113-berlms96fqzfjlyg
2012-07-02 11:31:13 +02:00
Xavier Morel f83684265d [FIX] make edition of existing records kinda-sorta work (if the record is 'saved' by clicking on an other one)
bzr revid: xmo@openerp.com-20120628141403-z8kdg24xy5thmg50
2012-06-28 16:14:03 +02:00
Xavier Morel cbba19da67 [IMP] automatically focus first field of edited row
bzr revid: xmo@openerp.com-20120628084547-6fo7fkiy2gh2wb6m
2012-06-28 10:45:47 +02:00
Xavier Morel 94f6eec2ab [BREAK] editable list view
* Introduce overlay form on row edition
* Broken save
* Broken cancel
* (probably) broken o2m
* Broken create

bzr revid: xmo@openerp.com-20120627143228-qku9ku3zo6k59r0f
2012-06-27 16:32:28 +02:00
Xavier Morel 92431bf895 [FIX] usage of retarded API
bzr revid: xmo@openerp.com-20120625145103-bgbll0d9bcco0ikp
2012-06-25 16:51:03 +02:00
Xavier Morel 54a8f9e193 [MERGE] 6.1 changes and trunk
bzr revid: xmo@openerp.com-20120625135215-az1927llmk0vw655
2012-06-25 15:52:15 +02:00
Xavier Morel 3e2cab2aad [FIX] handling of [Return] key to save records being edited in MSIE
* DOM events sequence screwed up, requiring an explicit blur on the
  current target to try and ensure the corresponding form widget would
  register its own change event
* Requirement to stop the default behavior of keypress and keydown on
  [Return] as they would somehow trigger the contextual menu of m2o
  fields on the row, at the wrong place, when in a char field (I don't
  even...)
* Delaying of the actual saving of the form (via `setTimeout`) to try
  and ensure the blur/change event has had the time to propagate
  correctly (and be handled) before we actually save

bzr revid: xmo@openerp.com-20120615055440-yn00uv4q8y29nboq
2012-06-15 07:54:40 +02:00
Xavier Morel acfff868cb [IMP] return deferred from ListView#render_row_as_form indicating *when* the row has been rendered as a form
bzr revid: xmo@openerp.com-20120614123130-1z1vvt62rnr21bpz
2012-06-14 14:31:30 +02:00
Xavier Morel 83eef22856 [FIX] don't break the handling of record index 0 in editable list views: index 0 means something different than index = null
bzr revid: xmo@openerp.com-20120614085009-xuo1ifu2vnlcic72
2012-06-14 10:50:09 +02:00
Xavier Morel 49f6ab9853 [FIX] do not break dataset index (at the wrong moment) when clicking on [Create] row
dataset.index was previously set to ``null`` in handler of [Create]
button (to fullfill contract with form view that dataset.index should
be ``null`` to indicate the creation of a new record with no id).

Issue: after setting the index to ``null``, the list view calls
``render_row_as_form`` which starts out trying to save a row being
edited (case: clicking of the [Create] button after having selected a
row for edition or after having written in a new record e.g. [Create]
-> type -> [Create] type -> ...). This tentative to save the existing
form would be performed in the context of a ``null`` dataset.index,
which the form view doesn't (and shouldn't, index should be that of
record *being edited*) expect.

-> first save in whatever dataset state is the current one, and *right
before* creating the new form (after having saved and/or discarded the
previous one) we have the id of the new record to edit (or ``null``),
find the index for *that* and set ``dataset.index`` to that (or
``null``) so the new form view can be created and opened in the right
context.

bzr revid: xmo@openerp.com-20120613153842-pd6xitjs8n003ogs
2012-06-13 17:38:42 +02:00
Xavier Morel 9f9bbcff33 [FIX] in ensure_saved, discard non-dirty editable rows
if the editable row's form isn't dirty, either nothing has been
entered in a new row or an existing row (being edited) has not been
altered, so can just discard the row (and reload it from cache if it's
an edition).

bzr revid: xmo@openerp.com-20120613153633-ms7i8t9lvdarxqi3
2012-06-13 17:36:33 +02:00
Xavier Morel 632a4dee0c [FIX] correctly forward arguments in _super() call of editable listview's form widgets override
bzr revid: xmo@openerp.com-20120613094037-3iny9dsdhmp7qspi
2012-06-13 11:40:37 +02:00
Xavier Morel 0240ab1682 [CHG] try saving any row under edition when starting an (other) row edition
editable lists should not lose data unless explicitly asked to forget about it by user action

bzr revid: xmo@openerp.com-20120612150820-z97jxme1vcu3x3jd
2012-06-12 17:08:20 +02:00
Xavier Morel eb83b58e32 [IMP] Deferred usage in editable listview
bzr revid: xmo@openerp.com-20120612150708-0z5dsclcrtj29st3
2012-06-12 17:07:08 +02:00
niv-openerp c7e32e7175 [FIX] Problem with SelectCreatePopup, the list view can sometimes be editable
lp bug: https://launchpad.net/bugs/1005812 fixed

bzr revid: nicolas.vanhoren@openerp.com-20120607152301-mu43z3n7q2fonsuk
2012-06-07 17:23:01 +02:00
niv-openerp d70caa73d7 [fix] Put back disk icon in editable lists
bzr revid: nicolas.vanhoren@openerp.com-20120606132035-3zo2ld4q7vycuej6
2012-06-06 15:20:35 +02:00
Hiral Patel (OpenERP) 97d09bbd3c [FIX]display icon of save button.
lp bug: https://launchpad.net/bugs/985715 fixed

bzr revid: hip@tinyerp.com-20120522100448-wslfkjb6j7lj8ipc
2012-05-22 15:34:48 +05:30
Fabien Meghazi 8b95683d20 [FIX] Fix some css, remove useless classes
bzr revid: fme@openerp.com-20120510103513-ejjeab5g3s6tr4tc
2012-05-10 12:35:13 +02:00
Fabien Meghazi 9eb8e07d4f [FIX] Fix empty list menu tips on editable lists
bzr revid: fme@openerp.com-20120510092621-kbjjmo6yct1ndg3c
2012-05-10 11:26:21 +02:00
Fabien Meghazi 104615333c [MERGE] Merge trunk
bzr revid: fme@openerp.com-20120509084139-q0jae332yok87ae1
2012-05-09 10:41:39 +02:00
Antony Lesuisse bb8380314c Clark Gable is dead. Frankly, my dear, I don't give a damn.
bzr revid: al@openerp.com-20120430000158-fp451ymdjxgzwi8v
2012-04-30 02:01:58 +02:00
niv-openerp f719b8f325 [imp] modified form rendering interface
bzr revid: nicolas.vanhoren@openerp.com-20120502091053-o1knrm01225qdq0o
2012-05-02 11:10:53 +02:00
niv-openerp 8a66f58d52 [fix] problem in editable lists: could not edit an existing row
bzr revid: nicolas.vanhoren@openerp.com-20120419155514-j8bslmn6z7z1dh8h
2012-04-19 17:55:14 +02:00
niv-openerp 630eabbbb2 [fix] some problem in editable list, still not solved but made more usable until we find a real fix
bzr revid: nicolas.vanhoren@openerp.com-20120419153857-cdnau0g5yt2e1iy6
2012-04-19 17:38:57 +02:00
niv-openerp 3da11976a4 [fix] problem with editable lists & buttons
bzr revid: nicolas.vanhoren@openerp.com-20120419145051-41ywt5u35z04m8wm
2012-04-19 16:50:51 +02:00
niv-openerp 759be357ce [imp] remaining of refactoring
bzr revid: nicolas.vanhoren@openerp.com-20120417121559-e94wr8ym8sb2f7c1
2012-04-17 14:15:59 +02:00
niv-openerp f03e76c409 [fix] small problem in editable lists
bzr revid: nicolas.vanhoren@openerp.com-20120416160921-yzvyomy5jco0dsgm
2012-04-16 18:09:21 +02:00
niv-openerp de10147813 [imp] small refactoring in form view
bzr revid: nicolas.vanhoren@openerp.com-20120416150839-vr45ozrqffc72qmk
2012-04-16 17:08:39 +02:00
Jacques-Etienne Baudoux f8fc080545 [FIX] Fixed editable list view wrong class assignment.
bzr revid: cpa@tinyerp.com-20120511111527-4iz76pe2x815nd9n
2012-05-11 16:45:27 +05:30
niv-openerp 3899c7896e [imp] more refactoring in rendering engine
bzr revid: nicolas.vanhoren@openerp.com-20120410122110-iz4w1f9b8838sio4
2012-04-10 14:21:10 +02:00
niv-openerp 6de6958a85 [imp] refactoring of form registries
bzr revid: nicolas.vanhoren@openerp.com-20120410120938-y0iwowq7hsvdzjji
2012-04-10 14:09:38 +02:00
niv-openerp 92b3a975f3 [imp] added save button in editable list
bzr revid: nicolas.vanhoren@openerp.com-20120327163417-qba5kkwtgulomjru
2012-03-27 18:34:17 +02:00
niv-openerp 078c2a4e8e [imp] editable list wip
bzr revid: nicolas.vanhoren@openerp.com-20120327162513-7d4a58skbe0inv8n
2012-03-27 18:25:13 +02:00
niv-openerp dcb5133a05 [imp] some improvements to editable list
bzr revid: nicolas.vanhoren@openerp.com-20120327155527-7fmlnpo4hzyx9buf
2012-03-27 17:55:27 +02:00
Fabien Meghazi e59179f71f [KK] Kill Kittens
bzr revid: fme@openerp.com-20120315115215-02kq4flqg95zq67r
2012-03-15 12:52:15 +01:00
niv-openerp 75d39c7f6a [imp] renammed stop()
bzr revid: nicolas.vanhoren@openerp.com-20120221162912-zheko30qoh84hcoq
2012-02-21 17:29:12 +01:00
niv-openerp efb48237bb [imp] improved html generation in editable lists
bzr revid: nicolas.vanhoren@openerp.com-20120221105229-h7609f8boalmvl6q
2012-02-21 11:52:29 +01:00
niv-openerp 4f09c66c3b [imp] removed useless class
bzr revid: nicolas.vanhoren@openerp.com-20120221101522-c9hkpg381cz6j5l4
2012-02-21 11:15:22 +01:00
niv-openerp 383f1750c5 [imp] wip
bzr revid: nicolas.vanhoren@openerp.com-20120221095856-656l1so4ejc06gih
2012-02-21 10:58:56 +01:00
Xavier Morel 2d08b98ea4 [FIX] bug introduced during xmo@openerp.com-20120208130738-pr92lh9qotki71o4
Change made registry inheritance "lazy", keeping a permanent relation
between child and parent and walking the tree to find matches.

But editable listviews relied on an implementation detail (that an
extension eagerly created keys in the children registry) and iterated
over the internal map of the child registry they'd just created to
replace the form keys with overridden versions of the form widgets.

Just iterate over form's registry, but really the editable list should
have its own Registry subclass doing that stuff more solidly.

bzr revid: xmo@openerp.com-20120209154844-zk2xuxdhhi57eqhp
2012-02-09 16:48:44 +01:00
Xavier Morel f5ee468ca5 [REF] rename Registry#clone to Registry#extend
bzr revid: xmo@openerp.com-20120208124634-qucyuwlangw15nqh
2012-02-08 13:46:34 +01:00
Xavier Morel ac8532f801 [FIX] pressing [ESC] while in an editable listview in a dialog should not close the dialog
bzr revid: xmo@openerp.com-20120123143614-c2cw93asd6n5qfqs
2012-01-23 15:36:14 +01:00
Xavier Morel f4efb938e2 [FIX] forgot to forward arguments correctly in xmo@openerp.com-20120112084910-6fxbzbgmv51utyko
bzr revid: xmo@openerp.com-20120112102941-qa596ufk5nlc2nqp
2012-01-12 11:29:41 +01:00
Xavier Morel 12e3ef7fbf [IMP] add lazier proxy method on CallbackEnabled, use it in WebClient and ListView
bzr revid: xmo@openerp.com-20120112084910-6fxbzbgmv51utyko
2012-01-12 09:49:10 +01:00
Fabien Meghazi 683aeeb2c5 [FIX] Fix some editable list styling bugs due to last styling merge
There is still one missing problem: once editing an existing row,
the font size is buggy.

bzr revid: fme@openerp.com-20111220201434-5gwo37br7qil1qp5
2011-12-20 21:14:34 +01:00
Fabien Meghazi 188615a35f [IMP] Use proper name for edit_link option
bzr revid: fme@openerp.com-20111215133800-q8cypwxu7hps21ty
2011-12-15 14:38:00 +01:00