From e56390e82b3628303e2c8e87fd17ea748e4233b6 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 17 Mar 2022 16:59:35 +0300 Subject: [PATCH] Fix label width for different translations --- apps/documenteditor/main/app/controller/Statusbar.js | 4 +++- apps/presentationeditor/main/app/controller/Statusbar.js | 4 +++- apps/spreadsheeteditor/main/app/controller/Statusbar.js | 1 + apps/spreadsheeteditor/main/resources/less/statusbar.less | 2 -- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Statusbar.js b/apps/documenteditor/main/app/controller/Statusbar.js index d1b865ae4..5854d1fe6 100644 --- a/apps/documenteditor/main/app/controller/Statusbar.js +++ b/apps/documenteditor/main/app/controller/Statusbar.js @@ -93,7 +93,9 @@ define([ me.statusbar.render(cfg); me.statusbar.$el.css('z-index', 1); - $('.statusbar #label-zoom').css('min-width', 80); + var lblzoom = $('.statusbar #label-zoom'); + lblzoom.css('min-width', 80); + lblzoom.text(Common.Utils.String.format(me.zoomText, 100)); if ( cfg.isEdit ) { var review = me.getApplication().getController('Common.Controllers.ReviewChanges').getView(); diff --git a/apps/presentationeditor/main/app/controller/Statusbar.js b/apps/presentationeditor/main/app/controller/Statusbar.js index 12281714c..542110b20 100644 --- a/apps/presentationeditor/main/app/controller/Statusbar.js +++ b/apps/presentationeditor/main/app/controller/Statusbar.js @@ -87,7 +87,9 @@ define([ this.bindViewEvents(this.statusbar, this.events); - $('#status-label-zoom').css('min-width', 80); + var lblzoom = $('#status-label-zoom'); + lblzoom.css('min-width', 80); + lblzoom.text(Common.Utils.String.format(this.zoomText, 100)); this.statusbar.btnZoomToPage.on('click', _.bind(this.onBtnZoomTo, this, 'topage')); this.statusbar.btnZoomToWidth.on('click', _.bind(this.onBtnZoomTo, this, 'towidth')); diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index 398db2c65..c61c3ee4a 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -89,6 +89,7 @@ define([ this.statusbar = this.createView('Statusbar').render(); this.statusbar.$el.css('z-index', 10); this.statusbar.labelZoom.css('min-width', 80); + this.statusbar.labelZoom.text(Common.Utils.String.format(this.zoomText, 100)); this.statusbar.zoomMenu.on('item:click', _.bind(this.menuZoomClick, this)); this.bindViewEvents(this.statusbar, this.events); diff --git a/apps/spreadsheeteditor/main/resources/less/statusbar.less b/apps/spreadsheeteditor/main/resources/less/statusbar.less index 6e19df2bf..4e885adc4 100644 --- a/apps/spreadsheeteditor/main/resources/less/statusbar.less +++ b/apps/spreadsheeteditor/main/resources/less/statusbar.less @@ -10,8 +10,6 @@ } #status-zoom-box { - width: 160px; - //float: right; padding-top: 3px; position: absolute;