Commit Graph
72 Commits
Author SHA1 Message Date
Aaron Bohy dfad968515 [FIX] board: forgotten o-closed-menu
in the renaming of commit 27df65c878.
2015-07-22 10:31:21 +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 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
Simon Lejeune fe08dae378 [IMP] board: improve labels input style of personnal dashboards
- When editing the label of a dashboard, we try to emphasize the focus on this label
2015-07-01 18:04:46 +02:00
qsm-odoo 46bf047e86 [IMP] web, web_*, mail, board : New modals and dialogs 2015-06-17 09:49:46 +02: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
Aaron Bohy 151c90743e [IMP] Web et al.: unique main ControlPanel
A unique main ControlPanel is instantiated by the ActionManager and it
is updated each time the state changes (i.e. when an action is performed
on the ActionManager or when switch_mode() is called on the ViewManager).

Introduction of State classes to facilitate the way of restoring
previously rendered states in ControlPanel. The notion of widgets
previously used in the ActionManager is now encapsulated in the notion
of states.

The search() function has been moved from ControlPanel to ViewManager as
it makes more sense like this.

The ViewManager doesn't have the reference to the ControlPanel but
rather communicate with it through a dedicated bus.

Some refactoring has been done on the ControlPanel as well so that it
doesn't need to know the ActionManager and the current Action anymore
(it communicates with the AM with events, and it updates itself using
information passed in arguments).

Improves the way the ViewManager requests the ControlPanel to
instantiate a SearchView, and how it waits for this SearchView to be
corretly loaded.

Move back the views logic to the ViewManager which directly asks
the ControlPanel to render the buttons and switch-buttons areas with
the views passed in arguments.

Removes option replace_breadcrumb in push_state() of ActionManager as it
is not used.

Side changes:
* Account: account_widget.js:
    Adapt code to retrieve the current state of the ActionManager.
    Required due to the introduction of State classes that encapsulate
    the notions of widgets and inner_widget in the ActionManager.
* Board: dashboard.js:
    Some refactoring to adapt the code according to the new Widgets
    structure. Several dependencies (e.g. searchview, action) were
    unnecessary. Do not append the "add to dashboard" option to the
    Favorite menu if there is no ViewManager available (e.g. in
    Messaging) instead of hidding it with a CSS rule, as a ViewManager
    required to retrieve the active_view.
* Google_spreadsheet: search.js:
    Change the way to retrieve the list_view_id s.t. it does not rely on
    parent of the SearchView anymore.
* Web: search.js:
    Change the way to retrieve the title in search.js for Favorites s.t.
    it does not rely on the parent of the SearchView anymore. Doing so,
    the ControlPanel does not need the title attribute anymore.
2015-03-20 16:18:33 +01:00
Aaron Bohy 53a9f6c081 [IMP] Web et al.: ControlPanel extracted from ViewManager
The ControlPanel is still instantiated by the ViewManager.

Changes details:
* web: views.js:
    Code related to views header is extracted from the ViewManager
    to a new Widget named ControlPanel.

    Also uses the headless flag to tell the inner view not to put
    its buttons (use case: kanban) or pager (use case: list) in the
    header as it is hidden.
* web: view_form.js, base.xml:
    Uses the headless flag at initialization of the One2ManyViewManager
    widget instead of extending the ViewManager template (which doesn't
    handle the header anymore).

* web: view_list.js:
    Test on this.options.$pager instead of this.options.$buttons
    when dealing with pager.

    Note: the behavior for list view is unchanged and has a bug.
    If there are more then 80 records to display, only the 80th
    first are display, and as there is no pager, there is no way
    to see the remaining ones. A fix for this would be to use a
    light ControlPanel in One2Many views as well. With this,
    there won't be duplicated .oe-'view'-buttons/sidebar/pager
    anymore.

* web: view_graph.js, view_pivot.js:
    Only render buttons in non-headless mode

* web_dashboard: dashboard.js:
    Fix some references that were broken with ControlPanel extraction

* web_view_editor: web_view_editor.js:
    Extend ControlPanel instead of ViewManager

* Changes in selector of ControlPanel elements in several addons:
    * base_import
    * mail
    * web
2015-03-20 16:17:06 +01:00
Géry Debongnie 4fdf74fe21 [IMP] web+addons: improvement to module system
The module system needs to know the dependencies of a given module
before executing the function.  This is why the dependencies were
defined once in an array, and then were described one more times in the
call to require.

But a trick can simplify this: the boot function can parse the string
representation of the module and extract the calls to require from it.
It is more work for the processor, but it leads to simpler module
definitions.
2015-03-18 09:23:37 +01:00
Géry Debongnie 824dbe13ad [REF] board: update to the new module system 2015-03-18 09:01:51 +01:00
Simon Lejeune f4583b7c56 [FIX] web: viewmanager header: missing type on button tags 2015-03-05 16:05:10 +01:00
Simon Lejeune b310a56c98 [FIX] web: searchview: correct toggleClassof dropdowns
* toggleClass('class', undefined) behaves as if no second argument was
passed: a classic toggle
* toggleClass('class', !undefined) will only add the class if not
present, as the second argument is a boolean (!undefined is true)

