Brand new status breadcrum! (TODO: update js for clickable buttons)

bzr revid: mit@openerp.com-20120813182946-ep9231bf7bksyvev
This commit is contained in:
Minh Tran 2012-08-13 20:29:46 +02:00
parent e5b954cad0
commit 45660bff5c
3 changed files with 200 additions and 240 deletions

View File

@ -76,6 +76,7 @@
color: #4c4c4c; color: #4c4c4c;
font-size: 13px; font-size: 13px;
background: white; background: white;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
/* http://www.quirksmode.org/dom/inputfile.html /* http://www.quirksmode.org/dom/inputfile.html
* http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image * http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image
*/ */
@ -159,7 +160,7 @@
.openerp a.button:link, .openerp a.button:visited, .openerp button, .openerp input[type='submit'], .openerp .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button { .openerp a.button:link, .openerp a.button:visited, .openerp button, .openerp input[type='submit'], .openerp .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button {
display: inline-block; display: inline-block;
border: 1px solid #ababab; border: 1px solid #ababab;
color: #404040; color: #4c4c4c;
margin: 0; margin: 0;
padding: 3px 12px; padding: 3px 12px;
font-size: 13px; font-size: 13px;
@ -1941,7 +1942,6 @@
background-image: -o-linear-gradient(top, #fcfcfc, #dedede); background-image: -o-linear-gradient(top, #fcfcfc, #dedede);
background-image: linear-gradient(to bottom, #fcfcfc, #dedede); background-image: linear-gradient(to bottom, #fcfcfc, #dedede);
padding: 0 8px; padding: 0 8px;
line-height: 30px;
} }
.openerp .oe_form header ul { .openerp .oe_form header ul {
display: inline-block; display: inline-block;
@ -1963,141 +1963,135 @@
.openerp .oe_form div.oe_form_configuration label { .openerp .oe_form div.oe_form_configuration label {
min-width: 150px; min-width: 150px;
} }
.openerp ul.oe_form_steps { .openerp ul.oe_form_steps, .openerp ul.oe_form_steps_clickable {
height: 30px; display: inline-block;
padding: 0; padding-right: 18px;
margin: 0;
text-shadow: 0 1px 1px white;
} }
.openerp ul.oe_form_steps img { .openerp ul.oe_form_steps li, .openerp ul.oe_form_steps_clickable li {
vertical-align: top; display: inline-block;
margin-left: 8px; margin-right: -20px;
background-color: #fcfcfc;
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#dedede));
background-image: -webkit-linear-gradient(top, #fcfcfc, #dedede);
background-image: -moz-linear-gradient(top, #fcfcfc, #dedede);
background-image: -ms-linear-gradient(top, #fcfcfc, #dedede);
background-image: -o-linear-gradient(top, #fcfcfc, #dedede);
background-image: linear-gradient(to bottom, #fcfcfc, #dedede);
} }
.openerp ul.oe_form_steps li { .openerp ul.oe_form_steps li:first-child .label, .openerp ul.oe_form_steps_clickable li:first-child .label {
border-right: none;
padding: 0;
margin: 0;
float: left;
vertical-align: top;
height: 30px;
padding: 0 0 0 12px;
}
.openerp ul.oe_form_steps li:first-child {
border-left: 1px solid #cacaca; border-left: 1px solid #cacaca;
padding-left: 14px;
} }
.openerp ul.oe_form_steps li:last-child { .openerp ul.oe_form_steps li:last-child, .openerp ul.oe_form_steps_clickable li:last-child {
margin-right: 12px;
padding-right: 12px;
border-right: 1px solid #cacaca; border-right: 1px solid #cacaca;
} }
.openerp ul.oe_form_steps li a { .openerp ul.oe_form_steps li:last-child .label, .openerp ul.oe_form_steps_clickable li:last-child .label {
padding-right: 14px;
}
.openerp ul.oe_form_steps li:last-child .arrow, .openerp ul.oe_form_steps_clickable li:last-child .arrow {
display: none;
}
.openerp ul.oe_form_steps li .label, .openerp ul.oe_form_steps_clickable li .label {
color: #4c4c4c; color: #4c4c4c;
} text-shadow: 0 1px 1px #fcfcfc, 0 -1px 1px #dedede;
.openerp ul.oe_form_steps li a:hover { padding: 7px;
color: black; display: inline-block;
} padding-left: 24px;
.openerp ul.oe_form_steps .oe_form_steps_active {
font-weight: bold;
color: #b33630;
}
.openerp ul.oe_form_steps_clickable {
height: 30px;
margin: 0; margin: 0;
padding: 0; position: relative;
text-shadow: 0 1px 1px #cacaca; z-index: 10;
box-shadow: 0 0 1px rgba(0, 0, 0, 0.5); }
.openerp ul.oe_form_steps li .arrow, .openerp ul.oe_form_steps_clickable li .arrow {
width: 17px;
display: inline-block;
vertical-align: top;
overflow: hidden; overflow: hidden;
margin-left: -5px;
}
.openerp ul.oe_form_steps li .arrow span, .openerp ul.oe_form_steps_clickable li .arrow span {
position: relative;
z-index: 11;
width: 24px;
height: 24px;
display: inline-block;
margin-left: -12px;
margin-top: 3px;
box-shadow: -1px 1px 2px rgba(255, 255, 255, 0.2), inset -1px 1px 1px rgba(0, 0, 0, 0.2);
background-color: #dedede;
background: -moz-linear-gradient(135deg, #dedede, #fcfcfc);
background: -o-linear-gradient(135deg, #fcfcfc, #dedede);
background: -webkit-gradient(linear, left top, right bottom, from(#fcfcfc), to(#dedede));
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-moz-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
-o-transform: rotate(45deg);
-ms-transform: rotate(45deg);
}
.openerp ul.oe_form_steps li.oe_active, .openerp ul.oe_form_steps_clickable li.oe_active {
background-color: #729fcf;
background-image: -webkit-gradient(linear, left top, left bottom, from(#729fcf), to(#3465a4));
background-image: -webkit-linear-gradient(top, #729fcf, #3465a4);
background-image: -moz-linear-gradient(top, #729fcf, #3465a4);
background-image: -ms-linear-gradient(top, #729fcf, #3465a4);
background-image: -o-linear-gradient(top, #729fcf, #3465a4);
background-image: linear-gradient(to bottom, #729fcf, #3465a4);
}
.openerp ul.oe_form_steps li.oe_active .arrow span, .openerp ul.oe_form_steps_clickable li.oe_active .arrow span {
background-color: #3465a4;
background: -moz-linear-gradient(135deg, #3465a4, #729fcf);
background: -o-linear-gradient(135deg, #729fcf, #3465a4);
background: -webkit-gradient(linear, left top, right bottom, from(#729fcf), to(#3465a4));
}
.openerp ul.oe_form_steps li.oe_active .label, .openerp ul.oe_form_steps_clickable li.oe_active .label {
color: white;
text-shadow: 0 1px 1px #729fcf, 0 -1px 1px #3465a4;
} }
.openerp ul.oe_form_steps_clickable li { .openerp ul.oe_form_steps_clickable li {
border-right: none;
padding: 0 0 0 12px;
position: relative;
float: left;
vertical-align: top;
height: 30px;
color: white;
}
.openerp ul.oe_form_steps_clickable li:after {
content: " ";
width: 0;
height: 0;
border-top: 21px solid transparent;
border-bottom: 21px solid transparent;
border-left: 5px solid #807fb4;
position: absolute;
top: 50%;
margin-top: -21px;
left: 100%;
z-index: 2;
}
.openerp ul.oe_form_steps_clickable li:hover:after {
border-left: 5px solid #807fb4;
}
.openerp ul.oe_form_steps_clickable li:before {
content: " ";
width: 0;
height: 0;
border-top: 21px solid transparent;
border-bottom: 21px solid transparent;
border-left: 5px solid white;
position: absolute;
top: 50%;
margin-top: -21px;
margin-left: 2px;
left: 100%;
z-index: 2;
}
.openerp ul.oe_form_steps_clickable li.oe_form_steps_active {
font-weight: bold;
text-shadow: 0 1px 1px #999999;
box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.25);
background-color: #dc5f59;
background: -webkit-linear-gradient(top, #dc5f59, #b33630);
color: white;
}
.openerp ul.oe_form_steps_clickable li.oe_form_steps_inactive {
cursor: pointer; cursor: pointer;
box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.25);
background-color: #adadcf;
background: -webkit-linear-gradient(top, #adadcf, #7c7ba7);
} }
.openerp ul.oe_form_steps_clickable li.oe_form_steps_inactive div { .openerp ul.oe_form_steps_clickable li:hover {
padding: 0 30px 0 0; background-color: #e8e8e8;
background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#cacaca));
background-image: -webkit-linear-gradient(top, #e8e8e8, #cacaca);
background-image: -moz-linear-gradient(top, #e8e8e8, #cacaca);
background-image: -ms-linear-gradient(top, #e8e8e8, #cacaca);
background-image: -o-linear-gradient(top, #e8e8e8, #cacaca);
background-image: linear-gradient(to bottom, #e8e8e8, #cacaca);
} }
.openerp ul.oe_form_steps_clickable li.oe_form_steps_inactive:hover { .openerp ul.oe_form_steps_clickable li:hover .label {
background: -webkit-linear-gradient(top, #7c7ba7, #adadcf); text-shadow: 0 -1px 1px #fcfcfc, 0 1px 1px #dedede;
} }
.openerp ul.oe_form_steps_clickable li div { .openerp ul.oe_form_steps_clickable li:hover .arrow span {
padding: 0 30px 0 0; background-color: #e8e8e8;
background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#cacaca));
background-image: -webkit-linear-gradient(top, #e8e8e8, #cacaca);
background-image: -moz-linear-gradient(top, #e8e8e8, #cacaca);
background-image: -ms-linear-gradient(top, #e8e8e8, #cacaca);
background-image: -o-linear-gradient(top, #e8e8e8, #cacaca);
background-image: linear-gradient(to bottom, #e8e8e8, #cacaca);
} }
.openerp ul.oe_form_steps_clickable li.oe_form_steps_active:after { .openerp ul.oe_form_steps_clickable li .label {
content: " "; color: #8a89ba;
display: block;
width: 0;
height: 0;
border-top: 21px solid transparent;
border-bottom: 21px solid transparent;
border-left: 5px solid #b33630;
position: absolute;
top: 50%;
margin-top: -21px;
left: 100%;
z-index: 2;
} }
.openerp ul.oe_form_steps_clickable li.oe_form_steps_active:before { .openerp ul.oe_form_steps_clickable li.oe_active:hover {
content: " "; background-color: #4c85c2;
display: block; background-image: -webkit-gradient(linear, left top, left bottom, from(#4c85c2), to(#284d7d));
width: 0; background-image: -webkit-linear-gradient(top, #4c85c2, #284d7d);
height: 0; background-image: -moz-linear-gradient(top, #4c85c2, #284d7d);
border-top: 21px solid transparent; background-image: -ms-linear-gradient(top, #4c85c2, #284d7d);
border-bottom: 21px solid transparent; background-image: -o-linear-gradient(top, #4c85c2, #284d7d);
border-left: 5px solid white; background-image: linear-gradient(to bottom, #4c85c2, #284d7d);
position: absolute; }
top: 50%; .openerp ul.oe_form_steps_clickable li.oe_active:hover .label {
margin-top: -21px; text-shadow: 0 -1px 1px #729fcf, 0 1px 1px #3465a4;
margin-left: 2px; }
left: 100%; .openerp ul.oe_form_steps_clickable li.oe_active:hover .arrow span {
z-index: 2; background-color: #284d7d;
background: -moz-linear-gradient(135deg, #284d7d, #4c85c2);
background: -o-linear-gradient(135deg, #4c85c2, #284d7d);
background: -webkit-gradient(linear, left top, right bottom, from(#4c85c2), to(#284d7d));
} }
.openerp .oe_form .oe_subtotal_footer { .openerp .oe_form .oe_subtotal_footer {
width: 1% !important; width: 1% !important;

View File

@ -87,6 +87,18 @@ $sheet-max-width: 860px
-ms-box-sizing: #{$type}-box -ms-box-sizing: #{$type}-box
box-sizing: #{$type}-box box-sizing: #{$type}-box
@mixin skew-gradient($startColor: #555, $endColor: #333)
background-color: $endColor
background: -moz-linear-gradient(135deg, $endColor, $startColor)
background: -o-linear-gradient(135deg, $startColor, $endColor)
background: -webkit-gradient(linear, left top, right bottom, from($startColor), to($endColor))
@mixin transform($transform)
-moz-transform: $transform
-webkit-transform: $transform
-o-transform: $transform
-ms-transform: $transform
// Transforms the (readable) text of an inline element into an mmlicons icon, // Transforms the (readable) text of an inline element into an mmlicons icon,
// allows for actual readable text in-code (and in readers?) with iconic looks // allows for actual readable text in-code (and in readers?) with iconic looks
@mixin text-to-icon($icon-name, $color: #404040) @mixin text-to-icon($icon-name, $color: #404040)
@ -141,6 +153,7 @@ $sheet-max-width: 860px
color: #4c4c4c color: #4c4c4c
font-size: 13px font-size: 13px
background: white background: white
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5)
// }}} // }}}
//Placeholder style{{{ //Placeholder style{{{
\:-moz-placeholder \:-moz-placeholder
@ -195,7 +208,7 @@ $sheet-max-width: 860px
a.button:link, a.button:visited, button, input[type='submit'], .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button a.button:link, a.button:visited, button, input[type='submit'], .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button
display: inline-block display: inline-block
border: 1px solid #ababab border: 1px solid #ababab
color: #404040 color: #4c4c4c
margin: 0 margin: 0
padding: 3px 12px padding: 3px 12px
font-size: 13px font-size: 13px
@ -1498,7 +1511,7 @@ $sheet-max-width: 860px
border-bottom: 1px solid #cacaca border-bottom: 1px solid #cacaca
@include vertical-gradient(#fcfcfc, #dedede) @include vertical-gradient(#fcfcfc, #dedede)
padding: 0 8px padding: 0 8px
line-height: 30px //line-height: 30px
ul ul
display: inline-block display: inline-block
float: right float: right
@ -1515,122 +1528,78 @@ $sheet-max-width: 860px
max-width: 650px max-width: 650px
label label
min-width: 150px min-width: 150px
ul.oe_form_steps
height: 30px
padding: 0 ul.oe_form_steps, ul.oe_form_steps_clickable
margin: 0 display: inline-block
text-shadow: 0 1px 1px white padding-right: 18px
img li
vertical-align: top display: inline-block
margin-left: 8px margin-right: -20px
li @include vertical-gradient(#fcfcfc, #dedede)
border-right: none &:first-child .label
padding: 0
margin: 0
float: left
vertical-align: top
height: 30px
padding: 0 0 0 12px
&:first-child
border-left: 1px solid #cacaca border-left: 1px solid #cacaca
padding-left: 14px
&:last-child &:last-child
margin-right: 12px
padding-right: 12px
border-right: 1px solid #cacaca border-right: 1px solid #cacaca
a .label
padding-right: 14px
.arrow
display: none
.label
color: #4c4c4c color: #4c4c4c
&:hover text-shadow: 0 1px 1px #fcfcfc, 0 -1px 1px #dedede
color: black padding: 7px
.oe_form_steps_active display: inline-block
font-weight: bold padding-left: 24px
color: #b33630 margin: 0
ul.oe_form_steps_clickable position: relative
height: 30px z-index: 10
margin: 0 .arrow
padding: 0 width: 17px
text-shadow: 0 1px 1px #cacaca display: inline-block
box-shadow: 0 0 1px rgba(0,0,0,0.5) vertical-align: top
overflow: hidden overflow: hidden
li margin-left: -5px
border-right: none span
padding: 0 0 0 12px position: relative
position: relative z-index: 11
float: left width: 24px
vertical-align: top height: 24px
height: 30px display: inline-block
color: white margin-left: -12px
&:after margin-top: 3px
content: " " box-shadow: -1px 1px 2px rgba(255,255,255,0.2), inset -1px 1px 1px rgba(0,0,0,0.2)
width: 0 @include skew-gradient(#fcfcfc, #dedede)
height: 0 @include radius(3px)
border-top: 21px solid transparent @include transform(rotate(45deg))
border-bottom: 21px solid transparent li.oe_active
border-left: 5px solid #807fb4 @include vertical-gradient(#729fcf, #3465a4)
position: absolute .arrow span
top: 50% @include skew-gradient(#729fcf, #3465a4)
margin-top: -21px .label
left: 100%
z-index: 2
&:hover:after
border-left: 5px solid #807fb4
&:before
content: " "
width: 0
height: 0
border-top: 21px solid transparent
border-bottom: 21px solid transparent
border-left: 5px solid white
position: absolute
top: 50%
margin-top: -21px
margin-left: 2px
left: 100%
z-index: 2
&.oe_form_steps_active
font-weight: bold
text-shadow: 0 1px 1px #999999
box-shadow: inset 0 -1px 1px rgba(0,0,0,0.25), inset 0 1px 1px rgba(255,255,255,0.25)
background-color: #dc5f59
background: -webkit-linear-gradient(top, #dc5f59, #b33630)
color: white color: white
&.oe_form_steps_inactive text-shadow: 0 1px 1px #729fcf, 0 -1px 1px #3465a4
cursor: pointer
box-shadow: inset 0 -1px 1px rgba(0,0,0,0.25), inset 0 1px 1px rgba(255,255,255,0.25) ul.oe_form_steps_clickable
background-color: #adadcf li
background: -webkit-linear-gradient(top, #adadcf, #7c7ba7) cursor: pointer
div &:hover
padding: 0 30px 0 0 @include vertical-gradient(darken(#fcfcfc, 8%), darken(#dedede, 8%))
&.oe_form_steps_inactive:hover .label
background: -webkit-linear-gradient(top, #7c7ba7, #adadcf) text-shadow: 0 -1px 1px #fcfcfc, 0 1px 1px #dedede
div .arrow span
padding: 0 30px 0 0 @include vertical-gradient(darken(#fcfcfc, 8%), darken(#dedede, 8%))
&.oe_form_steps_active:after .label
content: " " color: $link-color
display: block li.oe_active
width: 0 &:hover
height: 0 @include vertical-gradient(darken(#729fcf, 10%), darken(#3465a4, 10%))
border-top: 21px solid transparent .label
border-bottom: 21px solid transparent text-shadow: 0 -1px 1px #729fcf, 0 1px 1px #3465a4
border-left: 5px solid #b33630 .arrow span
position: absolute @include skew-gradient(darken(#729fcf, 10%), darken(#3465a4, 10%))
top: 50%
margin-top: -21px
left: 100%
z-index: 2
&.oe_form_steps_active:before
content: " "
display: block
width: 0
height: 0
border-top: 21px solid transparent
border-bottom: 21px solid transparent
border-left: 5px solid white
position: absolute
top: 50%
margin-top: -21px
margin-left: 2px
left: 100%
z-index: 2
.oe_form .oe_subtotal_footer .oe_form .oe_subtotal_footer
width: 1% !important width: 1% !important
td.oe_form_group_cell td.oe_form_group_cell

View File

@ -1042,14 +1042,11 @@
<t t-name="FieldStatus.content"> <t t-name="FieldStatus.content">
<t t-set="size" t-value="widget.to_show.length"/> <t t-set="size" t-value="widget.to_show.length"/>
<t t-foreach="_.range(size)" t-as="i"> <t t-foreach="_.range(size)" t-as="i">
<li t-att-class="widget.to_show[i][0] === widget.selected_value ? 'oe_form_steps_active' : 'oe_form_steps_inactive'"> <li t-att-class="widget.to_show[i][0] === widget.selected_value ? 'oe_active' : ''">
<div class="oe_form_steps_button" t-att-data-id="widget.to_show[i][0]"> <span class="label">
<t t-esc="widget.to_show[i][1]"/> <t t-esc="widget.to_show[i][1]"/>
<span class="oe_form_steps_arrow"> </span>
<span></span> <span class="arrow"><span></span></span>
</span>
<img t-att-src='_s + "/web/static/src/img/form_steps.png"' class="oe_form_steps_arrow" t-if="i &lt; size - 1"/>
</div>
</li> </li>
</t> </t>
</t> </t>