Commit Graph
6567 Commits
Author SHA1 Message Date
qsm-odoo 56da552af0 [IMP] web: force form view label font-size
Some labels may now be placed in a <h1,2,3> tag in some circumstances
2015-07-31 11:15:45 +02:00
qsm-odoo b68005d4b2 [FIX] web: enterprise compatibility rules
* All fields in an o_row need to be inline
* many2many_tags needs to be inline by default
2015-07-31 11:15:45 +02:00
Aaron Bohy 90b2250cad [IMP] web: action_manager: hide control panel when widget ready
for widgets that don't use it, instead of hidding it directly. Doing so, the
control panel is hidden simultaneously with the old view, and there is no more
flickering.
2015-07-30 14:00:48 +02:00
Aaron Bohy 6f8cabe413 [FIX] web: view_manager: update control panel on title change
only if the control panel if visible.

This fixes a bug on the settings view (form view), on which the control panel
is hidden (the bar containing 'Apply' and 'Cancel' is unfortunately not a true
control panel). When clicking on 'Apply', for some weird reason, the event
'change:title' is triggered and the control panel is updated with the new title
('New'). However, as the flags hidden isn't mentionned, the control panel
visibility is toggled.
2015-07-30 14:00:48 +02:00
Arthur Maniet f45904f581 [REF] web: move barcode_events to module barcodes
If the module barcodes is installed, a BarcodeEvents singleton is
automatically instanciated. It listens to keypresses and, when a
sequence of keys represents a barcode, it broadcasts a 'barcode_scanned'
event on core.bus containing the barcode string.
2015-07-30 07:55:45 +02:00
Antony Lesuisse 4914fcb093 [IMP] web: about dialog for v9 2015-07-29 15:20:48 +02:00
Aaron Bohy aa887ed02c [FIX] web,mail: widgets: replace $el.toggle() by do_toggle()
Since rev. 16eb36ff, do_show() and do_hide() on widgets toggle the classname
o_hidden on which the rule 'display: none' is defined, instead of calling
jQuery's show() and hide().

The method do_toggle(), sharing the same logic, has been introduced in rev.
74c5f772.

From now on, every widgets should call do_toggle() instead of $el.toggle() as
it will have undesiderable effects (they should call do_show() and do_hide()
instead of $el.show() and $el.hide() as well, this as been done in 16eb36ff).

This rev. replaces all calls to $el.toggle() by do_toggle(). It also adds
an optional argument to do_toggle() to force hidding or showing the widget.
2015-07-29 14:36:03 +02:00
Aaron Bohy 51952f3033 [REF] web: form view: WidgetButton: use Dialog.confirm 2015-07-29 14:36:03 +02:00
Aaron Bohy ecc4e512cd [IMP] web: action manager: restore action
When clicking on the breadcrumb to come back to a previously loaded action, the
restore() function is called. With this rev, this old action is shown only once
the Deferred returned by the optional on_reverse_breadcrumb callback is
resolved, i.e. when the action is ready, as it should be.
2015-07-29 14:36:03 +02:00
qsm-odoo 970b54d1eb [IMP] web: alert/confirm dialogs default titles
Add "Alert" and "Confirmation" as default titles for
alert and confirm dialogs
2015-07-29 14:30:28 +02:00
qsm-odoo face447e4d [FIX] web: div.o_checkbox compatibility
Add rules so that the enterprise version div.o_checkbox does not
break community layout
2015-07-29 10:45:04 +02:00
Aaron Bohy 71e9de4ecc [REF] web(_tests): list view (editable): action buttons
Refactoring of the DOM structure and classnames of the list view's action
buttons (in the control panel), for new design compatibility. This refactoring
was required as some addons shared between both editions (e.g. base_import)
define their own buttons and extend the ListView.buttons template to insert
them.
2015-07-29 08:41:02 +02:00
Simon Lejeune 4e24b81616 [REF] web: action manager: wrap the client actions in a div
this way we can style the div and use the trick to have the child of a
flex-item filling 100% of its parent (flex item in relative position and
flex child in an absolute position). It is needed to have a consistent
look betwenn Odoo enterprise and Odoo community.
2015-07-29 08:39:38 +02:00
Christophe Simonis 908cb7cde3 [FIX] web: use correct non-undefined variable.
Bug introduced during previous forward-port
2015-07-28 14:30:05 +02:00
Christophe Simonis 97073e2a73 [MERGE] forward port of branch saas-6 up to 51040b6 2015-07-28 13:56:16 +02:00
Nicolas Lempereur 51040b6d60 [FIX] web: no edit bounce effect if bootstrap element
Bootstrap bind on document to do an element, in some case the bounce effect
on the edit button might cancel the bootstrap action.

e.g in the crm.claim form view, the `group` tag arround a notebook element
break the tab change on the notebook.

opw-646012

