[REM/IMP] remove button from form view and improve css

bzr revid: rgaopenerp-20120808053442-ljzf2wy1lmxsdslt
This commit is contained in:
RGA(OpenERP) 2012-08-08 11:04:42 +05:30
parent 512f5a1bc5
commit 085e20a23d
3 changed files with 39 additions and 28 deletions

View File

@ -22,8 +22,8 @@
<field name="latest_date"/>
</div>
<div>
<a type="button" class="oe_reconcile" name="%(action_view_account_move_line_reconcile)d">Reconcile</a>
<button string="Nothing to Reconcile" name="skip_partner" type="object"/>
<a type="button" class="oe_reconcile oe_reconcile_button" name="%(action_view_account_move_line_reconcile)d">Reconcile</a>
<a type="button" class="oe_nothing_to_reconcile oe_reconcile_button" name="skip_partner">Nothing to Reconcile</a>
<field name="reconciliation_progress" widget="progressbar"/>
</div>
<div name="div4">

View File

@ -25,45 +25,46 @@
padding: 0 5px 0 5px;
margin: 0 2px 0 2px;
float: left;
border-right: 1px solid #ababab;
}
.openerp .oe_reconcile_button {
float: left;
display: inline-block;
background-color: #EFEFEF;
background-image: -moz-linear-gradient(center top , #EFEFEF, #D8D8D8);
border: 1px solid #ABABAB;
border-radius: 3px 3px 3px 3px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
color: #404040;
display: inline-block;
font-size: 13px;
margin: 0 3px 0 3px;
padding: 3px 12px;
text-align: center;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}
.openerp .oe_pager_m2o li {
display: inline-block;
height: 24px;
line-height: 24px;
padding: 0;
float: left;
.openerp .oe_reconcile_button:hover {
background-color: #E3E3E3;
background-image: -moz-linear-gradient(center top , #E3E3E3, #F6F6F6);
box-shadow: none;
}
.openerp .oe_pager_m2o a {
padding: 0 8px;
.openerp .oe_reconcile_button a:hover {
text-decoration: none
}
.openerp .oe_extended_form_view .oe_form_field:empty {
display: inline-block !important;
}
.openerp .oe_extended_form_view .oe_datepicker_root {
display: inline-block;
min-width: 100px;
display: inline-block;
min-width: 100px;
}
.openerp .oe_extended_form_view .oe_form_field {
width: auto;
}
.openerp .oe_extended_form_view button {
margin-right: 10px
}
.openerp .oe_extended_form_view .oe_button_container .oe_form_field{
width: auto;
margin: 0px 10px 0px 10px;
}
.openerp .oe_extended_form_view .oe_button_container{
display: inline-block ;
width:100%;
margin: 10px;
}
.openerp .oe_extended_form_view .oe_form_field_progressbar.ui-progressbar {
width: 200px !important;
}

View File

@ -37,6 +37,7 @@ instance.account.extend_form_view = instance.web.FormView.extend({
this._super.apply(this,arguments);
var self = this
this.$element.find(".oe_reconcile").on('click', this.do_reconcilation)
this.$element.find(".oe_nothing_to_reconcile").on('click', this.do_nothing_to_reconcile)
this.$element.on('click','a[data-pager-action]',function() {
var action = $(this).data('pager-action');
self.on_pager_action(action);
@ -68,8 +69,17 @@ instance.account.extend_form_view = instance.web.FormView.extend({
list_view.reload();
});
});
},
do_nothing_to_reconcile:function(event){
self = this
this.dataset.call(event.target.name, [[self.datarecord.id], self.dataset.context]).then(function() {
self.dataset.read_slice().done(function(){
self.on_pager_action();
});
})
},
do_update_pager: function(hide_index) {
var index = hide_index ? '-' : this.dataset.index + 1;
this.$element.find('span.oe_pager_index_extend').html(index).end()