[IMP]Improve Code
bzr revid: vja@tinyerp.com-20121012084900-zja87nszeh3q1ree
This commit is contained in:
parent
833c7bdc52
commit
31a42989a7
|
@ -433,7 +433,6 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||||
},
|
},
|
||||||
execute_pager_action: function(action) {
|
execute_pager_action: function(action) {
|
||||||
if (this.can_be_discarded()) {
|
if (this.can_be_discarded()) {
|
||||||
this.trigger('pager_action_executed');
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'first':
|
case 'first':
|
||||||
this.dataset.index = 0;
|
this.dataset.index = 0;
|
||||||
|
@ -449,6 +448,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this.reload();
|
this.reload();
|
||||||
|
this.trigger('pager_action_executed');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
init_pager: function() {
|
init_pager: function() {
|
||||||
|
|
|
@ -348,7 +348,7 @@ instance.web.DiagramView = instance.web.View.extend({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
on_pager_action: function(action) {
|
execute_pager_action: function(action) {
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'first':
|
case 'first':
|
||||||
this.dataset.index = 0;
|
this.dataset.index = 0;
|
||||||
|
@ -381,7 +381,7 @@ instance.web.DiagramView = instance.web.View.extend({
|
||||||
|
|
||||||
do_show: function() {
|
do_show: function() {
|
||||||
this.do_push_state({});
|
this.do_push_state({});
|
||||||
return $.when(this._super(), this.on_pager_action('reload'));
|
return $.when(this._super(), this.execute_pager_action('reload'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue