diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2012-10-04 15:42:44 +0200 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2012-10-04 15:42:44 +0200 |
| commit | c8ff3d20eeff90e167891f2ca103df6b533978fd (patch) | |
| tree | 4df9803ab52cc53ed6a52363dc57e0337a262d97 | |
| parent | ba4e817379f592bd376795fa4f848be45b335d3d (diff) | |
| parent | 6427f6b4d46c03725ac064f4be000fde3f83788e (diff) | |
[FIX] export wizard
bzr revid: fp@tinyerp.com-20121004134244-qv0fj1k1i06ezk7m
| -rw-r--r-- | addons/web/static/src/js/chrome.js | 2 | ||||
| -rw-r--r-- | addons/web/static/src/js/data_export.js | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index bed4a159535..01bfb63a580 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -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() { 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')) { |
