background: white;
background: white !important;
min-width: 100%;
+ padding-right: 9px !important;
}
.dropdown-menu.state li a, .dropdown-menu.state li a:hover, .dropdown-menu.state li a:focus {
background: white
background: white !important
min-width: 100%
+ padding-right: 10px !important
.dropdown-menu.state li a, .dropdown-menu.state li a:hover, .dropdown-menu.state li a:focus
text-decoration: none
color: #333
this._super(field_manager, node);
},
prepare_dropdown_selection: function() {
- return [{ 'name': 'normal', 'state_name': ' In Progress', 'state_class': 'btn-default' },
- { 'name': 'blocked', 'state_name': ' Blocked', 'state_class': 'btn-danger' },
- { 'name': 'done', 'state_name': ' Ready', 'state_class': 'btn-success' }]
+ return [{ 'name': 'normal', 'state_name': ' In Progress', 'state_icon': '<img src="/web/static/src/img/icons/gtk-normal.png"/>' },
+ { 'name': 'blocked', 'state_name': ' Blocked', 'state_icon': '<img src="/web/static/src/img/icons/gtk-no.png"/>' },
+ { 'name': 'done', 'state_name': ' Ready', 'state_icon': '<img src="/web/static/src/img/icons/gtk-yes.png"/>' }]
},
render_value: function() {
var self = this;
<t t-name="DropdownSelection">
<span class="btn-group">
<t t-foreach="states" t-as="rec">
- <a t-att-class="'btn btn-xs '+ rec.state_class" t-if="widget.get('value') === rec.name" t-att-title="rec.state_name" >
- <t t-raw="rec.state_name"/>
- <a t-att-class="'oe_legend btn btn-xs dropdown-toggle '+rec.state_class" data-toggle="dropdown">
+ <a t-att-class="'btn btn-default btn-xs'" t-if="widget.get('value') === rec.name" t-att-title="rec.state_name" >
+ <t t-raw="rec.state_icon"/>
+ <a t-att-class="'oe_legend btn btn-default btn-xs dropdown-toggle'" data-toggle="dropdown">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span> </a>
</a>
<ul class="dropdown-menu state" role="menu">
<t t-foreach="states" t-as="rec">
<t t-if="widget.get('value') !== rec.name">
- <li class="oe_legend" t-att-data-value="rec.name" ><a href="#"><t t-raw="rec.state_name" /></a></li>
+ <li class="oe_legend" t-att-data-value="rec.name" ><a href="#">
+ <t t-raw="rec.state_icon" />
+ <t t-raw="rec.state_name" /></a>
+ </li>
</t>
</t>
</ul>
this.parent = parent;
},
prepare_dropdown_selection: function() {
- return [{ 'name': 'normal', 'state_name': ' In Progress', 'state_class': 'btn-default' },
- { 'name': 'blocked', 'state_name': ' Blocked', 'state_class': 'btn-danger' },
- { 'name': 'done', 'state_name': ' Ready', 'state_class': 'btn-success' }]
+ return [{ 'name': 'normal', 'state_name': ' In Progress', 'state_icon': '<img src="/web/static/src/img/icons/gtk-normal.png"/>' },
+ { 'name': 'blocked', 'state_name': ' Blocked', 'state_icon': '<img src="/web/static/src/img/icons/gtk-no.png"/>' },
+ { 'name': 'done', 'state_name': ' Ready', 'state_icon': '<img src="/web/static/src/img/icons/gtk-yes.png"/>' }]
},
renderElement: function() {
var self = this;