if (typeof settings.dialog.height === 'string' && settings.dialog.height.indexOf('%') > 0) {
settings.dialog.height = parseInt($(window).height() * (parseFloat(settings.dialog.height)/100), 10);
}
+ // Increase percent width on small screens
+ if (typeof settings.dialog.width === 'string' && settings.dialog.width.indexOf('%') > 0) {
+ var screenWidth = $(window).width(),
+ percentage = parseInt(settings.dialog.width.replace('%', ''), 10),
+ gap = 100-percentage;
+ if (screenWidth < 701) {
+ settings.dialog.width = '100%';
+ }
+ else if (screenWidth < 1400) {
+ settings.dialog.width = '' + parseInt(percentage+gap-((screenWidth - 700)/7*(gap)/100), 10) + '%';
+ }
+ }
$('<div id="'+ settings.target.substring(1) +'"><div class="crm-loading-element">' + ts('Loading') + '...</div></div>').dialog(settings.dialog);
$(settings.target)
.on('dialogclose', function() {