Commit be7c3de4 authored by Julia Radzhabova's avatar Julia Radzhabova

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

parent ccded151
......@@ -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')));
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
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