From eee46c7b8aad7e09840873e8ec5591f72f6c8199 Mon Sep 17 00:00:00 2001 From: Andrea Date: Mon, 13 Mar 2017 08:42:36 +0100 Subject: [PATCH] Improved usability and strings made translatable --- bi_view_editor/static/src/js/bve.js | 22 ++++++++++++---------- bi_view_editor/templates/qweb_template.xml | 1 - 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bi_view_editor/static/src/js/bve.js b/bi_view_editor/static/src/js/bve.js index f1d08085..04b6749d 100644 --- a/bi_view_editor/static/src/js/bve.js +++ b/bi_view_editor/static/src/js/bve.js @@ -23,24 +23,27 @@ odoo.define('bi_view_editor', function (require) { for (var i=0; i" + model_data[choices[i].table_alias].model_name + ""; } else { var new_str = ""; if (choices[i].join_node !== -1) { - new_str = "new "; + new_str = "" + _t("new") + " "; } - description = "Join using the field '" + choices[i].description + "' from " + new_str + "model '" + choices[i].model_name + "'"; + description = _t("Join using the field") + " " + choices[i].description + " " + _t("on ") + new_str + _t("model") +" " + choices[i].model_name + ""; } - joinnodes.append($("" + description+ "") + joinnodes.append($('' + description+ '') .data('idx', i) - .wrap("

") + .wrap('

') .parent()); - } var dialog = new Dialog(this, { - dialogClass: 'oe_act_window', - title: "Choose Join Node", - $content: this.$el + dialogClass: 'oe_act_window', + title: _t("Choose join node"), + $content: this.$el, + buttons: [{text: _t("Cancel"), + classes: "btn-default o_form_button_cancel", + close: true + }] }).open(); joinnodes.find('a').click(function() { @@ -75,7 +78,6 @@ odoo.define('bi_view_editor', function (require) { drop: function (event, ui) { self.add_field(ui.draggable); ui.draggable.draggable('option', 'revert', false ); - ui.draggable.remove(); } }); if (!this.get("effective_readonly")) { diff --git a/bi_view_editor/templates/qweb_template.xml b/bi_view_editor/templates/qweb_template.xml index b38ca727..84fd5c5a 100644 --- a/bi_view_editor/templates/qweb_template.xml +++ b/bi_view_editor/templates/qweb_template.xml @@ -2,7 +2,6 @@
-

Please choose the join node