From 9c93257008106fd6ecc721abb5b807cb7670900b Mon Sep 17 00:00:00 2001 From: atomaka Date: Thu, 10 Nov 2011 00:06:36 -0500 Subject: [PATCH] Override alert box with a jquery-ui dialog box. --- application/views/template.php | 12 ++++++++++-- css/style.css | 5 ++++- js/jquery.altAlert.js | 21 +++++++++++++++++++++ 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 js/jquery.altAlert.js diff --git a/application/views/template.php b/application/views/template.php index aa21386..81af5ee 100644 --- a/application/views/template.php +++ b/application/views/template.php @@ -5,6 +5,7 @@ + @@ -44,8 +45,15 @@ break; } }); + $(function () { + $.altAlert({ + resizable: false, + }); + }); - - + + + + \ No newline at end of file diff --git a/css/style.css b/css/style.css index 6221178..9bfd74f 100644 --- a/css/style.css +++ b/css/style.css @@ -28,7 +28,9 @@ html { body { color: #fff; min-height: 600px; - font: 14px/1.3 'Segoe UI',Arial, sans-serif; + /*font: 14px/1.3 'Segoe UI',Arial, sans-serif;*/ + font-family: 'Segoe UI', Arial, sans-serif; + font-size: 12px; } a, a:visited { @@ -56,6 +58,7 @@ header { header{ background-color: #303030; background-image: url(../img/dark_circles.png); + font-size: 16px; /*position: fixed;*/ width: 100%; height: 25px; diff --git a/js/jquery.altAlert.js b/js/jquery.altAlert.js new file mode 100644 index 0000000..ab93b28 --- /dev/null +++ b/js/jquery.altAlert.js @@ -0,0 +1,21 @@ +jQuery.altAlert = function (options) +{ + var defaults = { + title: "Alert", + buttons: { + "Ok": function() + { + jQuery(this).dialog("close"); + } + } + }; + + jQuery.extend(defaults, options); + + delete defaults.autoOpen; + + window.alert = function () + { + jQuery("
", { html: arguments[0].replace(/\n/, "
") }).dialog(defaults); + }; +}; \ No newline at end of file