[IMP]improved kanban state as boostrap btn and dorpdown

bzr revid: mba@tinyerp.com-20140123122600-hqo3g9c5l6r24o3t
This commit is contained in:
Mahendra Barad (OpenERP) 2014-01-23 17:56:00 +05:30
parent c17dd063be
commit a33461433c
4 changed files with 54 additions and 65 deletions

View File

@ -659,10 +659,6 @@
display: block;
color: gray;
}
.openerp .ui-tabs .oe_notebook.ui-tabs-nav li.ui-tabs-active {
border-bottom: none;
padding-bottom: 1px;
}
.openerp .oe_notebook > li.ui-tabs-active > a {
color: #4c4c4c;
}
@ -688,6 +684,10 @@
background-color: #eeeeee;
border-color: #eeeeee #eeeeee #dddddd;
}
.openerp .ui-tabs .oe_notebook.ui-tabs-nav li.ui-tabs-active {
border-bottom: none;
padding-bottom: 1px;
}
.openerp .oe_notebook > li.ui-state-active > a, .openerp .oe_notebook > li.ui-state-active > a:hover {
background-color: white;
border: 1px solid #dddddd;
@ -3575,40 +3575,34 @@ h5 {
color: #eeeeee;
}
.dropdown-menu.with-arrow {
.dropdown-menu.state {
background: white;
background: white !important;
min-width: 73px;
}
.dropdown-menu.with-arrow:before {
position: absolute;
top: -12px;
left: 0px;
display: inline-block;
border-right: 12px solid transparent;
border-bottom: 12px solid #cccccc;
border-left: 12px solid transparent;
border-bottom-color: rgba(0, 0, 0, 0.2);
content: "";
}
.dropdown-menu.with-arrow:after {
position: absolute;
top: -11px;
left: 1px;
display: inline-block;
border-right: 11px solid transparent;
border-bottom: 11px solid white;
border-left: 11px solid transparent;
content: "";
}
.dropdown-menu.with-arrow li a {
color: black;
}
.dropdown-menu.with-arrow li a, .dropdown-menu.with-arrow li a:hover, .dropdown-menu.with-arrow li a:focus {
.dropdown-menu.state li a, .dropdown-menu.state li a:hover, .dropdown-menu.state li a:focus {
text-decoration: none;
color: #333333;
padding-left: 5px;
padding-right: 0px;
}
.btn.btn-xs.btn-danger {
color: white;
text-decoration: none !important;
}
.btn.btn-xs.btn-default {
color: #333333;
text-decoration: none !important;
}
.btn.btn-xs.btn-success {
color: white;
text-decoration: none !important;
}
.ui-icon {
width: 18px;
height: 18px;

View File

@ -2848,32 +2848,24 @@ h5
li
a,a:hover,a:focus
color: #eeeeee
.dropdown-menu.with-arrow
background: #FFF
background: #FFF !important
.dropdown-menu.with-arrow:before
position: absolute
top: -12px
left: 0px
display: inline-block
border-right: 12px solid transparent
border-bottom: 12px solid #ccc
border-left: 12px solid transparent
border-bottom-color: rgba(0, 0, 0, 0.2)
content: ''
.dropdown-menu.with-arrow:after
position: absolute
top: -11px
left: 1px
display: inline-block
border-right: 11px solid transparent
border-bottom: 11px solid #ffffff
border-left: 11px solid transparent
content: ''
.dropdown-menu.with-arrow li a
color: #000
.dropdown-menu.with-arrow li a, .dropdown-menu.with-arrow li a:hover, .dropdown-menu.with-arrow li a:focus
text-decoration: none;
.dropdown-menu.state
background: white
background: white !important
min-width: 73px
.dropdown-menu.state li a, .dropdown-menu.state li a:hover, .dropdown-menu.state li a:focus
text-decoration: none
color: #333
padding-left: 5px
padding-right: 0px
.btn.btn-xs.btn-danger
color: #FFF
text-decoration: none !important
.btn.btn-xs.btn-default
color: #333
text-decoration: none !important
.btn.btn-xs.btn-success
color: #FFF
text-decoration: none !important
// End hack }}}
// Hack for ui icon {{{

View File

@ -2339,9 +2339,9 @@ instance.web.Legend = instance.web.Widget.extend({
this.options = options;
},
prepare_kanban_state_legend: function(){
return [{ 'name': 'normal', 'legend_name': ' Normal', 'legend': '<img src="/web/static/src/img/icons/gtk-normal.png"/>' },
{ 'name': 'blocked', 'legend_name': ' Blocked', 'legend': '<img src="/web/static/src/img/icons/gtk-no.png"/>' },
{ 'name': 'done', 'legend_name': ' Done', 'legend': '<img src="/web/static/src/img/icons/gtk-yes.png"/>' }]
return [{ 'name': 'normal', 'legend_name': ' Normal', 'legend_class': 'btn-default' },
{ 'name': 'blocked', 'legend_name': ' Blocked', 'legend_class': 'btn-danger' },
{ 'name': 'done', 'legend_name': ' Done', 'legend_class': 'btn-success' }]
},
prepare_priority_legend: function(){
var data = [];

View File

@ -1035,14 +1035,17 @@
<t t-name="Legend.kanban_state">
<span class="btn-group">
<t t-foreach="legends" t-as="rec">
<a class="dropdown-toggle oe_legend" data-toggle="dropdown" href="#" t-if="widget.get('value') === rec.name" t-att-title="rec.legend_name" >
<t t-raw="rec.legend" />
<a t-att-class="'btn btn-xs '+ rec.legend_class" t-if="widget.get('value') === rec.name" t-att-title="rec.legend_name" >
<t t-raw="rec.legend_name"/>
<a t-att-class="'oe_legend btn btn-xs dropdown-toggle '+rec.legend_class" data-toggle="dropdown">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span> </a>
</a>
</t>
<ul class="dropdown-menu with-arrow">
<ul class="dropdown-menu state" role="menu">
<t t-foreach="legends" 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.legend" /><t t-raw="rec.legend_name" /></a></li>
<li class="oe_legend" t-att-data-value="rec.name" ><a href="#"><t t-raw="rec.legend_name" /></a></li>
</t>
</t>
</ul>