[FIX] export wizard

bzr revid: fp@tinyerp.com-20121004134244-qv0fj1k1i06ezk7m
This commit is contained in:
Fabien Pinckaers
2012-10-04 15:42:44 +02:00
2 changed files with 11 additions and 9 deletions
+1 -1
View File
@@ -146,8 +146,8 @@ instance.web.Dialog = instance.web.Widget.extend({
this.$buttons = $('<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" />');
this.$el.dialog("widget").append(this.$buttons);
}
var res = this.start();
this.dialog_inited = true;
var res = this.start();
return res;
},
close: function() {
+10 -8
View File
@@ -5,7 +5,15 @@ instance.web.DataExport = instance.web.Dialog.extend({
template: 'ExportTreeView',
dialog_title: {toString: function () { return _t("Export Data"); }},
init: function(parent, dataset) {
this._super(parent);
var self = this;
options = {
buttons : [
{text: _t("Close"), click: function() { self.close(); }},
{text: _t("Export To File"), click: function() { self.on_click_export_data(); }}
],
close: function(event, ui){ self.close();}
}
this._super(parent, options);
this.records = {};
this.dataset = dataset;
this.exports = new instance.web.DataSetSearch(
@@ -14,13 +22,7 @@ instance.web.DataExport = instance.web.Dialog.extend({
start: function() {
var self = this;
this._super.apply(this, arguments);
this.open({
buttons : [
{text: _t("Close"), click: function() { self.close(); }},
{text: _t("Export To File"), click: function() { self.on_click_export_data(); }}
],
close: function(event, ui){ self.close();}
});
this.open();
self.$el.removeClass('ui-dialog-content ui-widget-content');
self.$el.find('#add_field').click(function() {
if ($('#field-tree-structure tr.ui-selected')) {