+ // 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) + '%';
+ }
+ }