diff --git a/public_html/modules/dashboard.php b/public_html/modules/dashboard.php index ae36d42..cce9c26 100644 --- a/public_html/modules/dashboard.php +++ b/public_html/modules/dashboard.php @@ -51,6 +51,7 @@ try $sCampaigns[] = array( "name" => $sCampaign->sName, + "urlname" => $sCampaign->sUrlName, "subscribers" => number_format($sCampaign->sSubscriberCount, 0), "rate" => number_format($sCampaign->sDonationRate, 2), "total" => Currency::Format("usd", $sCampaign->sMonthlyTotal), diff --git a/public_html/static/css/style.css b/public_html/static/css/style.css index 4599fa5..d2daba4 100644 --- a/public_html/static/css/style.css +++ b/public_html/static/css/style.css @@ -34,6 +34,20 @@ pre.debug clear: both; } +/************************************** + * CLICKABLE * + **************************************/ + +.clickable +{ + cursor: pointer; +} + +.clickable:hover +{ + background-color: #F6FFE6; +} + /************************************** * HEADER * **************************************/ diff --git a/public_html/static/script/script.js b/public_html/static/script/script.js new file mode 100644 index 0000000..28d7207 --- /dev/null +++ b/public_html/static/script/script.js @@ -0,0 +1,30 @@ +$(function(){ + $('.clickable').click(function(event) + { + if($(this).data('url')) + { + url = $(this).data('url'); + + if(event.which == 1) + { + if($(this).hasClass('external')) + { + window.open(url); + } + else + { + window.location = url; + } + + event.stopPropagation(); + return false; + } + else if(event.which == 2) + { + window.open(url); + event.stopPropagation(); + return false; + } + } + }); +}); diff --git a/public_html/templates/dashboard.tpl b/public_html/templates/dashboard.tpl index acc6be8..c30688f 100644 --- a/public_html/templates/dashboard.tpl +++ b/public_html/templates/dashboard.tpl @@ -19,7 +19,7 @@