mirror of https://github.com/OCA/web.git
[CHG] rename web_translate_dialog_page to web_translate_dialog
parent
549b31bfa9
commit
d53c5ddc03
|
@ -19,34 +19,27 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
{
|
||||
"name": "Web Translate Dialog in Page view",
|
||||
{"name": "Web Translate Dialog",
|
||||
"category": "Hidden",
|
||||
"description":
|
||||
"""
|
||||
Replace the standard translation dialog by an alternative one:
|
||||
"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',
|
||||
"depends": ['web',
|
||||
],
|
||||
'js': [
|
||||
'static/src/js/web_translate_dialog_page.js',
|
||||
'js': ['static/src/js/web_translate_dialog.js',
|
||||
],
|
||||
'css' : [
|
||||
'static/src/css/base.css',
|
||||
'css': ['static/src/css/base.css',
|
||||
],
|
||||
'qweb' : [
|
||||
"static/src/xml/base.xml",
|
||||
'qweb': ["static/src/xml/base.xml",
|
||||
],
|
||||
'auto_install': False,
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -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();
|
|
@ -1,6 +1,6 @@
|
|||
<templates>
|
||||
|
||||
<t t-name="TranslateDialogPage">
|
||||
<t t-name="TranslateDialog">
|
||||
<table t-if="widget.view.translatable_fields" class="oe_frame oe_forms oe_translation_form" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td class="oe_form_separator" width="1%" nowrap="nowrap">
|
||||
|
@ -25,7 +25,7 @@
|
|||
</table>
|
||||
</t>
|
||||
|
||||
<t t-name="TranslateDialogPage.buttons">
|
||||
<t t-name="TranslateDialog.buttons">
|
||||
<button class="oe_form_translate_dialog_save_button oe_button oe_highlight">Save</button>
|
||||
<button class="oe_form_translate_dialog_cancel_button oe_button">Cancel</button>
|
||||
</t>
|
Loading…
Reference in New Issue