Commit Graph
22 Commits
Author SHA1 Message Date
Géry Debongnie 905e01921f [REF] web, *: redesign all JS views
This commit introduce a full redesign of all JS views.  We started
basically from scratch.  The goal was to unify all the various views
under a common framework, to make them testable, to make then usable in
different conditions (in studio, or in the frontend), and to make our
lives easier.

Some important points are:
- we introduced new coding guidelines (camelCase, 80 chars width, ...)
- we have a brand new testing framework (still QUnit based)
- kanban view moved to the web addon
- calendar view (formerly web_calender) moved to web as well
- the tree view was removed
- all new code should be documented

We hope that this code is the start of a new era for the Odoo web
client, we want to have a high quality codebase, well documented, well
tested, well designed.

Work done by the framework team: mostly aab, ged, chm, dmo, qsm
2017-04-11 19:44:38 +02:00
Aaron Bohy bffa8f37f1 [REF] web_diagram: various tweaks
- Ensure compatibility with both editions of web
- Use the Pager widget instead of re-implementing it
- Fix the use of Dialogs which was broken (wrong type of Dialog was used)
- Convert css into less
- Some js linting
2015-08-07 14:05:07 +02:00
Aaron Bohy 48f4605f5a [IMP] Web, Web_diagram: better integration of the Diagram view
The 'New node' button is inserted in the ControlPanel. Breadcrumbs
are now handled as well.

The 'multi_record' flag has been added to the views to distinguish views
displaying several records, like the List view, from views displaying
a single record like the Form view and the Diagram view. This flag is
used by the ViewManager to manage its view stack. Fixes the breadcrumb
bug when switching between Form view and Diagram view (the last element
of the view stack is now replaced by the new one in that case).
2015-03-24 13:33:10 +01:00
Aaron Bohy 1280bf2513 [IMP] Web and all views: ControlPanel atomic update
Change the logic of rendering and displaying/hidding the control
elements (buttons, sidebar and pager) of all views. The views do no
more render automatically their elements as this is rather done
through the render_[element] function called by the ViewManager.
This function only appends the element to the $node given as argument.
If no argument is given, then it may appends it to the DOM directly,
within the adequate div of its template.
This allows the ViewManager to attach/detach all elements of the
ControlPanel in an atomic may, to prevent the ControlPanel from
flickering.
Also detach the contents of the ControlPanel in headless mode. Headless
means that the ControlPanel exists, but is hidden. Detaching its
contents permits to have a cleaner DOM.

Also remove the oe_form_dirty class on the buttons in the FormView, as
this class is only used on the view itself.

Side changes:
* base_import: import.js:
    Extend render_buttons function to be compliant with the new buttons
    rendering logic
* board: dashboard.js:
    Set flag search_view to True as the searchview is needed for the
    Views displayed in the Dashboard to retrieve the records to display.
    Necessary since we do no more construct the searchview when this
    is set to false
* google_drive: drive.js,
  share: share.js:
    Module extending the Sidebar widget often add their own buttons
    by extending the start(), which is called each time the Widget
    is appended to the DOM. With our new design, this could be done
    in start() anymore as it should be done only one. It is now done
    in init() instead.
2015-03-20 16:34:39 +01:00
Géry Debongnie 265ba55646 [FIX] web: add missing icon, add warning, fix deferred
* ir_actions_common should return a deferred : some widgets
  do not return a deferred in start, so it could be undefined.
  it now is always a deferred.
* add icon for diagram view + breadcrumb support. diagram view
  is so rare that it wasn't tested in the client refactoring.
  This patch adds an icon for diagram view, and better support for
  breadcrumbs
* add warning in debug mode print workflow: when no record is
  selected, display a warning instead of failing silently
2014-12-11 10:07:26 +01:00
Hardik 1435e6faeb [IMP]Diagram view pager is working and display in header
bzr revid: hsa@tinyerp.com-20121023073150-ozao4l0wca96cgmp
2012-10-23 13:01:50 +05:30
Raphael Collet d6dc264ea2 [IMP] web, web_diagram: improve code formatting
bzr revid: rco@openerp.com-20120904145017-qw6n8clak9byw1w3
2012-09-04 16:50:17 +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
Raphael Collet 3e5c6a4d95 [IMP] fix code spacing and indentation
bzr revid: rco@openerp.com-20120831153758-3l46jbvtifix5s9v
2012-08-31 17:37:58 +02:00
Jigar Amin - OpenERP e79baa9e8a [FIX] resolve Conflicts reverts
bzr revid: jam@tinyerp.com-20120827050151-yinbjtladoe3vu5w
2012-08-27 10:31:51 +05:30
Jigar Amin - OpenERP 548672a2c3 merge lp:openerp-web
bzr revid: jam@tinyerp.com-20120827044256-engs2hibz5x5fnwh
2012-08-27 10:12:56 +05:30
Jigar Amin - OpenERP 41964c4b9d [IMP] View Button Constrains: Diagrem view add node button, kanban record slidebar widget mnethod support
bzr revid: jam@tinyerp.com-20120816130012-ibtv0ipbbnpznqb1
2012-08-16 18:30:12 +05:30
Xavier Morel 056f987b0d [REM] hardcoded diagram id, use class instead
also fix class: add previx

bzr revid: xmo@openerp.com-20120229104624-snt8j2kt2y3hp6h1
2012-02-29 11:46:24 +01:00
Xavier Morel 8ec0fda0c3 [IMP] add diagram name (name_get) above 'new node' button, so user knows what he's looking at
bzr revid: xmo@openerp.com-20120229102948-jfl1pbbg3t1460il
2012-02-29 11:29:48 +01:00
Frédéric van der Essen 3c8eaaaa99 [IMP] Diagram: Resizable viewport, viewport move cursor
bzr revid: fva@openerp.com-20120228103933-j92bexvam1hsfc7t
2012-02-28 11:39:33 +01:00
Frédéric van der Essen 87f65775e0 Correct viewport integration, cosmetic changes, node loops
bzr revid: fva@openerp.com-20120224095310-r3bdlx09n5eaxrvk
2012-02-24 10:53:10 +01:00
Fabien Meghazi 92f1526a2f [IMP] Improved pager
bzr revid: fme@openerp.com-20111220173740-qynxxqksvyr4zntr
2011-12-20 18:37:40 +01:00
Fabien Meghazi 8ba259b3f6 [IMP] Improved buttons
bzr revid: fme@openerp.com-20111220115500-aulwnoj6ciks8jxm
2011-12-20 12:55:00 +01:00
Xavier Morel 5d754afde4 [ADD] Creation of new edges via clicketyclick
bzr revid: xmo@openerp.com-20111026134929-ze1jl0efq7o07lr5
2011-10-26 15:49:29 +02:00
Xavier Morel c3a3905698 [IMP] remove grid and border from diagram view content
bzr revid: xmo@openerp.com-20111026083026-bh6y3diclf5niui4
2011-10-26 10:30:26 +02:00
Xavier Morel a84f8fac3e [IMP] move action name display to ViewManagerAction, move form's debug (display view code button) to viewmanageraction as well
bzr revid: xmo@openerp.com-20110914091319-o1941w689183wivt
2011-09-14 11:13:19 +02:00
Xavier Morel 38960ee912 [MERGE] diagram view
bzr revid: xmo@openerp.com-20110906082222-r0e0glqmr0hlub55
2011-09-06 10:22:22 +02:00