Tejas Tank (OpenERP) has proposed merging 
lp:~openerp-dev/openerp-web/trunk-data-export-wizard-tta into lp:openerp-web.

Requested reviews:
  OpenERP R&D Web Team (openerp-dev-web)

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-data-export-wizard-tta/+merge/127755

Hello,

Fixed : The Export Wizard crashes the browser.

Fixed : Export wizard unable to load "Export To File" and "Close" button.


Thanks,
TTA




-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-data-export-wizard-tta/+merge/127755
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/trunk-data-export-wizard-tta.
=== modified file 'addons/web/static/src/js/chrome.js'
--- addons/web/static/src/js/chrome.js	2012-10-03 11:42:58 +0000
+++ addons/web/static/src/js/chrome.js	2012-10-03 13:16:08 +0000
@@ -146,8 +146,8 @@
             this.$buttons = $('<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" />');
             this.$el.dialog("widget").append(this.$buttons);
         }
+        this.dialog_inited = true;
         var res = this.start();
-        this.dialog_inited = true;
         return res;
     },
     close: function() {

=== modified file 'addons/web/static/src/js/data_export.js'
--- addons/web/static/src/js/data_export.js	2012-08-24 18:27:07 +0000
+++ addons/web/static/src/js/data_export.js	2012-10-03 13:16:08 +0000
@@ -5,7 +5,15 @@
     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 @@
     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')) {

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to