note: in 8.0 the issue didn't happen since the tab change was done by
jquery ui which happened before the bounce effect.
2015-07-28 11:42:57 +02:00
qsm-odoo 6d484ad026 [IMP] Add Dialog.alert feature
This allows to open a simple message dialog with potential
action when the unique "ok" button is clicked
2015-07-27 13:57:22 +02:00
Géry Debongnie 4f5d498eb3 [IMP] web: modify notification.js like in enterprise
The enterprise web client had to be modified to fix a crash.  This crash
does not occur in the community web client,  but this commit makes sure
that the semantics of the notification manager is the same as the
enterprise version, to prevent future problems.
2015-07-24 14:31:51 +02:00
Aaron Bohy bfe8233880 [FIX] web(_tests): FieldMany2One: autocomplete
Many2One fields were broken in views opened by default in edit mode, since rev.
a0ddaf8. The autocomplete widget was appended to the DOM at
'.oe_application > *:visible:last', but since the mentionned rev., the views
are rendered in fragments detached from the DOM, and once they are ready, the
old content is detached and the new one is attached instead. It means that by
appending the autocomplete widget within '.oe_application > *:visible:last',
it is detached from the DOM with the previous content, and Many2One fields can
thus not work.

This rev. simply removes the appendTo option of autocomplete, so that the
widget is directly appended to the body.

Also updates a tour's selector matching an autocomplete ul as it isn't inside
the .modal anymore.
2015-07-24 09:08:14 +02:00
Simon Lejeune 22fe0f5d0e [REF] web_planner: adapt style to webclients and website
With selectors here and there to make it work with the community
webclient, the enterprise webclient and the website without duplicating
the module.
2015-07-23 14:02:41 +02:00
Simon Lejeune 5666cd3643 [REF] web_planner: javascript & dom cleaning
* Correct inheritance of async method
* Correct calls to do_hide/show
* Fetch the template in `willStart`
* Correct bootstrap structure for the layout, remove useless branding
  and dom depth
* Each planner page is now in its own bootstrap grid
* Compatibility between both webclients
2015-07-23 14:02:40 +02:00
Simon Lejeune 74c5f772f3 [ADD] web: framework: do_toggle on widget 2015-07-23 14:02:40 +02:00
qsm-odoo 86c399f3bd [IMP] web: New notification system
Backport of the Notification system
2015-07-23 10:51:12 +02:00
Aaron Bohy a500f3b01b [IMP] web(_kanban): accesskeys for switch buttons
More elegant solution to add accesskeys on switch buttons for list, kanban and
form views.
2015-07-23 09:25:18 +02:00
Géry Debongnie 4a81e8aba1 [FIX] web: no selection widget in search with many2one fields
In previous releases, the search view ignored the selection widget when
the field is a many2one.  This behaviour is justifield by the fact that
the selection widget just doesn't work, and the default search input
actually does work.

The search view was refactored extensively in late 2014, and this
behaviour was lost.  As a result, every many2one with a "selection"
widget stopped working (for example, warehouse/products, a search for
"you" does not give anything on "location" or on "warehouse").  This
commits simply fix the issue by ignoring the selection widget in search
views (with many2one fields).
2015-07-22 16:39:21 +02:00
Christophe Simonis 2cf91d16a5 [MERGE] forward port of branch saas-6 up to 63e92cb 2015-07-22 16:17:54 +02:00
Christophe Matthieu b6ddfe617f [FIX] base, web : move apps.js from base to web
'base.apps' JavaScript module 'require' the web widgets. This module is only useful if web is installed.
2015-07-22 12:15:25 +02:00
Christophe Matthieu 242e5231f0 [FIX] web, mail: move 'mail.compatibility' in mail
'mail.compatibility' javascript module require 'mail.mail'
2015-07-22 12:15:25 +02:00
Christophe Matthieu fe0885f28a [FIX] web: move 'web_kanban.Many2ManyKanbanView' in web_kanban
'web_kanban.Many2ManyKanbanView' javascript module in web require 'web_kanban.KanbanView'
2015-07-22 12:15:25 +02:00
Christophe Matthieu 264bb780a1 [IMP] web: web modules return readable logs and phantomjs logs
boot.js log:

* ``Missing dependencies``:
  These modules do not appear in the page. It is possible that the JavaScript
  file is not in the page or that the module name is wrong
* ``Failed modules``:
  A javascript error is detected
* ``Rejected modules``:
  The module returns a rejected deferred. It (and its dependent modules) is not
  loaded.
* ``Rejected linked modules``:
  Modules who depend on a rejected module
* ``Non loaded modules``:
  Modules who depend on a missing or a failed module
2015-07-22 12:15:25 +02:00
Christophe Matthieu 71732dceb6 [IMP] web: module can be asynchronous loaded if it return a deferred
Each module can return a deferred. In that case, the module is marked as loaded
only when the deferred is resolved, and its value is equal to the resolved value.
The module can be rejected (unloaded). This will be logged in the console as info.

Remove if_dom_contains from the website, the modules return a rejected deferred if
the DOM doesn't contains the seleted values.
2015-07-22 12:15:24 +02:00
Yannick Tivisse a4417a960b [FIX] web: Secondary left menu items with action are displayed in blue instead of the others, which are displayed in purple. 2015-07-17 17:12:27 +02:00
Aaron Bohy 16eb36ff45 [IMP] web: use a classname to show/hide widgets
The problem of $el.show()/hide() is that calling show() on a jQuery element on which
there is no display rule in the stylesheet automatically sets 'display: block'.

