From ea6ef5d648aa27102bd45267da0e6b729e36e05f Mon Sep 17 00:00:00 2001
From: Cameron <cameron@e107coders.org>
Date: Wed, 13 Mar 2013 03:25:38 -0700
Subject: [PATCH] Partial fix for modal window size

---
 e107_admin/header.php                                         | 2 +-
 e107_plugins/tinymce/plugins/e107bbcode/editor_plugin.js      | 2 +-
 .../tinymce/plugins/jqueryinlinepopups/editor_plugin.js       | 4 +++-
 e107_themes/bootstrap/admin_style.css                         | 3 ++-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/e107_admin/header.php b/e107_admin/header.php
index 550fc26b7..37b760bd1 100644
--- a/e107_admin/header.php
+++ b/e107_admin/header.php
@@ -496,7 +496,7 @@ if ($e107_popup != 1)
 	}
 	else 
 	{
-		e107::css("inline","body { padding:10px } "); // default padding for iFrame-only. 
+		e107::css("inline","body { padding:0px } "); // default padding for iFrame-only. 
 	}
 
 	e107::getDb()->db_Mark_Time('(End: Parse Admin Header)');
diff --git a/e107_plugins/tinymce/plugins/e107bbcode/editor_plugin.js b/e107_plugins/tinymce/plugins/e107bbcode/editor_plugin.js
index 9b3546cfa..adf0ef336 100644
--- a/e107_plugins/tinymce/plugins/e107bbcode/editor_plugin.js
+++ b/e107_plugins/tinymce/plugins/e107bbcode/editor_plugin.js
@@ -13,7 +13,7 @@
 				ed.windowManager.open({
 					file : url + '/dialog.php',
 					width : 900 , // + parseInt(ed.getLang('e107bbcode.delta_width', 0)),
-					height : 400, //  + parseInt(ed.getLang('e107bbcode.delta_height', 0)),
+					height : 450, //  + parseInt(ed.getLang('e107bbcode.delta_height', 0)),
 					inline : 1
 				}, {
 					plugin_url : url, // Plugin absolute URL
diff --git a/e107_plugins/tinymce/plugins/jqueryinlinepopups/editor_plugin.js b/e107_plugins/tinymce/plugins/jqueryinlinepopups/editor_plugin.js
index 4ed79d416..97c90dd5f 100644
--- a/e107_plugins/tinymce/plugins/jqueryinlinepopups/editor_plugin.js
+++ b/e107_plugins/tinymce/plugins/jqueryinlinepopups/editor_plugin.js
@@ -26,7 +26,7 @@
 		getInfo : function() {
 			return {
 				longname : 'jQuery UI Inline Popups',
-				author : 'Richard Willis',
+				author : 'Richard Willis. Modified by e107 Inc.',
 				authorurl : 'http://badsyntax.co',
 				infourl : 'http://is.gd/j1FuI',
 				version : '0.1b'
@@ -131,8 +131,10 @@
 				var wdt	= f.width + 'px';
 				$('#uiModal .modal-caption').text(f.title);
 			//	$('#uiModal').css('height',f.height + "px");
+				var windowHeight = $(window).height() - 50;
 				$('#uiModal').width(wdt);
 				$('#uiModal').css('min-width','800px');
+				$('#uiModal').css('max-height', $(window).height());
 				
 				$('#uiModal .modal-body').html("<iframe src='" + src + "' width='100%' height='" + (f.height + 60) + "px' frameborder='0'></iframe>"); 
 				$('#uiModal .modal-footer').text('');
diff --git a/e107_themes/bootstrap/admin_style.css b/e107_themes/bootstrap/admin_style.css
index 342b159d2..61fcd2511 100644
--- a/e107_themes/bootstrap/admin_style.css
+++ b/e107_themes/bootstrap/admin_style.css
@@ -86,8 +86,9 @@ a.brand:hover img 			{
 
 .modal 										{ min-width:800px; left:38%; z-index:10001}
 .modal-header								{ border-radius: 6px 6px 6px 6px; border-bottom:1px solid #DDDDDD; padding-left:20px; background-image: -moz-linear-gradient(center top , rgb(253, 253, 253) 0%, rgb(234, 234, 234) 100%); }
-.modal-body									{ max-height:800px }
+.modal-body									{ max-height:500px; padding:10px }
 #media-select-container						{ min-height:378px }
+.modal.fade.in 								{  top: 5%; }
 
 @media (min-width: 1500px) {