Commit 0b445bb2 authored by Julia Radzhabova's avatar Julia Radzhabova

Debug with jquery 3.2.1.

parent 94134156
...@@ -433,7 +433,8 @@ define([ ...@@ -433,7 +433,8 @@ define([
var footer = window.getChild('.footer'); var footer = window.getChild('.footer');
var header = window.getChild('.header'); var header = window.getChild('.header');
var body = window.getChild('.body'); 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'); var check = window.getChild('.info-box .dont-show-checkbox');
if (!options.dontshow) body.css('padding-bottom', '10px'); if (!options.dontshow) body.css('padding-bottom', '10px');
...@@ -443,19 +444,19 @@ define([ ...@@ -443,19 +444,19 @@ define([
options.width = options.maxwidth; options.width = options.maxwidth;
} }
if (options.width=='auto') { 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'))); body.height(parseInt(text_cnt.css('height')) + parseInt(footer.css('height')));
window.setSize(text.position().left + text.width() + parseInt(text_cnt.css('padding-right')), window.setSize(text.position().left + text.width() + parseInt(text_cnt.css('padding-right')),
parseInt(body.css('height')) + parseInt(header.css('height'))); parseInt(body.css('height')) + parseInt(header.css('height')));
} else { } else {
text.css('white-space', 'normal'); text.css('white-space', 'normal');
window.setWidth(options.width); 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'))); body.height(parseInt(text_cnt.css('height')) + parseInt(footer.css('height')));
window.setHeight(parseInt(body.css('height')) + parseInt(header.css('height'))); window.setHeight(parseInt(body.css('height')) + parseInt(header.css('height')));
} }
if (text.height() < icon.height()-10) if (text.height() < icon_height-10)
text.css({'vertical-align': 'baseline', 'line-height': icon.height()+'px'}); text.css({'vertical-align': 'baseline', 'line-height': icon_height+'px'});
} }
function onBtnClick(event) { function onBtnClick(event) {
......
...@@ -102,9 +102,10 @@ define([ ...@@ -102,9 +102,10 @@ define([
btn.on('click', _.bind(me.onCategoryClick, me)); btn.on('click', _.bind(me.onCategoryClick, me));
me.btnsCategory.push(btn); 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); 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'); this.content_panels = $window.find('.settings-panel');
if (this.btnsCategory.length>0) if (this.btnsCategory.length>0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment