Commit Graph
313 Commits
Author SHA1 Message Date
qsm-odoo 91ffe91f7d [IMP] web_calendar: calendar dimension/scroll/resize
The calendar has now a minimum height so that it appears bigger in
mobile. In mobile the height cannot be computed to maximum because
the webclient has not 100% fixed height. The height has been set
so that in appears maximum on a 720p android mobile on chrome at
the time of this commit.

The calendar is now also resizing itself correctly after a window
resize.

Before this commit, it was impossible to scroll the calendar
horizontally if needed. Notice that the solution breaks the full
calendar layout and require JS scrolling so that the events are
still positionned correctly.
2015-09-29 15:14:39 +02:00
qsm-odoo 4e20e44303 [FIX] web_calendar: calendar height
Calendar height was again a problem since the introduction of the
bootstrap layout (the .row had not height 100% and thus the calendar
was not able to compute its height anymore).
2015-09-25 18:10:55 +02:00
Thibault Delavallée 30e2d45ba7 [FIX] web_calendar: CompoundDomainnow in data, not instance.web anymore 2015-09-24 16:20:53 +02:00
Christophe Simonis 57168a9e90 [MERGE] forward port of branch saas-6 up to a669433 2015-09-23 14:34:26 +02:00
Olivier Dony 43a12e99bd [FIX] calendar: filter events by attendees when sidebar is used with useContacts
Add some missing deferred chains + change domain for loading calendar.events.
2015-09-17 13:57:04 +02:00
Christophe Simonis fb83a5479c [FIX] web_calendar: allow destroy of a non-loaded view 2015-09-07 12:08:08 +02:00
qsm-odoo 86f62ee559 [FIX] web_calendar: Calendar LESS layout (bootstrap)
Calendar row was not in a container and had so alignement problems
since the reintroduction of bootstrap grid gutter.
2015-09-02 13:22:36 +02:00
Christophe Simonis fc68565ea2 [FIX] web_calendar: fix typo in template 2015-08-24 20:45:46 +02:00
Christophe Matthieu 6baf611df1 [IMP] web: create generic controller '/web/content' and '/web/image'
Replace deprecate controllers like /web/binary/image, /web/binary/saveas...
Use ETag for all content with 'unique' option to cache the content if the content is never changed.
2015-08-21 22:06:52 +02:00
Christophe Matthieu ea3bfe1bd5 [FIX] web: readonly fields not transferred from dialog to 2many field
Transfer options to 'data_create' and 'data_update'
Add tour to check the fix
2015-08-17 10:17:58 +02:00
Aaron Bohy 6658c65851 [IMP] web_calendar: quick create: generic text
as the quick create is also used to create e.g. leads, not only events.
2015-08-17 09:27:44 +02:00
Aaron Bohy 40971b1b4f [FIX] calendar,web_calendar: calendar.event: start field readonly
The start field is a computed field but it doesn't have any inverse function
(write() is overridden in calendar.event to, among other things, play the
role of the missing inverse function). It is thus automatically set as
readonly, and the events can't be dragged and dropped in the calendar view,
since rev. d6d3d098 in which we start checking if the start_date is readonly
or not before allowing the drag and drop.

This rev. simply adds a "do_nothing" inverse function so that the date field
is not readonly.

In web_calendar, the date_start attribute is mandatory so fallbacking on
date_end and date_delay is unnecessary.
2015-08-12 15:39:15 +02:00
Aaron Bohy 10f2df8e59 [REF] web(_*): views: view_switcher icon
Add a key icon in the view's prototype corresponding to the font-awesome icon
to display in the view switcher.
2015-08-07 14:05:07 +02:00
Christophe Simonis 95ac2cfd10 [MERGE] forward port of branch saas-6 up to be58335 2015-08-06 16:09:19 +02:00
Christophe Simonis 3d26eb02ab [MERGE] forward port of branch 8.0 up to d3e9bde 2015-08-06 11:54:32 +02:00
Denis Ledoux 91417516ae [FIX] web_calendar: use of selection fields as color filters
Using a selection field as color filters in a calendar view
had as effect to display the second letter of the state name
(The state name string, index 1)
as filter, instead of the full state name.

Besides, the colors of the filters did not match.

e.g., Sales > Sales > Sales Orders > Calendar View

opw-646486
2015-08-05 14:25:45 +02:00
qsm-odoo f330d35324 [FIX] web_calendar: double scrollbar + hour format
* Change 12A -> 11A in 12am -> 11pm
* Compute calendar height so that it fits the web client content height
2015-08-05 11:48:40 +02:00
qsm-odoo 82e166bb6f [FIX] (web_)calendar: Refresh code + Filters
- Contact filters were dropped with the new design
- The 'me' filter was not working correctly (wrong colors)
- Remove some useless/unnecessary code
- Use new API confirm dialogs
- Convert CSS to LESS
2015-07-29 15:00:06 +02:00
Christophe Simonis 2cf91d16a5 [MERGE] forward port of branch saas-6 up to 63e92cb 2015-07-22 16:17:54 +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
Aaron Bohy 45373eb1fc [REM] web_calendar: unused css
it has been converted into less by rev. 46bf047e86 and
is unused since rev. d6d3d0983f.
2015-07-15 13:32:28 +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
Aaron Bohy 9de57b7a7b [IMP] web_calendar: fine tuning less
Use webclient horizontal padding in calendar view for its content
to be well aligned with the rest of the webclient.
2015-07-06 16:07:09 +02:00
Christophe Simonis 4c2a1de75a [MERGE] forward port of branch 8.0 up to 22bd3bd 2015-07-01 18:11:32 +02:00
Olivier Dony e3bd2a5914 [FIX] web_calendar, website: avoid rendering errors with special characters 2015-07-01 17:58:28 +02:00
Christophe Simonis a304194936 [MERGE] forward port of branch saas-6 up to 81b5c60 2015-06-25 00:26:31 +02:00
qsm-odoo 46bf047e86 [IMP] web, web_*, mail, board : New modals and dialogs 2015-06-17 09:49:46 +02:00
qsm-odoo d6d3d0983f [IMP] web, web_calendar: New calendar 2015-06-17 09:49:46 +02:00
Christophe Simonis 4647778758 [MERGE] forward port of branch 8.0 up to ea59856 2015-06-15 12:28:32 +02:00
Nicolas Lempereur 27834a6e9b [FIX] web_calendar: keep default name if event name empty
The name of an event is the name a created record will get.

If the event name of a new event is left empty, the edited record will
also be empty which could be less user friendly.

closes #6896
fixes #6869
opw-640921
2015-05-29 13:18:09 +02:00
Christophe Simonis a9471c43b9 [MERGE] forward port of branch saas-6 up to e941c0f 2015-04-17 15:33:00 +02:00
Christophe Simonis 0e2a453fe2 [MERGE] forward port of branch 8.0 up to ba54a66 2015-04-14 12:22:33 +02:00
Nicolas Lempereur 00099db4f3 [FIX] css: move ie9 targetted rules to ie.css
Moving existing rules targetting IE9 or less to addons/web/static/src/css/ie.css
2015-04-13 18:24:10 +02:00
Aaron Bohy 573341c906 [FIX] Web_calendar: hide the sidebar in dashboards 2015-03-23 12:42:46 +01:00
Christophe Simonis 5aba579e74 [MERGE] forward port of branch saas-6 up to 42db2db 2015-03-21 15:54:05 +01:00
Xavier Morel 4b0a8d4096 [IMP] Web, web_calendar: push_state rendering logic
When a new state is rendered, it is now first appended to a
documentFragment, and then appended to the DOM when ready. Doing so,
there is no more a intermediate step where two widgets are in the DOM,
the new one being appended below.

This required a web_calendar fix:
Not exactly fixed per-se, apparently when fullcalendar is rendered
hidden/out of document it doesn't generate correct range dates, and
calls the events callback with invalid dates. The code would blindly
take those invalid date, get bits out of them (NaN), generate a
timestamp full of NaNs and blindly search() the table with that.

