From d53c5ddc033be5ba3a152e5b510dec17a25ecd1d Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Fri, 6 Dec 2013 13:54:38 +0100 Subject: [PATCH] [CHG] rename web_translate_dialog_page to web_translate_dialog --- .../__init__.py | 0 .../__openerp__.py | 45 ++++++++----------- .../orm.py | 0 .../static/src/css/base.css | 0 .../static/src/js/web_translate_dialog.js | 10 ++--- .../static/src/xml/base.xml | 4 +- 6 files changed, 26 insertions(+), 33 deletions(-) rename {web_translate_dialog_page => web_translate_dialog}/__init__.py (100%) rename {web_translate_dialog_page => web_translate_dialog}/__openerp__.py (63%) rename {web_translate_dialog_page => web_translate_dialog}/orm.py (100%) rename {web_translate_dialog_page => web_translate_dialog}/static/src/css/base.css (100%) rename web_translate_dialog_page/static/src/js/web_translate_dialog_page.js => web_translate_dialog/static/src/js/web_translate_dialog.js (96%) rename {web_translate_dialog_page => web_translate_dialog}/static/src/xml/base.xml (95%) diff --git a/web_translate_dialog_page/__init__.py b/web_translate_dialog/__init__.py similarity index 100% rename from web_translate_dialog_page/__init__.py rename to web_translate_dialog/__init__.py diff --git a/web_translate_dialog_page/__openerp__.py b/web_translate_dialog/__openerp__.py similarity index 63% rename from web_translate_dialog_page/__openerp__.py rename to web_translate_dialog/__openerp__.py index 121583a5..be80746a 100644 --- a/web_translate_dialog_page/__openerp__.py +++ b/web_translate_dialog/__openerp__.py @@ -19,34 +19,27 @@ # ############################################################################## -{ - "name": "Web Translate Dialog in Page view", - "category": "Hidden", - "description": - """ -Replace the standard translation dialog by an alternative one: +{"name": "Web Translate Dialog", + "category": "Hidden", + "description": """ +Replace the standard translation view by an alternative one: - * Hide the buttons at right of the fields and instead - * Add a "Translate" button in page view, next to "Edit" + * Add a "Translate" button item in the "More" menu + * The translations are displayed in a dialog (much like the OpenERP + 6.1's one) * The translation dialog displays empty fields for the untranslated fields, instead of the source values. - * Autosize the text boxes + * Support HTML fields - """, - "version": "1.0", - "depends": [ - 'web', +""", + "version": "1.0", + "depends": ['web', + ], + 'js': ['static/src/js/web_translate_dialog.js', ], - 'js': [ - 'static/src/js/web_translate_dialog_page.js', - ], - 'css' : [ - 'static/src/css/base.css', - ], - 'qweb' : [ - "static/src/xml/base.xml", - ], - 'auto_install': False, -} - - + 'css': ['static/src/css/base.css', + ], + 'qweb': ["static/src/xml/base.xml", + ], + 'auto_install': False, + } diff --git a/web_translate_dialog_page/orm.py b/web_translate_dialog/orm.py similarity index 100% rename from web_translate_dialog_page/orm.py rename to web_translate_dialog/orm.py diff --git a/web_translate_dialog_page/static/src/css/base.css b/web_translate_dialog/static/src/css/base.css similarity index 100% rename from web_translate_dialog_page/static/src/css/base.css rename to web_translate_dialog/static/src/css/base.css diff --git a/web_translate_dialog_page/static/src/js/web_translate_dialog_page.js b/web_translate_dialog/static/src/js/web_translate_dialog.js similarity index 96% rename from web_translate_dialog_page/static/src/js/web_translate_dialog_page.js rename to web_translate_dialog/static/src/js/web_translate_dialog.js index b5b3d0c7..ef153787 100644 --- a/web_translate_dialog_page/static/src/js/web_translate_dialog_page.js +++ b/web_translate_dialog/static/src/js/web_translate_dialog.js @@ -1,4 +1,4 @@ -openerp.web_translate_dialog_page = function (instance) { +openerp.web_translate_dialog = function (instance) { "use strict"; @@ -24,12 +24,12 @@ openerp.web_translate_dialog_page = function (instance) { instance.web.View.include({ open_translate_dialog: function() { - new instance.web_translate_dialog_page.TranslateDialogPage(this).open(); + new instance.web_translate_dialog.TranslateDialog(this).open(); } }); - instance.web_translate_dialog_page.TranslateDialogPage = instance.web.Dialog.extend({ - template: "TranslateDialogPage", + instance.web_translate_dialog.TranslateDialog = instance.web.Dialog.extend({ + template: "TranslateDialog", dialog_title: {toString: function () { return _t("Translations"); }}, init: function(parent, options, content) { this._super(parent, @@ -69,7 +69,7 @@ openerp.web_translate_dialog_page = function (instance) { this.$el.find('.oe_trad_field').change(function() { $(this).toggleClass('touched', ($(this).val() != $(this).attr('data-value'))); }); - this.$buttons.html(QWeb.render("TranslateDialogPage.buttons")); + this.$buttons.html(QWeb.render("TranslateDialog.buttons")); this.$buttons.find(".oe_form_translate_dialog_save_button").click(function(){ self.on_button_save(); self.on_button_close(); diff --git a/web_translate_dialog_page/static/src/xml/base.xml b/web_translate_dialog/static/src/xml/base.xml similarity index 95% rename from web_translate_dialog_page/static/src/xml/base.xml rename to web_translate_dialog/static/src/xml/base.xml index b27dd29d..2a90f7fb 100644 --- a/web_translate_dialog_page/static/src/xml/base.xml +++ b/web_translate_dialog/static/src/xml/base.xml @@ -1,6 +1,6 @@ - +
@@ -25,7 +25,7 @@
- +