1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <xsl:stylesheet version="1.0"
|
---|
3 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
4 | xmlns:java="http://xml.apache.org/xslt/java"
|
---|
5 | xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
|
---|
6 | xmlns:gslib="http://www.greenstone.org/skinning"
|
---|
7 | xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
|
---|
8 | extension-element-prefixes="java util"
|
---|
9 | exclude-result-prefixes="java util gsf">
|
---|
10 |
|
---|
11 | <xsl:template name="PeiJoinesBackground">
|
---|
12 | <style>
|
---|
13 | body {
|
---|
14 | background-image: url(sites/<xsl:value-of select="$site_name"/>/images/background.jpg);
|
---|
15 | background-repeat: no-repeat;
|
---|
16 | background-position: center top;
|
---|
17 | background-color: #2d2d2d;
|
---|
18 | }
|
---|
19 |
|
---|
20 | #containerXXX {
|
---|
21 | max-width: 980px;
|
---|
22 | }
|
---|
23 |
|
---|
24 | #topArea {
|
---|
25 | margin: 0px auto 0;
|
---|
26 | /* max-width: 970px; */
|
---|
27 | }
|
---|
28 |
|
---|
29 | .ui-widget-header {
|
---|
30 | background: url(sites/<xsl:value-of select="$site_name"/>/images/pei-jones-banner-bg.png);
|
---|
31 | repeat-x scroll left top #f1ce28;
|
---|
32 | }
|
---|
33 |
|
---|
34 | .ui-widget-content {
|
---|
35 | color: #888888;
|
---|
36 | }
|
---|
37 |
|
---|
38 | .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
|
---|
39 | /* background: url("images/ui-bg_highlight-hard_15_459e00_1x100.png") repeat-x scroll 50% 50% #459E00; */
|
---|
40 | /* background: url(interfaces/<xsl:value-of select="$interface_name"/>/xxstyle/themes/main/images/ui-bg_highlight-hard_15_459e00_1x100.png) repeat-x scroll 50% 50% #a0a0a0; */
|
---|
41 |
|
---|
42 | background: none repeat-x scroll 50% 50% #a0a0a0;
|
---|
43 | /* border: 1px solid #327E04; */
|
---|
44 | border: 1px solid #808080;
|
---|
45 | color: #FFFFFF;
|
---|
46 | font-weight: bold;
|
---|
47 | }
|
---|
48 |
|
---|
49 | .ui-widget-header {
|
---|
50 | border: 1px solid #808080;
|
---|
51 | }
|
---|
52 |
|
---|
53 | .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {
|
---|
54 | color: #000000;
|
---|
55 | /* text-decoration: none; */
|
---|
56 | }
|
---|
57 | </style>
|
---|
58 | </xsl:template>
|
---|
59 |
|
---|
60 | <xsl:template name="UserTrackerScripts">
|
---|
61 | <script type="text/javascript">
|
---|
62 | <xsl:text disable-output-escaping="yes">
|
---|
63 | $(window).load(function()
|
---|
64 | {
|
---|
65 | if(gs.cgiParams.d != undefined && gs.userInformation != undefined)
|
---|
66 | {
|
---|
67 | var statusBarDiv = $("<div>");
|
---|
68 | $("#gs_content").prepend(statusBarDiv);
|
---|
69 | var statusBar = new StatusBar(statusBarDiv[0]);
|
---|
70 | var statusUsernameMap = new Array();
|
---|
71 |
|
---|
72 | var recordURL = gs.xsltParams.library_name + "?a=g&rt=ro&s=RecordUserAction&s1.site=" + gs.xsltParams.site_name + "&s1.collection=" + gs.cgiParams.c + "&s1.oid=" + gs.cgiParams.d + "&s1.username=" + gs.userInformation.username + "&s1.action=viewingPage";
|
---|
73 | var recordActionFunction = function(url)
|
---|
74 | {
|
---|
75 | $.ajax(url);
|
---|
76 | }
|
---|
77 | setInterval(function(){recordActionFunction(recordURL);}, 10000);
|
---|
78 | recordActionFunction(recordURL);
|
---|
79 |
|
---|
80 | var userTrackerFunction = function(url)
|
---|
81 | {
|
---|
82 | $.ajax(url)
|
---|
83 | .success(function(response)
|
---|
84 | {
|
---|
85 | var xml = $.parseXML(response);
|
---|
86 | $(xml).find("userList user").each(function()
|
---|
87 | {
|
---|
88 | var username = $(this).attr("username");
|
---|
89 | if(username == gs.userInformation.username)
|
---|
90 | {
|
---|
91 | return;
|
---|
92 | }
|
---|
93 |
|
---|
94 | statusBar.removeStatus(statusUsernameMap[username]);
|
---|
95 | if($(this).attr("action") == "viewingPage")
|
---|
96 | {
|
---|
97 | var statusID = statusBar.addStatus("User " + $(this).attr("username") + " is currently viewing this page");
|
---|
98 | }
|
---|
99 | statusUsernameMap[username] = statusID;
|
---|
100 | });
|
---|
101 | });
|
---|
102 | }
|
---|
103 | var getURL = gs.xsltParams.library_name + "?a=g&rt=ro&s=GetActivityOnPage&s1.site=" + gs.xsltParams.site_name + "&s1.collection=" + gs.cgiParams.c + "&s1.oid=" + gs.cgiParams.d;
|
---|
104 | setInterval(function(){userTrackerFunction(getURL);}, 20000);
|
---|
105 | userTrackerFunction(getURL);
|
---|
106 | }
|
---|
107 | });
|
---|
108 | </xsl:text>
|
---|
109 | </script>
|
---|
110 | </xsl:template>
|
---|
111 |
|
---|
112 | </xsl:stylesheet>
|
---|