Commit Graph
1318 Commits
Author SHA1 Message Date
Cédric Krier f6684bb08b Set wizard name for dialog and unify wizard name management
issue8535
review287841002
2019-08-07 19:21:30 +02:00
Cédric Krier 7c0a248ec3 Prevent navigation key on completion input to leave the row
We do not propagate down key event on input completion and skip keydown event
from dropdown menu inside editable tree.

issue8507
review263901002
2019-08-07 19:17:15 +02:00
Cédric Krier ac73f7932c Do not display expander on record without children
issue8518
review287811003
2019-08-07 19:14:55 +02:00
Cédric Krier 4aecad26e7 Use right values for expanded and selected nodes
Since changeset 0439bf6f0633, there is no timestamp in tree_states.

issue8517
review259911002
2019-08-07 19:13:21 +02:00
Cédric Krier 1603da8d08 Remove input val when clearing Binary widget
On chromium the input does not trigger a change event if the value is the same
(the same file is selected twice).
So we force the null value when the widget is cleared.

issue8513
review265681003
2019-07-25 10:29:09 +02:00
Cédric Krier 8a0ab47a64 Save modified record even if value to write is empty
issue8511
review279761002
2019-07-25 10:25:34 +02:00
Cédric Krier e0af8fbfb3 Increase display size when path is also equals to it
Length and index are always shifted by 1.

issue8506
review273621002
2019-07-25 10:20:22 +02:00
Cédric Krier 9695e3d378 Remove max-height on treeview to display dropdown
As the optional scrollbar of the treeview will be removed, the dropdown input
may no more be visible. So we must scroll until it is visible.

issue8509
review285581002
2019-07-25 10:18:51 +02:00
Cédric Krier 19977d8dfa Let the focus set by Screen.new_
The Screen.new_ method set the cursor on the right cell so we should set the
focus only when no new record is created.

issue8508
review263911002
2019-07-25 10:16:31 +02:00
Cédric Krier 5890601e9d Remove custom keypress event on xxx2One editable columns
They are no more needed since changeset fbe26a6cce32

issue8481
review251741002
2019-07-23 00:05:09 +02:00
Cédric Krier 45632015a6 Update button state and title on Wizard
issue8498
review271841002
2019-07-22 23:48:17 +02:00
Cédric Krier a5ea26acb3 Set missing node attribute even when it is boolean
issue8439
review285561002
2019-07-20 21:56:22 +02:00
Cédric Krier dd20fb2490 Write edited values synchronously to avoid concurrency error
issue8501
review283741002
2019-07-20 21:53:38 +02:00
Cédric Krier c984b94a98 Read value and fuzzy value in parallel to compare both
issue8500
review283741002
2019-07-20 21:53:12 +02:00
Cédric Krier 3fe1f51ed0 Update display logs for new related read API
Since issue7888, the result of related fields are stored in nested
dictionaries.

issue8426
review259841002
2019-07-20 21:45:28 +02:00
Cédric Krier 36e8a2dad6 Wait reload is done before enable the button
We must return the promise of the reload as the button promise to avoid enable
back the button before the screen is fully reloaded.

issue8488
review249661002
2019-07-17 22:50:25 +02:00
Cédric Krier 77f6c00cad Keep showing invalid input number and set NaN on the model
When a dialog (form) is validated and show the error message from the browser,
the input number must be visible.
Also we should not store on the model invalid values to get error on client
side instead of the server side.

issue8487
review255661002
2019-07-17 22:48:59 +02:00
Cédric Krier 50c6047185 Prevent changing row if current record is not valid
issue8486
review281831002
2019-07-17 22:47:32 +02:00
Cédric Krier 7afe3af8b3 Manage RETURN key as UP/DOWN on editable tree
The RETURN key should validate and save the current record before creating a
new one.
And UP/DOWN keys should create new record when they are at the end.

