From 0e25e20bab4b2c08e44ffc3f0eef8b178fc9c264 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Fri, 6 Dec 2013 13:18:19 +0100 Subject: [PATCH] [IMP] reduce size of input fields, change color of border when touched --- web_translate_dialog_page/static/src/css/base.css | 7 +++++-- .../static/src/js/web_translate_dialog_page.js | 9 ++++++--- web_translate_dialog_page/static/src/xml/base.xml | 4 ++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/web_translate_dialog_page/static/src/css/base.css b/web_translate_dialog_page/static/src/css/base.css index 29220ff9..82fe854c 100644 --- a/web_translate_dialog_page/static/src/css/base.css +++ b/web_translate_dialog_page/static/src/css/base.css @@ -1,3 +1,6 @@ -.oe_field_translate { - /* visibility: hidden; */ +.openerp .oe_trad_field { + width: 95%; +} +.openerp .oe_trad_field.touched { + border: 1px solid green !important; } diff --git a/web_translate_dialog_page/static/src/js/web_translate_dialog_page.js b/web_translate_dialog_page/static/src/js/web_translate_dialog_page.js index a61b2b29..0f63d1c9 100644 --- a/web_translate_dialog_page/static/src/js/web_translate_dialog_page.js +++ b/web_translate_dialog_page/static/src/js/web_translate_dialog_page.js @@ -30,7 +30,10 @@ openerp.web_translate_dialog_page = function (instance) { template: "TranslateDialogPage", dialog_title: {toString: function () { return _t("Translations"); }}, init: function(parent, options, content) { - this._super(parent, options, content); + this._super(parent, + {width: '90%', + height: '80%'}, + content); this.view_language = this.session.user_context.lang; this.view = parent; this.view_type = parent.fields_view.type || ''; @@ -104,8 +107,8 @@ openerp.web_translate_dialog_page = function (instance) { // the buggy event is not bound to $(window), then we restore // a percentage width and bind the "normal" event without the // CHM's buggy change. - $cleditor.$main.width('100%'); - $cleditor.options.width = '100%'; + $cleditor.$main.width('95%'); + $cleditor.options.width = '95%'; $(window).resize(function() { //Forcefully blurred iframe contentWindow, chrome, IE, safari doesn't trigger blur on window resize and due to which text disappears var contentWindow = $cleditor.$frame[0].contentWindow; diff --git a/web_translate_dialog_page/static/src/xml/base.xml b/web_translate_dialog_page/static/src/xml/base.xml index d321dddd..2a110bb6 100644 --- a/web_translate_dialog_page/static/src/xml/base.xml +++ b/web_translate_dialog_page/static/src/xml/base.xml @@ -15,8 +15,8 @@ - - + +