This leads to an inconsistent state in the previous implementation of
multiple toggle methods (the`closed-menu` class was never toggled). We
now only use the not operator when the variable is not undefined.

Also, fix the toggle `closed-menu`/`open-menu` logic in dashboard.js,
where it was applied to the `a` instead of the `li`.
2015-02-16 13:43:44 +01:00
Géry Debongnie 21231eb120 [FIX] board: add to dashboard now uses correct context 2014-12-19 14:34:23 +01:00
Géry Debongnie 286d7f80bf [FIX] fix a crash when editing dashboard title (web)
fix is very simple. no further comment required I think.
2014-11-28 15:54:15 +01:00
Dikshit Prajapati b1bd607e71 [REM] board: "reset dashboard" button 2014-11-18 08:27:36 +01:00
Christophe Simonis 812c257094 [MERGE] forward port of branch 8.0 up to c825d05 2014-11-05 21:49:01 +01:00
Christophe Simonis c825d0552d [MERGE] forward port of branch saas-3 up to ec27773 2014-11-05 21:46:42 +01:00
Christophe Simonis 388732dfa6 [IMP] *: one Makefile to rules them all.
Create one unique generic Makefile to compile sass files.
2014-11-05 19:30:28 +01:00
Christophe Simonis cf23a5deda [MERGE] forward port of branch 8.0 up to 92c7874 2014-10-29 19:45:09 +01:00
Géry Debongnie 5abc3afe4b [FIX] various css fixes (advanced search)
* dashboard did not display properly kanban in ie
* kanban did not extend to the bottom of the available screen
* custom filters did not display anything different when they were
public (not private)
* some small css problems
2014-10-29 08:38:18 +01:00
Xavier Morel ba55e31f57 [FIX] add charset declaration to dashboard.sass so sassc stops freaking out 2014-10-28 16:38:32 +01:00
Géry Debongnie d82ca918cd [IMP] various code improvements
mostly styling, and related micro-changes
2014-10-21 09:33:52 +02:00
Géry Debongnie 524543fa3b [FIX] make add to dashboard work
With the search view refactoring, the add to dashboard functionality was unavailable.  Weep no longer, it is fixed.  The dashboard button is now an action in the favorites submenu instead of a search input
2014-10-21 09:33:50 +02:00
Christophe Simonis 8046b7367d [MERGE] forward port of branch saas-5 up to 7e117b1 2014-08-28 16:51:11 +02:00
Christophe Simonis 7e117b18a0 [MERGE] forward port of branch saas-3 up to ada9724 2014-08-28 16:21:27 +02:00
Ravish Murari bc3991b4c5 [FIX] board: Do not offer to create dashboard when there is no action
In case we have no defined action (e.g. redirection by python code), adding a dashboard should not be possible as the rendering based on the action.
This patch hides the 'Add to Dashboard' button in search view (opw 611288)
2014-08-25 12:03:12 +02:00
Géry Debongnie a54aac38f6 [IMP] lazy loading of dashboards
The widget AddToDashboard used to make an ajax call every time the
search view is loaded.  This is often useless and can be annoying when
that request is long.  With this patch, the request is only done when
the user click on the widget AddToDashboard
2014-08-21 11:48:37 +02:00
Florian Hatat eb486ae127 [FIX] board: add missing _t() calls to enable translation in dashboard.js
Fixes LP bug https://bugs.launchpad.net/openobject-addons/+bug/1205798
2014-07-14 12:23:44 +02:00
ged-odoo 74168c4e9d Merge pull request #272 from odoo-dev/master-inline-searchview-ged
[MERGP] Inline Searchview

This task split the searchview in two parts: SearchView and SearchViewDrawer. The drawer is displayed inside the main view and the searchview stays in place.  It also changes the scrolling behavior of the web client: the main view area can scroll without affecting the UI (so the various menus stays in place)

Because of this, other large changes have been made:

the drawer has been redesigned,
the Custom Filter widget has been split in two (Custom Report and SaveCurrentFilter),
the main view is now scrollable, so the UI stays in place and only the view can change
The text 'Group By...' has been changed into 'Group By' (most addons had to be modified)
bootstrap classes are used when it makes sense (for example, badge)
the left menu is also scrollable (separately from the main view)

It is likely that some stupid bugs have been introduced.  Please don't hurt me.
2014-06-12 16:27:11 +02:00
Fabien Meghazi faa09da325 Removed version="7.0" from form views 2014-06-12 09:09:59 +02:00
Géry Debongnie 3bfdcfd443 [FIX] fix the add to dashboard widget (web client)
The dashboard widget didn't work because it tried to look for its
parent view, but the searchview has been split in searchview and drawer.
This patch makes sure it looks for the data in the correct place.
2014-05-30 14:34:36 +02:00
Géry Debongnie 271b925a12 [FIX] correct default value in add to dashboard
the searchview has been split in two: searchview and searchviewdrawer.
The widget addtodashboard need to get the name from the searchview and
not from the drawer.
2014-05-30 09:46:40 +02:00
Géry Debongnie 1602ba44c9 [FIX] correctly include some inputs in drawer
The search view has been split into two widgets: SearchView
and SearchViewDrawer.  The addons board and google_spreadsheet need
to be updated to append their input widget to SearchViewDrawer and
not to SearchView.
2014-05-27 14:44:21 +02:00
Cedric Snauwaert fd986acc3d [FIX]dashboard: change layout correct use of modal object
bzr revid: csn@openerp.com-20140424150255-77emom1swsfry72h
2014-04-24 17:02:55 +02:00
Cedric Snauwaert 0b832930b6 [FIX]modal: missing new object instanciation in dashboard
bzr revid: csn@openerp.com-20140416151646-aoc4myqsxruqovc3
2014-04-16 17:16:46 +02:00
Cedric Snauwaert 3a4e264978 [FIX]use bootstrap modal windows. refactor and cleaned from trunk-ui-to-boostrap-modal
bzr revid: csn@openerp.com-20140410155022-3cqys3zc55idc4vg
2014-04-10 17:50:22 +02:00
Martin Trigaux 1f968d8a76 [FIX] board: keep group by in context when adding to dashboard
lp bug: https://launchpad.net/bugs/1187512 fixed

bzr revid: mat@openerp.com-20130808150040-ki91kbfie9ink8u0
2013-08-08 17:00:40 +02:00
Olivier Dony 706f804afc [MERGE] OPW 590511: dashboard: make list of dashboards translated
lp bug: https://launchpad.net/bugs/1165321 fixed

bzr revid: odo@openerp.com-20130607172928-zoji4p7jqxkzvy11
2013-06-07 19:29:28 +02:00
Chirag fd4c5ad7ce [FIX] Fixed dashboard loses first level of grouping.
bzr revid: chirag@chirag-desktop-20130607065919-htu00zf0aw2vniu4
2013-06-07 12:29:19 +05:30
Mohammed Shekha ed7a199519 [FIX]Fixed the issue of translation on add to dashboard selection choices, dashboard choices are not translated.
bzr revid: msh@openerp.com-20130328105213-fjjdntjgtmyxo3by
2013-03-28 16:22:13 +05:30
Olivier Dony 4c75931f6c [FIX] board: hide the "Add To Dashboard" option in search views when current action is incompatible (e.g. client actions don't work in dashboards at the moment)
lp bug: https://launchpad.net/bugs/1157896 fixed

bzr revid: odo@openerp.com-20130321114605-2ddj46q2pkswm36b
2013-03-21 12:46:05 +01:00
Fabien Meghazi 864543d0b8 [FIX] IE9: traceback in Reporting when changing type of view
lp bug: https://launchpad.net/bugs/1091715 fixed

bzr revid: fme@openerp.com-20130221221314-0n1q4k2c373yzrc3
2013-02-21 23:13:14 +01:00
Fabien Meghazi 44b5f56a00 [FIX] Dashboards: board widgets lose their filter
This was a leftover during the evalpocalypse

lp bug: https://launchpad.net/bugs/1130646 fixed

bzr revid: fme@openerp.com-20130221125323-j01mfl1tfhr5np26
2013-02-21 13:53:23 +01:00
Xavier Morel 58e256093d [FIX] board: missed JS-ification of context and domains evaluations
various contexts and domains would remain unevaluated during the loading of board actions, leading to errors down the line

bzr revid: xmo@openerp.com-20121207104933-p1fmog7ohljs9wfc
2012-12-07 11:49:33 +01:00
Xavier Morel ec3a720728 [REM] python-side evaluations of contexts and domains in dashboard controller
bzr revid: xmo@openerp.com-20121126140423-waptfrxe4gbidpnv
2012-11-26 15:04:23 +01:00
Fabien Meghazi a2715888c1 [IMP] jQuery deferred API changes refactoring. Changed 'then's in 'done'/'fail' and 'pipe's in 'then'
bzr revid: fme@openerp.com-20121031103148-r1slfpl2kcnajjd3
2012-10-31 11:31:48 +01:00
Antony Lesuisse 59ddf58bb4 [MERGE] callback2deffered rpc
bzr revid: al@openerp.com-20121015133334-4fmbsa14r23laljs
2012-10-15 15:33:34 +02:00
vta vta@openerp.com 31760fd249 [FIX] Fixed on_record_loaded.
bzr revid: vta@openerp.com-20121010100218-drvx420qtrjucom1
2012-10-10 12:02:18 +02:00
Vidhin Mehta (OpenERP) 5645a84a16 [IMP]replace add* method.
bzr revid: vme@tinyerp.com-20121009124908-r33qqpx15ea39p78
2012-10-09 18:19:08 +05:30
ggh-openerp 1fe81f3a96 [IMP] In rpc method remove callback and modify related code
bzr revid: ggh@tinyerp.com-20121003123412-22o4t380ipsmns2e
2012-10-03 18:04:12 +05:30