From 2048128573f53fbd88fdb177d7c24b8e132374bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 21 Nov 2017 20:50:27 +0100 Subject: [PATCH] Implement translation on richtext widget issue6891 review36811002 --- src/sao.less | 3 ++ src/view/form.js | 112 +++++++++++++++++++++++++++++++++++------------ 2 files changed, 86 insertions(+), 29 deletions(-) diff --git a/src/sao.less b/src/sao.less index c0d86afe39..dde2f96ce7 100644 --- a/src/sao.less +++ b/src/sao.less @@ -192,6 +192,9 @@ button { } } & .form-richtext { + & > .btn-toolbar { + min-width: 450px; + } & .richtext { min-height: 5em; } diff --git a/src/view/form.js b/src/view/form.js index 104193e486..57bfbacb10 100644 --- a/src/view/form.js +++ b/src/view/form.js @@ -1001,11 +1001,10 @@ function eval_pyson(value){ }); Sao.View.Form.TranslateDialog = Sao.class_(Object, { + class_: 'form', init: function(languages, widget) { - var dialog = new Sao.Dialog(Sao.i18n.gettext('Translate'), - this.class_, this, languages); - dialog.modal.find('.modal-dialog') - .removeClass('modal-sm').addClass('modal-lg'); + var dialog = new Sao.Dialog( + Sao.i18n.gettext('Translate'), this.class_, 'lg'); this.languages = languages; this.read(widget, dialog); jQuery('