From 8039bfe1217547283a012690a3e453f8f6a60e5a Mon Sep 17 00:00:00 2001 From: Jorge Barnaby Date: Fri, 8 Mar 2013 11:19:42 -0500 Subject: [PATCH 1/5] jquery.dialog2.iframe (to handle modal windows with iframe inside). --- lib/jquery.dialog2.iframe.js | 84 ++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 lib/jquery.dialog2.iframe.js diff --git a/lib/jquery.dialog2.iframe.js b/lib/jquery.dialog2.iframe.js new file mode 100644 index 0000000..93c6854 --- /dev/null +++ b/lib/jquery.dialog2.iframe.js @@ -0,0 +1,84 @@ +/* +* jQuery Dialog2 IFrame +* +* Licensed under the MIT license +* http://www.opensource.org/licenses/mit-license.php +* +* @version: 1.0.1 (17/05/2012) +* +* @requires jQuery >= 1.4 +* +* @requires jQuery.dialog2 plugin >= 1.1 +* +* @author Jorge Barnaby (jorge.barnaby {at} gmail.com) +*/ +(function ($) { + + /* + * Shows a web page (using iframe) in a jQuery dialog2 (Bootstrap style). + * + */ + $.fn.dialog2IFrame = function (options) { + options = $.extend({}, $.fn.dialog2IFrame.defaults, options); + $(this).click(function (e) { + e.preventDefault(); + var idDialogOuter = "dialog-iframe-outer"; + //Creates the div and iframe on body to contain load the URL + if ($('#' + idDialogOuter).length == 0) { + $('