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.
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).
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.
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.
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
- 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
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.
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#6896fixes#6869
opw-640921
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())).
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.
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.
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.
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.
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().
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.
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