[FIX] Fixed on_button_cancel.
bzr revid: vta@openerp.com-20121010114007-3cw3qlxu2zwt1k0s
This commit is contained in:
parent
777243bef3
commit
46b5ac9a37
|
@ -172,10 +172,10 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
} else {
|
||||
this.$el.find('.oe_form_buttons').replaceWith(this.$buttons);
|
||||
}
|
||||
this.$buttons.on('click','.oe_form_button_create',this.on_button_create);
|
||||
this.$buttons.on('click','.oe_form_button_edit',this.on_button_edit);
|
||||
this.$buttons.on('click','.oe_form_button_save',this.on_button_save);
|
||||
this.$buttons.on('click','.oe_form_button_cancel',this.on_button_cancel);
|
||||
this.$buttons.on('click', '.oe_form_button_create', this.on_button_create);
|
||||
this.$buttons.on('click', '.oe_form_button_edit', this.on_button_edit);
|
||||
this.$buttons.on('click', '.oe_form_button_save', this.on_button_save);
|
||||
this.$buttons.on('click', '.oe_form_button_cancel', this.on_button_cancel);
|
||||
|
||||
this.$sidebar = this.options.$sidebar || this.$el.find('.oe_form_sidebar');
|
||||
if (!this.sidebar && this.options.$sidebar) {
|
||||
|
@ -755,6 +755,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
this.on_record_loaded(this.datarecord);
|
||||
}
|
||||
}
|
||||
this.trigger('on_button_cancel');
|
||||
return false;
|
||||
},
|
||||
on_button_new: function() {
|
||||
|
|
|
@ -194,7 +194,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
|||
});
|
||||
var am = instance.webclient.action_manager;
|
||||
var form = am.dialog_widget.views.form.controller;
|
||||
form.on("on_button_cancel",self,am.dialog.on_close);
|
||||
form.on("on_button_cancel", self, am.dialog.on_close);
|
||||
form.on_created.add_last(function(r) {
|
||||
(new instance.web.DataSet(self, self.group_by_field.relation)).name_get([r.result]).then(function(new_record) {
|
||||
am.dialog.on_close();
|
||||
|
@ -672,7 +672,7 @@ instance.web_kanban.KanbanGroup = instance.web.Widget.extend({
|
|||
});
|
||||
var am = instance.webclient.action_manager;
|
||||
var form = am.dialog_widget.views.form.controller;
|
||||
form.on("on_button_cancel",self,am.dialog.on_close);
|
||||
form.on("on_button_cancel", self, am.dialog.on_close);
|
||||
form.on_saved.add_last(function() {
|
||||
am.dialog.on_close();
|
||||
self.view.do_reload();
|
||||
|
|
|
@ -1014,7 +1014,7 @@ instance.web_view_editor.ViewEditor = instance.web.Widget.extend({
|
|||
var action_manager = new instance.web.ActionManager(self);
|
||||
$.when(action_manager.do_action(action)).then(function() {
|
||||
var controller = action_manager.dialog_widget.views['form'].controller;
|
||||
controller.on("on_button_cancel",self,function(){
|
||||
controller.on("on_button_cancel", self, function(){
|
||||
action_manager.destroy();
|
||||
});
|
||||
controller.do_save.add_last(function(){
|
||||
|
|
Loading…
Reference in New Issue