issue8485
review251761002
2019-07-17 22:46:01 +02:00
Cédric Krier 12b60612ea Use synchronous calls for on_change's and Field.set
Those calls can be triggered by event like focus-out. So to ensure a correct
order of the flow, we must defer the processing of the result.

issue8482
review273571002
2019-07-17 22:40:48 +02:00
Cédric Krier 65b553c660 Improve column sizing
We set a minimal width on the treeview table (min-width on td has an undefined
behavior) by summing the default width of each column.
We add a fake scrollbar on top of the treeview to ensure the user will see that
there are more column to see. The fake scrollbar is a div with the same minimal
width and its parent as the scroll value synchronized with the scroll of the
treeview div.
The minimal widths are removed on extra small screen if the treeview is
responsive because the table has 100% of the width.
To have the minimal width working also on the xxx2Many view inside a form, we
must set a maximum width to the cell. As this width must be expressed in
relative size (not in pixel to support resizing), we express them as
percentage of the width of the viewport. The percentage is computed from the
percentage width already computed but also rated with all the percentage width
of the parent cell. We also remove the maximum percentage of the offcanvas
size. This does not give the exact maximal width but it is close enough to have
a correct behavior no matter the size of the screen.

issue8308
review259411002
2019-07-13 00:20:31 +02:00
Cédric Krier 8176b13534 Add workaround for dynamic datalist on Firefox
This is related to https://bugzilla.mozilla.org/show_bug.cgi?id=1474137

issue8454
review257651002
2019-07-08 21:26:20 +02:00
Cédric Krier ce4d13b258 Do not use DOM order to find current tab
The DOM and the tabs list are not ensured to have the same order because the
DOM is modified after the view promise is resolved.
To rely only on a single information source, we store the tab as data on the
nav li.

issue8443
review249521004
2019-07-08 18:51:36 +02:00
Cédric Krier 3557de1de3 Ensure to remove only the tab from the list of tabs
Tab.close can be called multiple times (ex: closing wizard running in a tab)
so the indexOf can return -1 if the tab has already been removed.

issue8431
review263691002
2019-07-08 18:49:22 +02:00
Cédric Krier 7474935810 Re-use FormXMLViewParser to parse board view
issue8313
review275591002
2019-07-08 17:15:51 +02:00
David Harper fc953ab580 Add hover style to input-file list item
issue8441
review265591002
2019-06-27 14:34:56 +02:00
Cédric Krier 328d7abd21 Use faster way to remove children
issue8453
review255641002
2019-06-27 14:32:36 +02:00
Cédric Krier 62a940664d Fix javascript comparison in widget modified method
Some Javascript types do not correctly so we have to use JSON string. And we
must ensure to compare with the same type.

issue8377
review275611002
2019-06-25 22:58:05 +02:00
Cédric Krier 25bfb2d767 Set url on switch callback only if it is the current tab
The callback can be triggered when the tab is no more current.
E.g. at the end of a wizard when the screen is reloaded and displayed, the
current record is reset which trigger the callback but the wizard may have
open a new tab meanwhile.

issue8432
review259671002
2019-06-20 23:16:56 +02:00
Cédric Krier 9d820ef4cc Do not bind twice keydown event on key_press method
The event is already binded in the Form widget so the EditableTree widget does
not need to bind it again otherwise the callback is called twice per event.

issue8429
review255571002
2019-06-20 23:15:06 +02:00
David Harper b7b8f3c278 Use outline style mdi icons for back and forwards
issue8400
review271521003
2019-06-17 22:24:46 +02:00
Cédric Krier b2739258e9 Allow customizing Dict keys order
We add a sequence attribute to the key definition and use it for sorting.
This attribute is filled by the field sequence if it exists (using
sequence_ordered) or by the key name.

issue8373
review275431002
2019-06-16 19:24:15 +02:00
Cédric Krier ec8131be9d Improve domain validation error from server
We add to DomainValidationError the invalid domain and the field definition so
the client can format and append it to the description of the error.

issue8288
review255351002
2019-06-16 19:04:55 +02:00
Cédric Krier f841fd1bc7 Allow to search on related field in search box
The server adds to the definition of the fields, the definition of relation
fields up to specific deep level.
The clients use this relation fields definition to extend the domain parser
with those fields using a dot notation. But those "dotted fields" are not
shown in the search filter to not bloat the popup as it is dedicated to
learning.
In addition, Dict fields are also filled with relation fields coming from the
keys defined in the schema model. As the size can very large, it is possible
to deactivate this feature from the configuration.

issue8293
review259391005
2019-06-16 15:44:14 +02:00
Cédric Krier 4b436df20b Remove record, field from display_update_selection of multiselection
The method on selection does not have those parameters anymore.

issue8385
review287381003
2019-06-12 19:08:46 +02:00
Cédric Krier 1ba3a53f8c Test if attribute readonly is undefined before using states value
This is the general behavior for readonly attribute so
RowEditable.set_editable must follow it to avoid incoherent behavior.

issue8390
review249401002
2019-06-12 19:06:19 +02:00
Cédric Krier 223b2ed06d Prevent modification of cache RPC answers
The cached value should never be changed after being stored by the setter or
by a getter. So we make a copy of the value before storing it and return
another copy when returned.

issue8387
review269601002
2019-06-12 19:04:42 +02:00
Cédric Krier 56bcd77030 Compare record against the current record of the screen
Also store the view instead of the screen like in tryton.

issue8386
review263551002
2019-06-12 19:02:56 +02:00
Cédric Krier 785f554cd5 Add view modified
It is needed to detect all cases of modified record.

issue8377
review259511002
2019-06-12 18:59:39 +02:00
José Salvador 9bc7ce3fc5 Improve README with developer installation instructions
issue8395
review263571002
2019-06-05 15:16:36 +02:00
Nicolas Évrard 9103b7e6fe Use npx
issue8397
review275481002
2019-06-05 13:11:06 +02:00
Cédric Krier 9814f598d4 Add Dict widget to tree view
It is needed to be able to search on dict.

issue8296
review271331012
2019-06-04 18:20:23 +02:00
Nicolas Évrard ddef8d7c06 Return an empty URL when the icon name is invalid
issue7904
review70461002
2019-06-04 17:38:17 +02:00
Cédric Krier 07452ba2dc Reduce number of promises when rendering tree
We preload the first field of the first row if needed. This should ensure that
the following records are also loaded.
And we do not call load if the field is already loaded to avoid to create a
promise.

issue8199
review265411002
2019-06-03 15:45:06 +02:00
Cédric Krier e3f964f3f8 Use same definition format for dict key than field
This will allow to use the dict keys as relational fields and allow the client
to use them for domain parsing.

issue8295
review273311002
2019-06-03 15:37:49 +02:00
Cédric Krier 81414b98de Remove calc expression in media query
It is not a valid syntax and it is no more computed by less.

issue8374
review265471002
2019-05-28 09:53:36 +02:00
Cédric Krier 112f35ad02 Split dropdown menu of tab using the screen height
The split should depend on the height of the screen and not the width because
it does not have a scrollbar when it is too long.

issue8292
review263371002
2019-05-22 18:34:39 +02:00
Cédric Krier 6a2163b24b Ensure to execute display before showing the info message
The display must be run before the callback linked to the promise of
save_current. And save_current must return a promise with the same state as
the save promise.
Also save should not reject with the exception to avoid jQuery warning.

issue8338
review265421002
2019-05-13 22:38:11 +02:00
Raimon Esteve ace735ac21 Correct widget name of binary in treeview
issue8337
review261441002
2019-05-09 09:31:58 +02:00
Cédric Krier 486bc72436 Increase version number 2019-05-06 14:47:14 +02:00