[IMP] looks of config progress status

bzr revid: xmo@openerp.com-20110714125346-jn6wfozo8faw4x1x
This commit is contained in:
Xavier Morel
2011-07-14 14:53:46 +02:00
parent 07eda5cffe
commit 79534ceae8
3 changed files with 41 additions and 22 deletions
@@ -127,29 +127,48 @@
right: 0px;
}
.openerp .oe-dashboard-config-overview .oe-config-progress {
border: 1px inset #d9d9d9;
background-color: #f2f2f2;
padding: 0.5em;
-webkit-border-radius: 0.5em;
-moz-border-radius: 0.5em;
border-radius: 0.5em;
}
.openerp .oe-dashboard-config-overview .oe-config-progress-title {
font-size: 1.1em;
font-weight: bold;
text-transform: uppercase;
margin: 0 0 0.5em 0;
}
.openerp .oe-dashboard-config-overview dt {
font-weight: bold;
text-transform: uppercase;
border-top: 1px solid #eee;
padding-top: 0.5em;
}
.openerp .oe-dashboard-config-overview dt:first-child {
border-top: none;
}
.openerp .oe-dashboard-config-overview dd {
margin-left: 1em;
padding-bottom: 0.5em;
}
.openerp .oe-dashboard-config-overview ul {
list-style: none;
padding: 0;
background-color: #fafafa;
margin: 0;
}
.openerp .oe-dashboard-config-overview li {
cursor: default;
}
.openerp .oe-dashboard-config-overview li.ui-state-error {
border: none;
background-image: none;
cursor: pointer;
}
.openerp .oe-dashboard-config-overview li.ui-state-error:hover {
background-color: #fde6dd;
.openerp .oe-dashboard-config-overview li:hover {
cursor: pointer;
background-color: #f7f7f7;
}
.openerp .oe-dashboard-config-overview li span.ui-icon {
display: inline-block;
vertical-align: bottom;
.openerp .oe-dashboard-config-overview li.oe-done {
color: #999999;
}
.openerp .oe-dashboard-layout_2-1 .index_0 .oe-dashboard-config-overview ul,
@@ -312,13 +312,12 @@ openerp.base_dashboard.ConfigOverview = openerp.base.View.extend({
completion: 100 * progress.done / progress.total,
groups: grouped_todos
}));
var $progress = this.$element.find('div.oe-config-progress');
var $progress = this.$element.find('div.oe-config-progress-bar');
$progress.progressbar({value: $progress.data('completion')});
var self = this;
// allow for executing to-do and skipped action
this.$element.find('div.oe-dashboard-config-overview ul')
.delegate('li.ui-state-error', 'click', function () {
.delegate('li', 'click', function () {
self.execute_action({
type: 'action',
name: $(this).data('action')
@@ -65,19 +65,20 @@
</form>
</t>
<div t-name="ConfigOverview" class="oe-dashboard-config-overview">
<div class="oe-config-progress" t-att-data-completion="completion"/>
<div class="oe-config-progress">
<h6 class="oe-config-progress-title">
<t t-esc="Math.round(completion)"/>% progress
</h6>
<div class="oe-config-progress-bar" t-att-data-completion="completion"/>
</div>
<dl>
<t t-foreach="groups" t-as="category">
<dt><t t-esc="category"/></dt>
<dd><ul>
<li t-foreach="category_value" t-as="todo"
t-att-class="todo.to_do ? 'ui-state-error ui-priority-primary' : ''"
t-att-class="todo.done ? 'oe-done' : undefined"
t-att-data-action="todo.action">
<span t-if="todo.done" class="ui-icon ui-icon-circle-check"/>
<span t-if="todo.to_do" class="ui-icon ui-icon-circle-close"/>
<span t-att-class="todo.to_do ? 'ui-state-error-text' : ''">
<t t-esc="todo.name"/>
</span>
<t t-esc="todo.name"/>
</li>
</ul></dd>
</t>