[MIG] gamification: migrated sass to less.

This commit is contained in:
Keyur Gajjar
2016-03-21 14:02:10 +01:00
committed by Yannick Tivisse
parent 4ddc323139
commit bea7b19862
7 changed files with 47 additions and 142 deletions
@@ -1,65 +0,0 @@
.openerp .oe_kanban_view .oe_kanban_card.oe_kanban_goal {
width: 230px;
min-height: 200px;
}
.openerp .oe_kanban_view .oe_kanban_card.oe_kanban_badge {
width: 250px;
min-height: 150px;
}
.openerp .oe_kanban_badge_avatars {
margin-top: 8px;
}
.openerp .oe_kanban_badge_avatars img {
width: 30px;
height: 30px;
padding-left: 0;
margin-top: 3px;
border-radius: 2px;
-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.openerp .oe_margin_top_8 {
margin-top: 8px;
}
.openerp .oe_margin_top_16 {
margin-top: 16px;
}
.openerp .oe_kanban_goal .oe_goal_state_block {
width: 200px;
height: 130px;
margin: auto;
margin-bottom: -20px;
}
.openerp .oe_kanban_goal .oe_goal_state_block .oe_goal_state {
font-size: 2.5em;
font-weight: bold;
padding-top: 30px;
}
.openerp .oe_kanban_goal .oe_goal_state_block .oe_goal_state .fa {
font-size: 3em;
margin-top: -17px;
margin-left: 17px;
}
.openerp .oe_kanban_goal .oe_goal_state_block, .openerp .oe_kanban_goal p {
text-align: center;
}
.openerp .oe_kanban_content .oe_goal_gauge:first-child {
margin: auto;
}
.openerp .oe_kanban_content .oe_goal_gauge svg {
margin-top: -20px;
}
.openerp .oe_no_overflow {
overflow: hidden;
}
.openerp .oe_red {
color: red;
}
.openerp .oe_green {
color: green;
}
.openerp .oe_orange {
color: orange;
}
.openerp .oe_form td .oe_no_padding {
margin-left: -6px;
}
@@ -1,63 +0,0 @@
@charset "utf-8"
.openerp
// Kanban views
.oe_kanban_view
.oe_kanban_card.oe_kanban_goal
width: 230px
min-height: 200px
.oe_kanban_card.oe_kanban_badge
width: 250px
min-height: 150px
.oe_kanban_badge_avatars
margin-top: 8px
img
width: 30px
height: 30px
padding-left: 0
margin-top: 3px
border-radius: 2px
-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2)
.oe_margin_top_8
margin-top: 8px
.oe_margin_top_16
margin-top: 16px
.oe_kanban_goal
.oe_goal_state_block
width: 200px
height: 130px
margin: auto
margin-bottom: -20px
.oe_goal_state
font-size: 2.5em
font-weight: bold
padding-top: 30px
.oe_goal_state
.fa
font-size: 3em
margin-top: -17px
margin-left: 17px
.oe_goal_state_block,p
text-align: center
.oe_kanban_content
.oe_goal_gauge:first-child
margin: auto /* avoid margin-right: 16px */
.oe_goal_gauge
svg
margin-top: -20px
.oe_no_overflow
overflow: hidden
.oe_red
color: red
.oe_green
color: green
.oe_orange
color: orange
// compensate padding from .openerp .oe_form td.oe_form_group_cell + .oe_form_group_cell
.oe_form td .oe_no_padding
margin-left: -6px
@@ -0,0 +1,33 @@
.o_kanban_gamification {
img.o_kanban_badge_avatars {
width: 30px;
height: 30px;
padding-left: 0;
margin-top: 8px;
border-radius: 2px;
-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.o_kanban_content {
.o_goal_state_block {
width: 200px;
height: 130px;
margin: auto;
margin-bottom: -20px;
text-align: center;
.o_goal_state {
font-size: 2.5em;
font-weight: bold;
padding-top: 13px;
}
}
}
.o_red {
color: red;
}
.o_green {
color: green;
}
.o_orange {
color: orange;
}
}
+2 -2
View File
@@ -161,8 +161,8 @@
<field name="create_date"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_card oe_kanban_global_click oe_kanban_badge oe_kanban_color_white">
<div class="oe_kanban_content">
<div class="oe_kanban_card oe_kanban_global_click oe_kanban_badge oe_kanban_color_white o_kanban_gamification">
<div class="o_kanban_content">
<div class="pull-left">
<a type="open"><img t-att-src="kanban_image('gamification.badge', 'image', record.badge_id.raw_value)" t-att-title="record.badge_name.value" width="24" height="24" /></a>
</div>
+3 -3
View File
@@ -145,8 +145,8 @@
<field name="user_ids"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_kanban_goal oe_kanban_global_click">
<div class="oe_kanban_content">
<div t-attf-class="oe_kanban_card o_kanban_gamification oe_kanban_global_click">
<div class="o_kanban_content">
<strong>
<h4 class="text-center"><field name="name"/></h4>
<div class="oe_kanban_project_list text-center">
@@ -157,7 +157,7 @@
</div>
</strong>
<t t-foreach="record.user_ids.raw_value.slice(0,11)" t-as="member">
<img class="oe_kanban_badge_avatars img-rounded oe_margin_top_8" t-att-src="kanban_image('res.users', 'image_small', member)" t-att-data-member_id="member"/>
<img class="o_kanban_badge_avatars" t-att-src="kanban_image('res.users', 'image_small', member)" t-att-data-member_id="member"/>
</t>
</div>
</div>
+1 -1
View File
@@ -3,7 +3,7 @@
<data>
<template id="assets_backend" name="gamification assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/gamification/static/src/css/gamification.css"/>
<link rel="stylesheet" href="/gamification/static/src/less/gamification.less"/>
</xpath>
</template>
</data>
+8 -8
View File
@@ -150,19 +150,19 @@
<field name="definition_description"/>
</t>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_card oe_gamification_goal oe_kanban_goal #{record.end_date.raw_value &lt; record.last_update.raw_value &amp; record.state.raw_value == 'failed' ? 'oe_kanban_color_2' : ''} #{record.end_date.raw_value &lt; record.last_update.raw_value &amp; record.state.raw_value == 'reached' ? 'oe_kanban_color_5' : ''}">
<div class="oe_kanban_content">
<div t-attf-class="oe_kanban_card o_kanban_gamification #{record.end_date.raw_value &lt; record.last_update.raw_value &amp; record.state.raw_value == 'failed' ? 'oe_kanban_color_2' : ''} #{record.end_date.raw_value &lt; record.last_update.raw_value &amp; record.state.raw_value == 'reached' ? 'oe_kanban_color_5' : ''}">
<div class="o_kanban_content">
<p><strong><h4 class="oe_goal_name text-center" tooltip="kanban-tooltip"><field name="definition_id" /></h4></strong></p>
<div class="pull-left">
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" />
</div>
<field name="user_id" />
<div class="oe_goal_state_block">
<div class="o_goal_state_block">
<t t-if="record.definition_display.raw_value == 'boolean'">
<div class="oe_goal_state">
<t t-if="record.state.raw_value=='reached'"><i class="oe_green fa fa-check" title="Goal Reached"/></t>
<t t-if="record.state.raw_value=='inprogress'"><i class="fa fa-clock-o" title="Goal in Progress"/></t>
<t t-if="record.state.raw_value=='failed'"><i class="oe_red fa fa-times" title="Goal Failed"/></t>
<div class="o_goal_state text-center">
<t t-if="record.state.raw_value=='reached'"><i class="o_green fa fa-check fa-3x" title="Goal Reached"/></t>
<t t-if="record.state.raw_value=='inprogress'"><i class="fa fa-clock-o fa-3x" title="Goal in Progress"/></t>
<t t-if="record.state.raw_value=='failed'"><i class="o_red fa fa-times fa-3x" title="Goal Failed"/></t>
</div>
</t>
<t t-if="record.definition_display.raw_value == 'progress'">
@@ -170,7 +170,7 @@
<field name="current" widget="gauge" style="width:160px; height: 120px;" options="{'max_field': 'target_goal', 'label_field': 'definition_suffix'}" />
</t>
<t t-if="record.definition_condition.raw_value != 'higher'">
<div t-attf-class="oe_goal_state #{record.current.raw_value == record.target_goal.raw_value+1 ? 'oe_orange' : record.current.raw_value &gt; record.target_goal.raw_value ? 'oe_red' : 'oe_green'}">
<div t-attf-class="o_goal_state #{record.current.raw_value == record.target_goal.raw_value+1 ? 'o_orange' : record.current.raw_value &gt; record.target_goal.raw_value ? 'o_red' : 'o_green'}">
<t t-esc="record.current.raw_value" />
</div>
<em>Target: less than <t t-esc="record.target_goal.raw_value" /></em>