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 && gs.userInformation && gs.userInformation.editEnabled == "true")
|
---|
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 recordActionFunction = function()
|
---|
73 | {
|
---|
74 | var action = gs.userInformation.currentAction;
|
---|
75 | if(!action)
|
---|
76 | {
|
---|
77 | action = "viewingPage";
|
---|
78 | }
|
---|
79 | $.ajax(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=" + action);
|
---|
80 |
|
---|
81 | if(action == "savingNote" && gs.userInformation.saveSentOnce)
|
---|
82 | {
|
---|
83 | gs.userInformation.currentAction = "viewingPage";
|
---|
84 | gs.userInformation.saveSentOnce = false;
|
---|
85 | }
|
---|
86 | else if(action == "savingNote")
|
---|
87 | {
|
---|
88 | gs.userInformation.saveSentOnce = true;
|
---|
89 | }
|
---|
90 | }
|
---|
91 | setInterval(recordActionFunction, 5000);
|
---|
92 | recordActionFunction();
|
---|
93 |
|
---|
94 | var userTrackerFunction = function(url)
|
---|
95 | {
|
---|
96 | $.ajax(url)
|
---|
97 | .success(function(response)
|
---|
98 | {
|
---|
99 | statusBar.clear();
|
---|
100 | var xml = $.parseXML(response);
|
---|
101 | $(xml).find("userList user").each(function()
|
---|
102 | {
|
---|
103 | var username = $(this).attr("username");
|
---|
104 | if(username == gs.userInformation.username)
|
---|
105 | {
|
---|
106 | return;
|
---|
107 | }
|
---|
108 |
|
---|
109 | var statusString;
|
---|
110 | if($(this).attr("action") == "viewingPage")
|
---|
111 | {
|
---|
112 | statusString = "User " + $(this).attr("username") + " is currently viewing this page";
|
---|
113 | }
|
---|
114 | else if($(this).attr("action") == "addingNote")
|
---|
115 | {
|
---|
116 | statusString = "User " + $(this).attr("username") + " is currently adding a note";
|
---|
117 | }
|
---|
118 | else if($(this).attr("action") == "editingNote")
|
---|
119 | {
|
---|
120 | statusString = "User " + $(this).attr("username") + " is currently editing a note";
|
---|
121 | }
|
---|
122 | else if($(this).attr("action") == "savingNote")
|
---|
123 | {
|
---|
124 | gs.userInformation.reloadRequired = true;
|
---|
125 | statusString = "User " + $(this).attr("username") + " has saved a note";
|
---|
126 | }
|
---|
127 |
|
---|
128 | if(gs.userInformation.reloadRequired)
|
---|
129 | {
|
---|
130 | statusString += ", a note has been added or changed, please click <a href=\"javascript:location.reload();\">here</a> to reload the page";
|
---|
131 | }
|
---|
132 | statusBar.addStatus(statusString);
|
---|
133 | });
|
---|
134 | });
|
---|
135 | }
|
---|
136 | 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;
|
---|
137 | setInterval(function(){userTrackerFunction(getURL);}, 10000);
|
---|
138 | userTrackerFunction(getURL);
|
---|
139 | }
|
---|
140 | });
|
---|
141 | </xsl:text>
|
---|
142 | </script>
|
---|
143 | </xsl:template>
|
---|
144 |
|
---|
145 | </xsl:stylesheet>
|
---|