summaryrefslogtreecommitdiff
path: root/addons/web/static/src/scss/web_calendar.scss
AgeCommit message (Collapse)Author
2021-02-15[FIX] web: show more text of short calendar eventNicolas Lempereur
In a4d170ad9 there were some improvment to not show event totally empty on the day calendar view because of different style (font + padding). The lower part of the text was still a little cut, this commit try to improve this for week and day view mode by removing 5 additional pixels. opw-2422700 note: Also fix the fc-short for fullcalendar Odoo, we had this 2019 change: https://github.com/fullcalendar/fullcalendar/commit/e879c430013ed that made it not working without title (odoo use case), in 2020 it was reverted when refactoring for 5.0: https://github.com/fullcalendar/fullcalendar/commit/7c7ce1e8f94b closes odoo/odoo#66091 X-original-commit: b856d312be19b0fdf636600a76c4d9b427eedb7c Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-01-22[FIX] web: disallow event popup y-overflow in calendar viewAndrea Grazioso (agr-odoo)
Go to calendar Have an event with a long description In day/week/month view click the event to see the event popup The description will overflow the length of the popup opw-2421554 closes odoo/odoo#64817 Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-08-11[REF] web: rework calendar's styleMichael Mattiello (mcm)
This commit reworks the mini calendar's style to make it look like the months in year mode. It also reworks the style of the calendar's popover in modes day, week and month to reduce the differences with the year popover. Task: 2193921
2020-08-11[IMP] base,web: add year scale to calendarMichael Mattiello (mcm)
This commit adds a new year scale to the calendar view. It comes with a new view in the calendar, this view displays a 4x3 grid which cells are month views. Task: 2193921
2020-03-31[REF] calendar,web: update to FullCalendar v4Romeo Fragomeli
This commit updates the FullCalendar library from v3 to v4. The purpose of this update for us is to add a proper support of the drag-and-drop of events on mobile. But also to fix scrolling issues present mainly on smaller screens. In those configurations multi/inner-scrolls were present resulting into either the inability to properly scroll the desired content or even blocking alltogether the scroll. As a nice-to-have feature, the version 4 removes its dependency on the jQuery library, allowing a faster loading of a bigger set of events. Last but not least, this version also reduces its dependency on the Moment.js library (but still keeps a binding to it for compatibility purpose). This commit focus only on the update of the library itself and the adaptation of the related code to keep it working. Further enhancements/fixes will be done later on. To do so it modifies the following points: * Update the library in itself (js, css...). * Convert all FullCalendar's method calls to the new syntax (e.g. `$calendar.fullCalendar('destroy')` becomes `calendar.destroy()`). * Add a utility method to convert v4 events into the old v3 event structure to ease the transition from one version to the other. * Wrap all event's custom fields into a new event's `extendedProps` object (as its the new way of storing them instead of directly as a prop. of the event). * Adapt `slotLabelFormat` and `weekNumberCalculation`. * Use the view's new names: ** `agendaDay` -> `timeGridDay` ** `agendaWeek` -> `timeGridWeek` ** `month` -> `dayGridMonth` * Use the option's new names: ** `viewRender` -> `datesRender` ** `eventMouseover` -> `eventMouseEnter` ** `eventMouseout` -> `eventMouseLeave` ** `isRTL` -> `dir` ** `selectHelper` -> `selectMirror` ** `weekNumberTitle` -> `weekLabel` Ref: https://fullcalendar.io/docs/upgrading-from-v3 Task ID: 2092550
2020-03-26[FIX] web: show title for short event in day viewNicolas Lempereur
In 13.0, as of 369c20a9 there is some style that will show an event with bigger font-size and spacing in calendar day view. In this commit, if an event is short (less than 30 pixels, so less than 45 minutes) we will decrease the spacing to have the same as in week view and see the event title more easily. opw-2216654 closes #48391 closes odoo/odoo#48409 X-original-commit: a4d170ad9e73d1d63404532b161911df020b5c36 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-01-27[IMP] calendar: Improve color and filtersjbm-odoo
Now in a calendar view, if we use the color, attribute, it will use the same color as Gantt views and the color picker widget. The attribute color isn't more set as default in filter because it make, in most situation, no sense to filter by color. Now, we can add new filters in the right panel. To do that, we must add the attribute "filter='1'" in the corresponding field line. And if the filter has no direct link with the color of the model, we can specify an attribute 'color' for this filter line block. (for example color='color', and the color of the related model will be used) TaskID: 2153249
2020-01-27[IMP] web: fixed column widths in datepickerHardik Prajapati
task - 2166438 closes odoo/odoo#42999 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-01-24[IMP] web: show start time of regular event in calendarPriyanka Kakadiya
With this commit, the start time of single day events is displayed in the calendar view, in month mode. This only applies to non allday events. This can be disabled by setting (already existing) option 'hide_time' to true on the calendar arch. task-2058477 Co-authored-by: Mohammed Shekha <msh@odoo.com>
2019-12-09[REV] web: reverts update to fontawesome 5.11.2Kevin Baptiste
This reverts commit ff1c35513aecef5fbc30f7c2f3834450e719714e. closes odoo/odoo#41480 X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc Related: odoo/enterprise#7110 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28[FIX] web: typo calendar highlight -> ok nowNicolas Lempereur
Adapt calendar highlight option (that "highlight" event linked to the record we come from) to current JS framework data structures. note: this changeset also fixes the original `_compute_is_highlighted` that was would trigger CacheMiss errors, and also adds back the CSS for highlighting that was lost between 12.0 and 13.0 version. opw-2131494 closes #40791 closes odoo/odoo#41077 X-original-commit: da56e3e7036ecdb3905f4152778e853e080e0163 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-11-28[IMP] web: update to fontawesome 4.7.0 to 5.11.2Kevin Baptiste
FontAwesome 5 introduced new names for some icons as described on https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes This commit replaces the old names to the new ones. closes odoo/odoo#35826 Taskid: 2050241 Related: odoo/enterprise#5180 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-06[IMP] web: Add support to display unusual days in greenjbm-odoo
Purpose ======= Allow to add an attribute ``show_unusual_days="True"`` to display some days in green, according to a linked method ``get_unusual_days`` that should be defined on the related model to return all the concerned days for a given period.
2019-09-12[REF] web: extend ui colourssri-odoo
closes odoo/odoo#36781 Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-08-07[REF] web: refactor the calendar viewsri-odoo
Improve design and introducing several usability improvements: - Removed customization of an event card, just display event title. - Added popover, popover consist of two sections: 1) Show the title, date and time of an event. Date and time are automatically computed according to the user timing preferences, language and event duration. Can be hidden with hide_date/hide_time attribute respectively. 2) Display all the fields specified inside the <calendar/> element. fields can be specified with a widget and its options. e.g. <field name="name" string="Custom Name" widget="char" options="{}"/> - Show avatar in popover for filters. - Removed hide sidebar feature. - Increase readability using a better color selection. - Better UI in mobile. And, Adapted test cases Task 1919926 Co-authored-by: jat-odoo <jat@openerp.com>
2019-02-08[REF] web: extract calendar mobile stylingRomain Estievenart
Extract mobile calendar styling into dedicated SCSS file. Task ID: 1891955
2018-07-27[REF] *: BS4, review color systemqsm-odoo
Odoo used to declare two main colors: primary and optional (which are purple and turquoise in enterprise). Those were respectively assigned to the 'primary' bootstrap variable and the 'btn-primary' bootstrap variable. BS4, however, does not allow to have a different primary color for buttons. Instead, the 'primary' color is used for all 'primary' related components and utility classes, same as for all other colors. So, if we want to keep our enterprise buttons green, our 'optional' colors had to become our 'primary' color. The old odoo primary is then renamed to the 'odoo' color. The palette of grays is now larger by default and is numbered from 100 to 900 alongside the $black and $white variables. The equivalence for older variables and the way we used them is: $gray-darker -> gray 900 (unused before) $gray-dark -> gray 900 $gray -> gray 700 $gray-light -> gray 600 $gray-lighter-darker -> gray 400 (the old variable was created by us) $gray-lighter-dark -> gray 300 (the old variable was created by us) $gray-lighter -> gray 200 Fortunately, the 'lighter' variations we created fit well in the default BS4 system ! Unfortunately, our $gray-lighter which carried the same function as $gray-200 (see above) is very close to the new default $gray-100 and quite distant from the new $gray-200. This will be handled in the next commit.
2018-07-27[REF] *: BS4, adapt media queriesqsm-odoo
media queries that target a specific screen size handled by bootstrap have now a more convenient way to be defined: ``` @​media (min-width: $screen-sm-min) { ... } -> @​include media-breakpoint-up(sm) { ... } ``` ``` @​media (max-width: $screen-sm-max) { ... } -> @​include media-breakpoint-down(sm) { ... } ``` ``` @​media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { ... } -> @​include media-breakpoint-only(sm) { ... } ``` ``` @​media (min-width: $screen-sm-min) and (max-width: $screen-md-max) { ... } -> @​include media-breakpoint-between(sm, md) { ... } ``` Also, bootstrap has changed the values for its default screen sizes: ------------------ | BS3 | BS4 | ------------------ 0 | XS | XS | -> Portrait Mobile 576 | / | SM | -> Landscape Mobile 768 | SM | MD | -> Portrait Tablet 992 | MD | LG | -> Landscape Tablet / Small Desktop 1200 | LG | XL | -> Desktop ------------------ While it is possible to configure BS variables to behave as BS3, we took the decision to keep the BS4 variables untouched. BS4 system seems indeed better and having the purest bootstrap possible is better for Odoo to be used as a framework.
2018-07-27[REF] *: get rid of vendor prefixesqsm-odoo
BS4 do not provide vendor prefixes scss mixins anymore as it is meant to be used with the 'autoprefixer' library. As we only support the last version of every major browsers in Odoo, we took the decision to not use the library as it was also complex to integrate in Odoo. We decided to do the library's work by hand if it ever become necessary.
2018-04-18[REF] *: review scss variables handlingqsm-odoo
Unlike LESS, SCSS variables are not lazy loaded. Our system has thus to be updated. This commit creates new templates which are t-called in assets bundles (to replace the old less_helpers template): - web._assets_utils: regroups the mixins and functions which *can* (and so should) be available in every asset bundle - web._assets_primary_variables: regroups the variables (or mixins used as variables) which *can* (and so should) be available in every asset bundle - web._assets_secondary_variables: same as above but provides an environnement where all the 'primary' ones are accessible. This is for example useful to handle the community/enterprise split: // Community primary variables $o-pink-color: pink; // enterprise color $o-brand-primary: blue; // Enterprise primary variables $o-brand-primary: $o-pink-color; // Community secondary variables $o-my-darker-primary: darken($o-brand-primary, 5%); => If there was only one variable template, enterprise edition would have been able to define its primary color at the end but the darker primary would not have been updated. Using the "!default" system and putting enterprise definition above would not have solved the problem as the $o-pink-color would not have been accessible. - web._assets_backend_helpers: regroups the variables, mixins and functions which *can* (and so should) be available in the backend asset bundle only. This is especially (only?) useful for bootstrap variables overriddes. - web._assets_frontend_helpers: regroups the variables, mixins and functions which *can* (and so should) be available in the frontend asset bundle only. This is especially (only?) useful for bootstrap variables overriddes. Note: bootstrap variables are not accessible in any of those anymore. If you have variables that should depend on bootstrap, you have 3 solutions: - Find another way: your variable is probably useless, use bootstrap variables directly or create a variable that will influence the value of bootstrap variables. E.g. instead of declaring: `$myvar: $bootstrapvar * 3` and using $myvar alone, declare: `$myvar: 3` and use `$myvar * $bootstrapvar` where needed. - Declare a copy of the bootstrap variable and use that one. In that case, you should also force-set the real bootstrap one to be sure they match (this should be done in appropriate templates mentioned above). E.g. ``` $o-boostrapvar: 5; ... $boostrapvar: $o-bootstrapvar; ``` - Set your variable to null and set it to your bootstrap expression in the file you will need it (where bootstrap variables are accessible) without forgetting to add the !default flag to allow overriddes. ``` $myvar: null; ... $myvar: $bootstrapvar * 5 !default; ``` This commit also partly changes the variable names to follow the convention: $o-<app_id>-<name> where 'app_id' is the current's app name or a meaningful unique identifier ("theme" for all themes for example, as no multiple themes can be installed).
2018-04-18[REF] *: convert less content to scss contentqsm-odoo
Convert content so that the assets compile on app installation. The style is still broken after this as the variables/mixins/... are not defined in the right order (as it did not matter in LESS but does in SCSS). This commit basically changes: - Variables: @​var_hello -> $var-hello - Mixins: .mixin_world() {} -> @​mixin mixin-world {} - Classes used as mixin: .my_class() -> @​extend .my_class - Here there were no other solution than to convert the use of a mixin call by the use of an extend as a first approximation - LESS functions -> SCSS functions (e.g. fade -> rgba) - Move first variable definition before the variable is used - Still need to make sure last variable definition is at the right place
2018-04-18[REF] *: rename all LESS files to SCSSqsm-odoo
This is a simple renaming without adaptation.