From 465273ad49bde5fbaac6d3f8225851069bd471f7 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Thu, 25 Apr 2019 16:05:44 +0300 Subject: [PATCH] [SSE mobile] Add current units in page size settings --- apps/spreadsheeteditor/mobile/app/controller/Settings.js | 7 ++++++- apps/spreadsheeteditor/mobile/app/view/Settings.js | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/spreadsheeteditor/mobile/app/controller/Settings.js b/apps/spreadsheeteditor/mobile/app/controller/Settings.js index 54a9bdd61..7112015ea 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Settings.js @@ -237,7 +237,12 @@ define([ var $pageSize = $('#settings-spreadsheet-format'); this.changeCurrentPageSize(opt.asc_getWidth(), opt.asc_getHeight()); $pageSize.find('.item-title').text(_pageSizes[_pageSizesIndex]['caption']); - $pageSize.find('.item-subtitle').text(_pageSizes[_pageSizesIndex]['subtitle']); + var curMetricName = Common.Utils.Metric.getMetricName(Common.Utils.Metric.getCurrentMetric()), + sizeW = Common.Utils.Metric.fnRecalcFromMM(_pageSizes[_pageSizesIndex]['value'][0]).toFixed(2), + sizeH = Common.Utils.Metric.fnRecalcFromMM(_pageSizes[_pageSizesIndex]['value'][1]).toFixed(2); + + var pageSizeTxt = sizeW + ' ' + curMetricName + ' x ' + sizeH + ' ' + curMetricName; + $pageSize.find('.item-subtitle').text(pageSizeTxt); }, changeCurrentPageSize: function(w, h) { diff --git a/apps/spreadsheeteditor/mobile/app/view/Settings.js b/apps/spreadsheeteditor/mobile/app/view/Settings.js index 8ed7ca186..2c0087add 100644 --- a/apps/spreadsheeteditor/mobile/app/view/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/view/Settings.js @@ -244,8 +244,7 @@ define([ '
', '
<%= item.caption %>
', '
', - // '
<%= parseFloat(Common.Utils.Metric.fnRecalcFromMM(item.value[0]).toFixed(2)) %><%= Common.Utils.Metric.getCurrentMetricName() %> x <%= parseFloat(Common.Utils.Metric.fnRecalcFromMM(item.value[1]).toFixed(2)) %> <%= Common.Utils.Metric.getCurrentMetricName() %>
', - '
<%= item.subtitle %>
', + '
<%= parseFloat(Common.Utils.Metric.fnRecalcFromMM(item.value[0]).toFixed(2)) %> <%= Common.Utils.Metric.getCurrentMetricName() %> x <%= parseFloat(Common.Utils.Metric.fnRecalcFromMM(item.value[1]).toFixed(2)) %> <%= Common.Utils.Metric.getCurrentMetricName() %>
', '', '', ''