[IMP] better UI
bzr revid: mat@openerp.com-20130409144030-rb609qteloq3vrgf
This commit is contained in:
parent
0f2dad413b
commit
5fe85f2278
|
@ -139,7 +139,7 @@
|
|||
<field name="type_condition"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_card oe_kanban_global_click oe_kanban_goal oe_kanban_color_#{record.state.raw_value}">
|
||||
<div t-attf-class="oe_kanban_card oe_kanban_global_click oe_kanban_goal">
|
||||
<div class="oe_kanban_content">
|
||||
<div class="oe_kanban_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" />
|
||||
|
@ -148,19 +148,7 @@
|
|||
<t t-if="record.type_description.value">
|
||||
<em><field name="type_description"/></em>
|
||||
</t>
|
||||
<div class="oe_goal_gauge">
|
||||
<!-- <p>
|
||||
<span class="oe_goal_current"><t t-esc="Math.round(record.current.raw_value)"/></span>/<span class="oe_goal_target"><t t-esc="Math.round(record.target_goal.raw_value)"/></span>
|
||||
<t t-if="record.type_unit.value"><field name="type_unit"/></t>
|
||||
<t t-if="record.type_condition.raw_value == 'higher'">
|
||||
⟨<t t-esc="Math.round(record.completeness.raw_value)"/>%%⟩
|
||||
</t>
|
||||
<br/>
|
||||
<span class="oe_goal_id"><t t-esc="record.id.raw_value"/></span>
|
||||
|
||||
<small>End: <field name="end_date" /></small>
|
||||
</p> -->
|
||||
</div>
|
||||
<div class="oe_goal_gauge"></div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
|
|
@ -3,21 +3,6 @@
|
|||
.openerp .oe_kanban_view .oe_kanban_card.oe_kanban_badge {
|
||||
width: 220px;
|
||||
min-height: 160px;
|
||||
/*height: 200px;*/
|
||||
}
|
||||
.openerp .oe_kanban_view .oe_kanban_card.oe_kanban_color_reached {
|
||||
background-color: #A1FF81;
|
||||
color: #0B1907;
|
||||
}
|
||||
.openerp .oe_kanban_view .oe_kanban_card.oe_kanban_color_failed {
|
||||
background-color: #ffc7c7;
|
||||
color: #7a3737;
|
||||
}
|
||||
.openerp .oe_kanban_view .oe_kanban_card.oe_kanban_color_draft,
|
||||
.openerp .oe_kanban_view .oe_kanban_card.oe_kanban_color_canceled {
|
||||
background-color: #E6E6E6;
|
||||
color: #585858;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.oe_kanban_badge_avatars {
|
||||
|
|
|
@ -125,8 +125,7 @@ openerp.gamification = function(instance) {
|
|||
if (self.view.dataset.model === 'gamification.goal' && self.$el.find('.oe_goal_gauge').length == 1) {
|
||||
var unique_id = _.uniqueId("goal_gauge_");
|
||||
self.$el.find('.oe_goal_gauge').attr('id', unique_id);
|
||||
console.log(self.$el.find('.oe_goal_gauge').empty().get(0));
|
||||
// debugger;
|
||||
|
||||
var g = new JustGage({
|
||||
id: unique_id,
|
||||
node: self.$el.find('.oe_goal_gauge').empty().get(0),
|
||||
|
@ -134,9 +133,13 @@ openerp.gamification = function(instance) {
|
|||
min: 0,
|
||||
max: self.record.target_goal.raw_value,
|
||||
title: self.record.type_id.value,
|
||||
relativeGaugeSize: true
|
||||
relativeGaugeSize: true,
|
||||
levelColors: [
|
||||
"#f9c802",
|
||||
"#ff0000",
|
||||
"#a9d70b"
|
||||
]
|
||||
});
|
||||
console.log(g);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -831,9 +831,7 @@ function humanFriendlyNumber( n, d ) {
|
|||
function getStyle(oElm, strCssRule){
|
||||
var strValue = "";
|
||||
if(document.defaultView && document.defaultView.getComputedStyle){
|
||||
console.log(oElm);
|
||||
strValue = document.defaultView.getComputedStyle(oElm).getPropertyValue(strCssRule);
|
||||
console.log(strValue, strCssRule);
|
||||
}
|
||||
else if(oElm.currentStyle){
|
||||
strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){
|
||||
|
|
Loading…
Reference in New Issue