diff options
| author | Denis Vermylen (dve) <dve@odoo.com> | 2016-08-12 14:25:23 +0200 |
|---|---|---|
| committer | Denis Vermylen (dve) <dve@odoo.com> | 2016-08-12 14:30:22 +0200 |
| commit | 856f2e87e645db697a67fc85caae07bf0fe11d3f (patch) | |
| tree | f821e96da5e2d1dc6d22a448281b4ed65f6c1d2b /addons | |
| parent | 93f60ff0efc99e9edb6064bb652f8eb43eef4f49 (diff) | |
[IMP] hr_attendance: improve presence indicator
Employee presence indicator in kanban view could previously be confused with
other status indicators from other models that indicated that it was ready for
next stage (green dot).
improved by using fa-user symbol instead of dot.
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/hr_attendance/static/src/js/presence_widgets.js | 12 | ||||
| -rw-r--r-- | addons/hr_attendance/static/src/less/hr_attendance.less | 17 | ||||
| -rw-r--r-- | addons/hr_attendance/static/src/xml/attendance.xml | 9 |
3 files changed, 15 insertions, 23 deletions
diff --git a/addons/hr_attendance/static/src/js/presence_widgets.js b/addons/hr_attendance/static/src/js/presence_widgets.js index c74f8d82249..50353484658 100644 --- a/addons/hr_attendance/static/src/js/presence_widgets.js +++ b/addons/hr_attendance/static/src/js/presence_widgets.js @@ -19,11 +19,11 @@ var FormPresenceIndicator = form_common.AbstractField.extend({ return this._super(); }, render_value: function() { - this.$('.oe_hr_attendance_form_status').toggleClass("oe_hr_attendance_form_status_green", this.get_value() == 'checked_in'); - this.$('.oe_hr_attendance_form_status').toggleClass("oe_hr_attendance_form_status_red", this.get_value() == 'checked_out'); + this.$('.oe_hr_attendance_status').toggleClass("oe_hr_attendance_status_green", this.get_value() == 'checked_in'); + this.$('.oe_hr_attendance_status').toggleClass("oe_hr_attendance_status_red", this.get_value() == 'checked_out'); }, display_field: function() { - this.$el.html(QWeb.render("FormPresenceIndicator")); + this.$el.html(QWeb.render("PresenceIndicator")); }, }); @@ -38,11 +38,11 @@ var KanbanPresenceIndicator = kanban_widgets.AbstractField.extend({ return this._super(); }, render_value: function() { - this.$('.oe_kanban_status').toggleClass("oe_kanban_status_green", this.field.raw_value == 'checked_in'); - this.$('.oe_kanban_status').toggleClass("oe_kanban_status_red", this.field.raw_value == 'checked_out'); + this.$('.oe_hr_attendance_status').toggleClass("oe_hr_attendance_status_green", this.field.raw_value == 'checked_in'); + this.$('.oe_hr_attendance_status').toggleClass("oe_hr_attendance_status_red", this.field.raw_value == 'checked_out'); }, display_field: function() { - this.$el.html(QWeb.render("KanbanPresenceIndicator")); + this.$el.html(QWeb.render("PresenceIndicator")); }, }); diff --git a/addons/hr_attendance/static/src/less/hr_attendance.less b/addons/hr_attendance/static/src/less/hr_attendance.less index a384ffbcd42..b2b56bbaa0b 100644 --- a/addons/hr_attendance/static/src/less/hr_attendance.less +++ b/addons/hr_attendance/static/src/less/hr_attendance.less @@ -7,20 +7,17 @@ box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6); } -.oe_hr_attendance_form_status { - height: .6em; - width: .6em; - border-radius: 50%; +.oe_hr_attendance_status { + font-size: 1.2em; margin-right: .3em; display: inline-block; + color: @odoo-brand-secondary; - background-color: @odoo-brand-secondary; - - &.oe_hr_attendance_form_status_green { - background-color: @brand-success; + &.oe_hr_attendance_status_green { + color: @brand-success; } - &.oe_hr_attendance_form_status_red { - background-color: @brand-danger; + &.oe_hr_attendance_status_red { + color: @brand-danger; } } diff --git a/addons/hr_attendance/static/src/xml/attendance.xml b/addons/hr_attendance/static/src/xml/attendance.xml index 7d0ea6caae6..420dc1b4988 100644 --- a/addons/hr_attendance/static/src/xml/attendance.xml +++ b/addons/hr_attendance/static/src/xml/attendance.xml @@ -1,12 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <template xml:space="preserve"> - <t t-name="KanbanPresenceIndicator"> - <div class="oe_kanban_status"> - </div> - </t> - - <t t-name="FormPresenceIndicator"> - <div class="oe_hr_attendance_form_status"> + <t t-name="PresenceIndicator"> + <div class="oe_hr_attendance_status fa fa-user"> </div> </t> |
