Limited size of warning window (use autosize or maximum width).

This commit is contained in:
Julia Radzhabova 2016-08-09 12:25:34 +03:00
parent ccded15130
commit be7c3de41d
4 changed files with 7 additions and 3 deletions

View file

@ -434,6 +434,10 @@ define([
if (!options.dontshow) body.css('padding-bottom', '10px');
if (options.maxwidth && options.width=='auto') {
if ((text.position().left + text.width() + parseInt(text_cnt.css('padding-right'))) > options.maxwidth)
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()));
body.height(parseInt(text_cnt.css('height')) + parseInt(footer.css('height')));

View file

@ -313,7 +313,7 @@ define([
if (!old_rights)
Common.UI.warning({
title: this.notcriticalErrorTitle,
width: _.isEmpty(data.message) ? 'auto' : 350,
maxwidth: 600,
msg : _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message,
callback: function(){
me._state.lostEditingRights = false;

View file

@ -294,7 +294,7 @@ define([
if (!old_rights)
Common.UI.warning({
title: this.notcriticalErrorTitle,
width: _.isEmpty(data.message) ? 'auto' : 350,
maxwidth: 600,
msg : _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message,
callback: function(){
me._state.lostEditingRights = false;

View file

@ -325,7 +325,7 @@ define([
if (!old_rights)
Common.UI.warning({
title: this.notcriticalErrorTitle,
width: _.isEmpty(data.message) ? 'auto' : 350,
maxwidth: 600,
msg : _.isEmpty(data.message) ? this.warnProcessRightsChange : data.message,
callback: function(){
me._state.lostEditingRights = false;