From f6684bb08bc6eb7d7026e7c5c3830db681b46292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 7 Aug 2019 19:21:30 +0200 Subject: [PATCH] Set wizard name for dialog and unify wizard name management issue8535 review287841002 --- src/wizard.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/wizard.js b/src/wizard.js index 193cf26368..bbdf08914f 100644 --- a/src/wizard.js +++ b/src/wizard.js @@ -8,7 +8,7 @@ this.widget = jQuery('
', { 'class': 'wizard' }); - this.name = name || ''; + this.name = name || Sao.i18n.gettext('Wizard'); this.action_id = null; this.id = null; this.ids = null; @@ -171,7 +171,7 @@ this.header.append(jQuery('

', { 'class': 'model-title', 'title': this.name, - }).append(Sao.common.ellipsize(this.name, 20))); + }).append(Sao.common.ellipsize(this.name, 80))); this.widget.append(this.screen.screen_container.el); } }); @@ -190,9 +190,8 @@ Sao.Wizard.Form = Sao.class_(Sao.Wizard, { init: function(name) { - Sao.Wizard.Form._super.init.call(this); + Sao.Wizard.Form._super.init.call(this, name); this.tab = null; // Filled by Sao.Tab.Wizard - this.name = name || ''; this.header = jQuery('
', { 'class': 'modal-header', @@ -241,10 +240,7 @@ Sao.Wizard.Dialog = Sao.class_(Sao.Wizard, { // TODO nomodal init: function(name) { - if (!name) { - name = Sao.i18n.gettext('Wizard'); - } - Sao.Wizard.Dialog._super.init.call(this); + Sao.Wizard.Dialog._super.init.call(this, name); var dialog = new Sao.Dialog(name, 'wizard-dialog', 'md', false); this.dialog = dialog.modal; this.header = dialog.header;