Skip to content
Browse files

Modification for new Minify-API, Refs #1120

  • Loading branch information...
1 parent 208988c commit 081e403a145eb58bfc09748cd3920a0b595dbd5c peterb committed Jul 29, 2010
Showing with 97 additions and 104 deletions.
  1. +1 −1 plugins/Live/Live.php
  2. +0 −103 plugins/Live/templates/index.tpl
  3. +53 −0 plugins/Live/templates/live.css
  4. +43 −0 plugins/Live/templates/scripts/live.js
View
2 plugins/Live/Live.php
@@ -40,7 +40,7 @@ function getCssFiles( $notification )
{
$cssFiles = &$notification->getNotificationObject();
- $cssFiles[] = "themes/default/styles.css";
+ $cssFiles[] = "plugins/Live/templates/live.css";
}
function getJsFiles( $notification )
View
103 plugins/Live/templates/index.tpl
@@ -17,121 +17,18 @@
}
});
- // first I'm ensuring that 'last' has been initialised (with last.constructor == Object),
- // then prev.html() == last.html() will return true if the HTML is the same, or false,
- // if I have a different entry.
- function check_for_dupe(prev, last)
- {
- if (last.constructor == Object) {
- return (prev.html() == last.html());
- }
- else {
- return 0;
- }
- }
-
- function lastIdVisit()
- {
- updateTotalVisits();
- updateVisitBox();
- return $('#visitsLive > div:lt(2) .idvisit').html();
- }
-
- var pauseImage = "plugins/Live/templates/images/pause.gif";
- var pauseDisabledImage = "plugins/Live/templates/images/pause_disabled.gif";
- var playImage = "plugins/Live/templates/images/play.gif";
- var playDisabledImage = "plugins/Live/templates/images/play_disabled.gif";
-
- function onClickPause()
- {
- $('#pauseImage').attr('src', pauseImage);
- $('#playImage').attr('src', playDisabledImage);
- return pauseSpy();
- }
- function onClickPlay()
- {
- $('#playImage').attr('src', playImage);
- $('#pauseImage').attr('src', pauseDisabledImage);
- return playSpy();
- }
-
// updates the numbers of total visits in startbox
function updateTotalVisits()
{
$("#visitsTotal").load("index.php?module=Live&idSite={/literal}{$idSite}{literal}&action=ajaxTotalVisitors");
}
-
// updates the visit table, to refresh the already presented visitors pages
function updateVisitBox()
{
$("#visitsLive").load("index.php?module=Live&idSite={/literal}{$idSite}{literal}&action=getLastVisitsStart");
}
- /* TOOLTIP */
- $('#visitsLive label').tooltip({
- track: true,
- delay: 0,
- showURL: false,
- showBody: " - ",
- fade: 250
- });
-
</script>
-
-<style>
- #visitsLive {
- text-align:left;
- font-size:90%;
- color:#444444;
- }
- #visitsLive .datetime, #visitsLive .country, #visitsLive .referer, #visitsLive .settings, #visitsLive .returning , #visitsLive .countActions{
- border-bottom: 1px solid #d3d1c5;
- border-right:1px solid #d3d1c5;
- padding:5px 5px 5px 12px;
-}
-
- #visitsLive .datetime {
- background:#E4E2D7;
- border-top:1px solid #d3d1c5;
- margin:0;
- text-align:left;
-}
-
- #visitsLive .country {
- background:#FFFFFF url(plugins/CoreHome/templates/images/bullet1.gif) no-repeat scroll 0 0;
-}
-
- #visitsLive .referer {
- background:#F9FAFA none repeat scroll 0 0;
-}
-
-#visitsLive .referer:hover {
- background:#FFFFF7;
-}
-
- #visitsLive .pagesTitle {
- display:block;
- float:left;
-}
-
- #visitsLive .countActions {
- background:#FFFFFF none repeat scroll 0 0;
- }
-
- #visitsLive .settings {
- background:#FFFFFF none repeat scroll 0 0;
- }
-
- #visitsLive .returning {
- background:#F9FAFA none repeat scroll 0 0;
- }
-
- .visitsLiveFooter a.rightLink{
- float:right;
- padding-right:20px;
- }
-
-</style>
{/literal}
<div id="visitsTotal">
View
53 plugins/Live/templates/live.css
@@ -0,0 +1,53 @@
+@CHARSET "UTF-8";
+
+ #visitsLive {
+ text-align:left;
+ font-size:90%;
+ color:#444444;
+ }
+ #visitsLive .datetime, #visitsLive .country, #visitsLive .referer, #visitsLive .settings, #visitsLive .returning , #visitsLive .countActions{
+ border-bottom: 1px solid #d3d1c5;
+ border-right:1px solid #d3d1c5;
+ padding:5px 5px 5px 12px;
+}
+
+ #visitsLive .datetime {
+ background:#E4E2D7;
+ border-top:1px solid #d3d1c5;
+ margin:0;
+ text-align:left;
+}
+
+ #visitsLive .country {
+ background:#FFFFFF url(plugins/CoreHome/templates/images/bullet1.gif) no-repeat scroll 0 0;
+}
+
+ #visitsLive .referer {
+ background:#F9FAFA none repeat scroll 0 0;
+}
+
+#visitsLive .referer:hover {
+ background:#FFFFF7;
+}
+
+ #visitsLive .pagesTitle {
+ display:block;
+ float:left;
+}
+
+ #visitsLive .countActions {
+ background:#FFFFFF none repeat scroll 0 0;
+ }
+
+ #visitsLive .settings {
+ background:#FFFFFF none repeat scroll 0 0;
+ }
+
+ #visitsLive .returning {
+ background:#F9FAFA none repeat scroll 0 0;
+ }
+
+ .visitsLiveFooter a.rightLink{
+ float:right;
+ padding-right:20px;
+ }
View
43 plugins/Live/templates/scripts/live.js
@@ -0,0 +1,43 @@
+// first I'm ensuring that 'last' has been initialised (with last.constructor == Object),
+// then prev.html() == last.html() will return true if the HTML is the same, or false,
+// if I have a different entry.
+function check_for_dupe(prev, last)
+{
+if (last.constructor == Object) {
+ return (prev.html() == last.html());
+}
+else {
+ return 0;
+}
+}
+function lastIdVisit()
+{
+ updateTotalVisits();
+ updateVisitBox();
+ return $('#visitsLive > div:lt(2) .idvisit').html();
+}
+var pauseImage = "plugins/Live/templates/images/pause.gif";
+var pauseDisabledImage = "plugins/Live/templates/images/pause_disabled.gif";
+var playImage = "plugins/Live/templates/images/play.gif";
+var playDisabledImage = "plugins/Live/templates/images/play_disabled.gif";
+function onClickPause()
+{
+ $('#pauseImage').attr('src', pauseImage);
+ $('#playImage').attr('src', playDisabledImage);
+ return pauseSpy();
+}
+function onClickPlay()
+{
+ $('#playImage').attr('src', playImage);
+ $('#pauseImage').attr('src', pauseDisabledImage);
+ return playSpy();
+}
+
+/* TOOLTIP */
+$('#visitsLive label').tooltip({
+ track: true,
+ delay: 0,
+ showURL: false,
+ showBody: " - ",
+ fade: 250
+});

0 comments on commit 081e403

Please sign in to comment.
Something went wrong with that request. Please try again.