However, when a jQuery element is not yet in the DOM, the rules defined on it are not yet
applied, meaning that calling show() will set its display to block (in inline style),
even if there is different a css rule (e.g. 'dislay: flex'). As the inline style takes the
priority over the stylesheet, the correct display won't be applied, even when the widget
will be appended in the DOM, resulting in a possibly broken layout.
2015-07-17 09:53:30 +02:00
Yannick Tivisse 63567e2b5a [IMP] web : added shortcuts to jump between views 2015-07-16 17:16:58 +02:00
Aaron Bohy a0ddaf8b84 [IMP] web: trigger an event when webclient is ready
The main purpose of this commit is to be consistent with the enterprise edition,
in which the event 'DOM_updated' is triggered when new content is inserted in
the DOM. This way, addons that need to know when a view has been attached in the DOM
(e.g. web_tip) can listen to this event and will work fine with both editions
of the web addon.

With the actual structure of the webclient (action_manager, view_manager),
there is no easy way to decide whether or not a view is attached in the DOM,
because every rendering is performed in a detached element. For instance,
when a view_manager instantiates a new view, it appends it in its $el once
the view is ready, but it can't know if its $el is attached in the DOM (it is
only the case if the view_manager is the current action of the action manager).

This rev. introduces utility functions to centralize the appending/prepending of
content, so that an event can be triggered (at a unique place) when the content
is really in the DOM. These functions are used by the the action_manager and the
view_manager.

Another change is that the action_manager keeps the view_manager informed when
they are attached in/detached from the DOM, through the variable is_in_DOM.
2015-07-15 13:32:58 +02:00
Aaron Bohy 27df65c878 [IMP] board,google_spreadsheet,web,web_calendar: Favorites menu
Adapt the Favorites menu so that addons appending stuff in it are compliant with
the enterprise edition.

Mainly, creation of dashboard.less from of dashboard.sass so that we can use mixins
defined in the web addon.

Some changes as well in the dashboard view to make it compliant with the enterprise
edition.

Use correct naming convention: classnames with underscores, less mixins with hyphens.
2015-07-15 13:32:56 +02:00
Christophe Simonis d215a08db1 [MERGE] forward port of branch 8.0 up to 86d7f52 2015-07-14 15:57:39 +02:00
Christophe Matthieu dcbd66a3eb [IMP] boot.js: use console.error instead of console.warn to make the runbot in red when there's an error in a javascript module 2015-07-14 11:43:24 +02:00
Christophe Matthieu 809cdbb153 [IMP] web: use a mutex on the object instead of create one in the send_commands method: no crossed change values, keep internal_dataset_changed for other widgets (like editable list) 2015-07-13 11:50:32 +02:00
Christophe Matthieu 66025268e1 [IMP] web: AbstractManyField: add a feature: if the widget receive a write command without link to the record previously, automatically add the record id into dataset ids. 2015-07-13 11:50:32 +02:00
Nicolas Lempereur 0511b9af83 [FIX] web: m2m tags overflow when too much tags
If too many tags (or too long tags) where present in a many2many tags
widgets, it could go over the field and cover other thing in the UI.

Now the field size expands with the content (and in a way it is more
visually similar before and after 'Edit' so it is nice).

closes #7579
opw-644236
2015-07-13 10:37:31 +02:00
Christophe Simonis 4a2aee45be [MERGE] forward port of branch 8.0 up to 9654b54 2015-07-10 17:12:57 +02:00
Christophe Matthieu 087fd6942b [IMP] web_editor: add test translator 2015-07-10 17:00:15 +02:00
Christophe Matthieu 92983cfede [IMP] tour: add log attribute on run method and add getHandlers on jQuery to display the list of handler when the tour try to trigger event 2015-07-10 17:00:15 +02:00
Christophe Matthieu 9665882fba [IMP] web_editor: adapt css, js and xml to use web_editor 2015-07-10 17:00:12 +02:00
Christophe Matthieu 25d5bb855c [IMP] web: remove cleditor html field and use web_editor (with 'style-inline': true to send email) 2015-07-10 17:00:12 +02:00
Christophe Matthieu 8c559044a5 [IMP] web_editor: split website into web_editor (to use editor in backend for html field) and website 2015-07-10 17:00:11 +02:00
Christophe Matthieu 500c33b184 [IMP] web: split model.js into model.js and data_model.js. Web js modules must call web.DataModel. 2015-07-10 16:32:35 +02:00
qsm-odoo fc3b25cefd [MOVE] web, website_*: select2(-bootstrap) in web and assets-common
* select2 was linked in both backend and frontend (by web and website)
* select2-bootstrap was in website and linked only in frontend but it
  is in fact needed in backend too

+ Remove useless link of the lib by other modules
2015-07-09 16:27:24 +02:00
Pankaj Joshi 03592e1c73 [FIX] account, mail, web : replaced broken glyphicons with font-awesome icons and updated css/scss file accordingly 2015-07-08 17:11:18 +02:00