From cf90639163f7448b387b04f2b2961164f66c90b7 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 17 Apr 2017 15:06:39 +0300 Subject: [PATCH] Debug with jquery 3.2.1. --- apps/common/main/lib/component/Window.js | 11 ++++++----- apps/common/main/lib/view/AdvancedSettingsWindow.js | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index 8cba972e8..37f78a80e 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -433,7 +433,8 @@ define([ var footer = window.getChild('.footer'); var header = window.getChild('.header'); var body = window.getChild('.body'); - var icon = window.getChild('.icon'); + var icon = window.getChild('.icon'), + icon_height = (icon.length>0) ? icon.height() : 0; var check = window.getChild('.info-box .dont-show-checkbox'); if (!options.dontshow) body.css('padding-bottom', '10px'); @@ -443,19 +444,19 @@ define([ options.width = options.maxwidth; } if (options.width=='auto') { - text_cnt.height(Math.max(text.height() + ((check.length>0) ? (check.height() + parseInt(check.css('margin-top'))) : 0), icon.height())); + text_cnt.height(Math.max(text.height() + ((check.length>0) ? (check.height() + parseInt(check.css('margin-top'))) : 0), icon_height)); body.height(parseInt(text_cnt.css('height')) + parseInt(footer.css('height'))); window.setSize(text.position().left + text.width() + parseInt(text_cnt.css('padding-right')), parseInt(body.css('height')) + parseInt(header.css('height'))); } else { text.css('white-space', 'normal'); window.setWidth(options.width); - text_cnt.height(Math.max(text.height() + ((check.length>0) ? (check.height() + parseInt(check.css('margin-top'))) : 0), icon.height())); + text_cnt.height(Math.max(text.height() + ((check.length>0) ? (check.height() + parseInt(check.css('margin-top'))) : 0), icon_height)); body.height(parseInt(text_cnt.css('height')) + parseInt(footer.css('height'))); window.setHeight(parseInt(body.css('height')) + parseInt(header.css('height'))); } - if (text.height() < icon.height()-10) - text.css({'vertical-align': 'baseline', 'line-height': icon.height()+'px'}); + if (text.height() < icon_height-10) + text.css({'vertical-align': 'baseline', 'line-height': icon_height+'px'}); } function onBtnClick(event) { diff --git a/apps/common/main/lib/view/AdvancedSettingsWindow.js b/apps/common/main/lib/view/AdvancedSettingsWindow.js index 5c8ece182..693fbc094 100644 --- a/apps/common/main/lib/view/AdvancedSettingsWindow.js +++ b/apps/common/main/lib/view/AdvancedSettingsWindow.js @@ -102,9 +102,10 @@ define([ btn.on('click', _.bind(me.onCategoryClick, me)); me.btnsCategory.push(btn); }); - var cnt_panel = $window.find('.content-panel'); + var cnt_panel = $window.find('.content-panel'), + menu_panel = $window.find('.menu-panel'); cnt_panel.width(this.contentWidth); - $window.width($window.find('.menu-panel').width() + cnt_panel.outerWidth() + 2); + $window.width(((menu_panel.length>0) ? menu_panel.width() : 0) + cnt_panel.outerWidth() + 2); this.content_panels = $window.find('.settings-panel'); if (this.btnsCategory.length>0)