summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/data_export.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src/js/data_export.js')
-rw-r--r--addons/web/static/src/js/data_export.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/addons/web/static/src/js/data_export.js b/addons/web/static/src/js/data_export.js
index 29aea6362f7..1353f59d4a5 100644
--- a/addons/web/static/src/js/data_export.js
+++ b/addons/web/static/src/js/data_export.js
@@ -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')) {