Just skip the events callback entirely if the start or end date of the
current period is invalid (~isNaN(date.valueOf())).
2015-03-20 16:34:42 +01:00
Aaron Bohy 546c07a58f [IMP] Web: Use of a ControlPanel in One2Many Fields
Creation of the One2ManyControlPanel template. The One2ManyControlPanel
can only contain action_buttons and a pager. Typically, in One2Many
Kanban, buttons are displayed (in edit mode) and in One2Many Lists,
the pager is displayed.

Improvement of all Views.buttons templates so that if there is no
button to render, it does not render an empty div. This was necessary
for Kanban buttons to prevent padding when there is no button
displayed. Changes in the other views were motivated by uniformity
concerns. This prevents to add empty div in the DOM as well.
Exception for FormView where the outer div is required for the option
footer_to_buttons to work.

This fixes a bug as the pager is now available in One2Many Lists, which
was not the case before, even if there were more than 80 items in the
list, i.e. some items were unreachable.

cp_bus argument in ViewManager init() is now required. If there is no
ControlPanel to communicate with, a dummy Bus should be given ot the
ViewManager.
2015-03-20 16:34:41 +01:00
Aaron Bohy 913942a327 [FIX] Web_calendar: this.options.$sidebar
The sidebar in Calendar views is not the usual sidebar of the other
views, which should rather be called toolbar and is located in the
ControlPanel. However, the Calendar sidebar was only rendered when
this.options.$sidebar was set, even if this option concerns the toolbar
and is thus nothing to do with the Calendar sidebar.

Also fixes css so that useless scrollbars aren't displayed anymore.
2015-03-20 16:34:41 +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 55acc522b9 [FIX] web_calendar: don't focus quick create when disabled
web_calendar tried to focus the quick create instance, even when it has
been disabled.  Result: boom (example: hr/leave request: click on
calendar).
2015-03-18 12:21:22 +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 0cfbbb6b7f [REF] web_calendar: update to the new module system 2015-03-18 09:01:50 +01:00
Christophe Simonis 24e2cc5b44 [FIX] web_calendar: do not use magic var event.
It works in Chrome, but not in Firefox.
2015-03-16 16:35:55 +01:00
rma-odoo f5a506743e [FIX] web_calendar: Selection fields used as color attributes of calendar view 2015-03-16 13:25:00 +01:00
Xavier Morel e93ead9093 [FIX] web_calendar: error in case of creation with quick_create disabled
Broken in 82fee7dfe8 porting of quick create to Bootstrap modals: in
case quick_create is disabled, the creation of the quick_create dialog
is bypassed and so is defining this.$input, but focus() calls still
happen and blow up.

Create a dummy $input in the constructor so it's alway possible to call
this.$input.focus().
2015-03-13 13:31:25 +01:00
Xavier Morel ef020a2574 [FIX] web_calendar: conversion of moment format strings to fullcalendar
AM/PM format specifier wasn't correctly converted, and was thus
displayed as a literal A/a in fullcalendar
2015-03-10 17:31:08 +01:00
Xavier Morel ddab9f8125 [FIX] web_calendar: display view's @string in quick create dialog
The quick create popup tried to look up the parent's .string and
.name (or the parent's field_widget's) *but* the calendar view didn't
have a .string, and its .name gave priority to the view's name (as
returned by fields_view_get) as opposed to its @string.

Store the view arch's @string to CalendarView#string, so the quick
create dialog can find and use it.
2015-03-10 17:31:07 +01:00
Xavier Morel 82fee7dfe8 [FIX] web_calendar: incorrect style of quick_create dialog
Replace jquery-ui dialog by bootstrap modal
* fixes general styling (jquery-ui styled heading)
* fixes z-index stacking (jquery-ui dialog appeared on top of
  "slow-create" boostrap modal)
* fixes disappeared close button
2015-03-10 17:03:19 +01:00
Christophe Simonis fa75094e6f [MERGE] forward port of branch 8.0 up to 4af53de
ignore .po and .pot changes
2015-02-03 18:47:42 +01:00
Randhir Mayatra 23dc795ff2 [FIX] web_calendar: Selection fields used as color attributes of calendar view
JKE:
 + refactoring
 + auto select previous checkbox
2015-02-02 17:13:39 +01:00