Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 611 lines (444 sloc) 27.22 kb
f3ddc8e @mreidsma First commit
mreidsma authored
1 </div><!-- End #main -->
2 </div><!-- End #page-content -->
3
4 <div id="navigation">
5
6 <ul id="navigation-menu">
7 <li><a href="http://gvsu.edu/library">Library Home</a></li>
429da6a @mreidsma Updated to newest version, including updates to Illiad home page
mreidsma authored
8 <li><a href="http://gvsu.edu/library/find" class="navparent" target="_self">Find</a>
9 <ul>
10 <li><a href="http://gvsu.edu/library/databases.htm" class="" target="_self">Databases</a></li>
11 <li><a href="http://gvsu.edu/library/findarticles" class="" target="_self">Articles</a></li>
12 <li><a href="http://gvsu.edu/library/findbooks" class="" target="_self">Books</a></li>
13 <li><a href="http://libguides.gvsu.edu" class="" target="_self">Subject &amp; Course Guides</a></li>
14 <li><a href="http://gvsu.edu/library/findjournals" class="" target="_self">Magazines &amp; Journals</a></li>
15 <li><a href="http://gvsu.edu/library/govdoc" class="" target="_self">Government Resources</a></li>
16 <li><a href="http://gvsu.edu/library/digitalcollections" class="" target="_self">Digital Collections</a></li>
17 <li><a href="http://gvsu.edu/library/specialcollections" class="" target="_self">Special Collections &amp; University Archives</a></li>
18 <li><a href="http://gvsu.edu/s/jn" class="" target="_self">ScholarWorks@GVSU Institutional Repository</a></li>
19 <li><a href="http://gvsu.edu/library/cml" class="" target="_self">Curriculum Materials</a></li>
20 </ul>
21 </li>
22 <li><a href="http://gvsu.edu/library/allservices" class="navparent" target="_self">Services</a>
23 <ul>
24 <li><a href="http://gvsu.edu/library/studentsupport" class="navparent">Student Support</a>
25 <ul>
26 <li><a href="http://gvsu.edu/library/student-support-220.htm#articles">Get Articles</a></li>
27 <li><a href="http://gvsu.edu/library/student-support-220.htm#books">Get Books</a></li>
28 <li><a href="http://gvsu.edu/library/student-support-220.htm#research">Get Research Help</a></li>
29 <li><a href="http://gvsu.edu/library/citationtools">Citation Tools</a></li>
30 <li><a href="http://gvsu.edu/library/student-support-220.htm#technology">Technology in the Library</a></li>
31 <li><a href="http://gvsu.edu/library/distancelearning">Distance Learning</a></li>
32 <li><a href="http://gvsu.edu/library/libraryquest">Library Quest</a></li>
33 </ul>
34 </li>
35 <li><a href="http://gvsu.edu/library/groupstudy">Reserve a Study Room</a></li>
36 <li><a href="http://gvsu.edu/library/ereserves" class="" target="_self">Course Reserves</a></li>
37 <li><a href="http://gvsu.edu/library/ill" class="" target="_self">Document Delivery</a></li>
38 <li><a href="http://gvsu.edu/library/instruction" class="" target="_self">Instructional Services</a></li>
39 <li><a href="http://gvsu.edu/library/sc/" class="navparent" target="_self">Scholarly Communications</a>
40 <ul>
41 <li><a href="http://gvsu.edu/s/jm" class="" target="_self">ScholarWorks@GVSU Institutional Repository</a></li>
42 </ul>
43 </li>
44 <li><a href="http://gvsu.edu/library/mastersprojects" class="" target="_self">Master's Projects</a></li>
45 <li><a href="http://gvsu.edu/library/labs" class="navparent" target="_self">Library Labs</a>
46 <ul>
47 <li><a href="http://gvsu.edu/library/status">Library Systems' Status</a></li>
48 </ul>
49 </li>
50 </ul>
51 </li>
52 <li><a href="http://gvsu.edu/library/about" class="navparent" target="_self">About</a>
53 <ul>
54 <!--li><a href="http://gvsu.edu/chat" class="" target="_self">Contact Us</a></li-->
55 <li><a href="#" class="navparent">People</a>
56 <ul>
57 <li><a href="http://gvsu.edu/library/librarians" class="" target="_self">Subject Librarians </a></li>
58 <li><a href="http://gvsu.edu/library/staff" class="" target="_self">Staff</a></li>
59 <li><a href="http://gvsu.edu/library/lsac" class="" target="_self">Student Advisory Council</a></li>
60 <li><a href="http://gvsu.edu/library/jobs" class="" target="_self">Jobs</a></li>
61 </ul>
62 </li>
63 <li><a href="#" class="navparent">Visiting</a>
64 <ul>
65 <li><a href="http://gvsu.edu/library/hours.htm" class="" target="_self">Hours</a></li>
66 <li><a href="http://gvsu.edu/library/tours" class="" target="_self">Tours</a></li>
67 <li><a href="http://gvsu.edu/library/maryidemapew" class="" target="_self">Mary Idema Pew Library</a></li>
68 <li><a href="http://gvsu.edu/library/steelcase" class="" target="_self">Steelcase Library</a></li>
69 <li><a href="http://gvsu.edu/library/freychs" class="" target="_self">Frey Foundation Learning Center</a></li>
70 <li><a href="http://gvsu.edu/library/seidmanhouse" class="" target="_self">Seidman House</a></li>
71 <li><a href="http://gvsu.edu/library/cml" class="" target="_self">Curriculum Materials Library</a></li>
72 </ul>
73 </li>
74 </ul>
75 </li>
76 </ul>
f3ddc8e @mreidsma First commit
mreidsma authored
77
78 <div class="clear"></div>
79
80 <div id="navigation-contact">
81
82 <p><b>University Libraries</b><br />
83 <a href="mailto:library@gvsu.edu">library@gvsu.edu</a><br />
84 Phone: 616-331-3500<br></p>
85
86 </div><!-- End #navigation-contact -->
87
88 <div id="navigation-contact-socialMedia">
89
429da6a @mreidsma Updated to newest version, including updates to Illiad home page
mreidsma authored
90 <p>
f3ddc8e @mreidsma First commit
mreidsma authored
91
92 <a href="http://twitter.com/gvsulib"><img src="/illiad/img/twitter.png" alt="Twitter" title="Twitter" width="32" height="32"></a>
93
94 <a href="http://youtube.com/user/gvsulib"><img src="/illiad/img/youtube.png" alt="YouTube" title="YouTube" width="32" height="32"></a></p>
95
96 </div><!-- End #navigation-contact-socialMedia -->
97
98 <div id="navigation-footer">
429da6a @mreidsma Updated to newest version, including updates to Illiad home page
mreidsma authored
99
100 <style type="text/css">
101 .chat { display: inline-block; padding-left: 1.45em; }
102 .chat-online { background-image: url(/illiad/img/chat-online.png); background-repeat:no-repeat;background-position:middle left; }
103 .chat-offline { background-image: url(/illiad/img/chat-offline.png); background-repeat:no-repeat;background-position:middle left; color: #575757 !important;}</style>
104 <div class="needs-js">
105 &nbsp;</div>
106 <div class="libraryh3lp" jid="gvsulibs-queue@chat.libraryh3lp.com" style="display: none;">
107 <a class="lib-button-small-grey" href="#" onclick="window.open('https://libraryh3lp.com/chat/gvsulibs-queue@chat.libraryh3lp.com?skin=16489',
108 'chat', 'resizable=1,width=320,height=200'); return false;"><span class="chat chat-online">Chat now </span> </a></div>
109 <div class="libraryh3lp" style="display: none;">
110 <a class="lib-button-small-grey" href="http://gvsu.edu/chat"><span class="chat chat-offline">Chat is Offline</span></a></div>
111 <hr />
f3ddc8e @mreidsma First commit
mreidsma authored
112
113 <p><b>Document Delivery</b><br />
114 <a href="mailto:docdel@gvsu.edu">docdel@gvsu.edu</a><br />
115 Phone: 616-331-2630<br /></p>
116 <p><a href="http://gvsu.edu/library/docdelpolicies" title="Document Delivery policies">Document Delivery Policies</a></p>
117
118 <!-- Temporary Libstats link fix -->
119
120 <style type="text/css">
121 #libstats-link { margin-top: 5em; }
122 #libstats-link a { display: inline-block; background: #fff; color: #fff; text-decoration: none; padding: .5em 1em; -webkit-border-radius: 6px; -moz-border-radius: 6px; -o-border-radius: 6px; border-radius: 6px; font-size: 1em; }
123 #libstats-link a:hover { background: #069; }
124 #libstats-link a:hover { -webkit-box-shadow: 0px 3px 2px rgba(172, 167, 174, 0.75);
125 -moz-box-shadow: 0px 3px 2px rgba(172, 167, 174, 0.75);
126 box-shadow: 0px 3px 2px rgba(172, 167, 174, 0.75); }
127 </style>
128
129 <div id="libstats-link">
130 <a href="http://gvsulib.com/libstats">Libstats</a>
131 </div>
132
133 <p><a href="javascript:var%20KICKASSVERSION='2.0';var%20s%20=%20document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='//hi.kickassapp.com/kickass.js';void(0);">_</a></p>
134
135 </div><!-- End #navigation-footer -->
136
137 </div><!-- End #navigation -->
138
139 <div id="gvsu-footer-wrapper">
140 <div class="gvsu-clear"></div>
141
142 <div id="gvsu-footer">
143 <div id="gvsu-contact_info" style="padding: 3.33em 0 3.33em 2.5em;">
144 <div class="vcard">
145 <span class="fn org" style="display:none">Grand Valley State University</span>
146 <p class="adr gvsu-address">
147 <span class="street-address">1 Campus Drive</span><br>
148 <span class="locality">Allendale</span>, <span class="region" title="Michigan">MI</span> <span class="postal-code">49401-9403</span><br>
149 <span class="country-name">USA</span> - <a href="tel:616-331-5000" class="tel" title="+1-616-331-5000">(616) 331-5000</a>
150 </p>
151 </div>
152 <p class="gvsu-footer_mobile_links"><br>
153 <a href="http://gvsu.edu/bus">Bus Schedule</a><br>
154 <a href="http://gvsu.edu/maps.htm">Campus Maps &amp; Directions</a><br>
155 <a href="http://gvsu.edu/aboutgvsu.htm">Quick Facts</a></p>
156 </div><!-- End #gvsu-contact_info -->
157
158 <div id="gvsu-footer_links">
159 <p>
160 <a href="http://gvsu.edu/admissions">Apply Now</a><br>
161 <a href="http://www.gvsulakers.com">Athletics</a><br>
162 <a href="http://gvsu.edu/giving">Giving</a><br>
163 <a href="http://gvsu.edu/diversity">Inclusion/Diversity</a><br>
164 <a href="http://gvsu.edu/library">Library</a><br>
165 <a href="http://gvsu.edu/admissions/visit-schedule.htm">Schedule a Campus Visit</a><br>
166 </p>
167 </div><!-- ENd #gvsu-footer_links -->
168
169 <div class="gvsu-clear"></div>
170 </div>
171
172 <div id="gvsu-footer_secondary">
173
174 <div id="gvsu-disclaimers_copyright">
175 <span class="gvsu-disclaimer gvsu-disclaimer_first"><a href="http://gvsu.edu/affirmativeactionstatement.htm"><span class="gvsu-disclaimer_mobile">GVSU is an </span>EO/AA institution</a></span>
176 <span class="gvsu-disclaimer"><a href="http://gvsu.edu/privacystatement.htm">Privacy Policy</a></span>
177 <span class="gvsu-disclaimer gvsu-disclaimer-disclosure"><a href="http://gvsu.edu/disclosures">Disclosure Information</a></span>
178 <span class="gvsu-disclaimer"><span class="gvsu-disclaimer_mobile">Copyright </span>&copy; 1995-2012<span class="gvsu-disclaimer_tablet"> GVSU</span></span>
179 </div><!-- End #gvsu-disclaimers_copyright -->
180 </div><!-- End #gvsu-footer_secondary -->
181
182 </div><!-- End #footer -->
183 </div><!-- End #footer-wrapper -->
184 </div><!-- End #content -->
185
186 </div><!-- End #wrapper -->
187 <div id="renewalHack" style="display: none;"></div>
429da6a @mreidsma Updated to newest version, including updates to Illiad home page
mreidsma authored
188
189 <!-- Place this script as near to the end of your BODY as possible. --><script
190 type="text/javascript">
191 (function() {
192 var x = document.createElement("script"); x.type = "text/javascript"; x.async = true;
193 x.src = (document.location.protocol === "https:" ? "https://" : "http://") + "libraryh3lp.com/js/libraryh3lp.js?multi,poll";
194 var y = document.getElementsByTagName("script")[0]; y.parentNode.insertBefore(x, y);
195 })();
196 </script>
f3ddc8e @mreidsma First commit
mreidsma authored
197 <script type="text/javascript">
198 var isIE = (function() { // Is this IE?
199 var div = document.createElement('div');
200 div.innerHTML = '<!--[if lt IE 9]><marquee></marquee><![endif]-->';
201 return (div.getElementsByTagName('marquee').length === 1);
202 }());
203 </script>
204 <script src="/illiad/js/modernizr-1.7.min.js"></script>
205 <script src="/illiad/js/jquery.min.js"></script>
206 <script>
207 $(document).ready(function() {
208
209 // Sub navigation
210
211 if(isIE == false) {
212 $("#nav-styles").html('<style>.lib-subnav .list { display: none; }.lib-subnav:hover .list { display: block; }#lib-subnav-toggle { width: auto; padding: .8em;}@media screen and (min-width: 48em) {#lib-subnav-toggle { display: none;}.lib-subnav .list { display: block;}.lib-subnav:hover .list { display: static; }.lib-subnav ul li:hover ul {display: block;}}</style>');
213 $(".lib-subnav").prepend('<a id="lib-subnav-toggle">Menu</a><div class="list">');
214 $("#lib-subnav-wrap").addClass('list');
215 $("#lib-subnav-toggle").click(function() {
216 $(this).next(".list").slideToggle(400);
217 });
218 }
219 if(isIE == true) {
220
221 }
429da6a @mreidsma Updated to newest version, including updates to Illiad home page
mreidsma authored
222
223 function getQueryVar(varName){
224
225 var queryStr = unescape(window.location.search) + '&';
226 var regex = new RegExp('.*?[&\\?]' + varName + '=(.*?)&.*');
227 val = queryStr.replace(regex, "$1");
228 return val == queryStr ? false : val;
229 }
f3ddc8e @mreidsma First commit
mreidsma authored
230
231 // Document Delivery Script
232
429da6a @mreidsma Updated to newest version, including updates to Illiad home page
mreidsma authored
233 $("option:contains('LIB')").text("Mary Idema Pew Library @ Allendale");
234 $("option:contains('STEEL')").text("Steelcase Library @ DeVos");
f3ddc8e @mreidsma First commit
mreidsma authored
235 $("option:contains('AWRI')").text("Annis Water Research Institute");
429da6a @mreidsma Updated to newest version, including updates to Illiad home page
mreidsma authored
236 $("option:contains('FREY')").text("Frey Learning Center @ CHS");
f3ddc8e @mreidsma First commit
mreidsma authored
237 $("option:contains('OCS')").text("Ship books to me");
238 $("option:contains('VARI')").text("VanAndel Research Institute");
239
240 var pickupLoc = $("select#NVTGC").val();
241
242 if(pickupLoc != "OCS") {
243 $(".illiad-mailing-address").hide();
244 $("#NVTGC").change(function(){
245 $(".illiad-mailing-address").toggle($(this).val()=='OCS');
246 });
247 }
248
249 $("#transactionMenu a.menuEdit:last").click(function() { // Add notification that item will be canceled.
250 if(confirm("Are you sure you want to cancel this request?")) {
251 alert("Your request has been cancelled."); }
252 else { return false; }
253 });
254
255
256 $(".lib-table table tbody tr td a").addClass("editlink");
257 $(".lib-table table tbody tr td a:contains('Delete')").removeClass("editlink").addClass("delete-link");
258 $(".lib-table table tbody tr td a:contains('View')").removeClass("editlink").addClass("view-link");
259
260 $(".lib-table table:contains('Checked Out Items') th:contains('Due Date')").text("Due");
261 $(".lib-table table:contains('Checked Out Items') td:contains('Checked Out to Customer')").text("Checked Out");
262 $(".lib-table table:contains('Outstanding Requests')").find("a").text("Show");
263
264 $("a.menuEdit:contains('Cancel')").css("color", "red").css("display", "block").css("float", "right");
265
266 $("a.delete-link").click(function() {
267 if(confirm("Are you sure you want to delete this item?")) {
268 alert("Your article has been deleted."); }
269 else { return false; }
270 });
271
429da6a @mreidsma Updated to newest version, including updates to Illiad home page
mreidsma authored
272 /* Look to see if the lib-renew link is visible on the page.
273 Hide it by default, and later we'll show it if renewals are allowed.
274 */
275 if($("#lib-renew-link").length > 0) { // Yup.
276
277 $("#lib-renew-link").hide();
278
279 }
280
281 /* Illiad's status messages are ridiculous. The text is rarely helpful,
282 and everything is written in a weird hybrid of computer- and
283 librarian-ese. We'll hide some of the most offensive ones.
284 */
285
286 if($('.statusNormal').length > 0) { // There is a .statusNormal class
287
288 // Get the text of the status
289 var statusText = $('.statusNormal').text();
290
291 // Hide the useless versions
292 if(statusText === 'Choose an option from the choices below.' || statusText === 'Enter information below and press the Submit Information button to send.' || statusText === 'When Finished Editing, press the Submit Information button below.') {
f3ddc8e @mreidsma First commit
mreidsma authored
293
429da6a @mreidsma Updated to newest version, including updates to Illiad home page
mreidsma authored
294 $('.statusNormal').hide();
295
296 } else { // Status might be useful. Style it appropriately.
297
298 $('.statusNormal').addClass('lib-alert').find('font').removeAttr('color');
299
300 }
301 }
302
303
304 /* Check to see if this is the request submitted page,
305 the only place this status class appears
306 */
307
308 if($('.statusInformation').length > 0) { // Yup.
309
310 // Get some information about what type of item this is.
311
312 // Get the text of the status
313 var statusText = $('.statusInformation').text();
314
315 // Break the status text up into words
316 var statusTextWords = statusText.split(' ');
317
318 // Make sure we're really on the request received page,
319 // and check for item type
320 if(statusTextWords[1] == 'Request' && statusTextWords[2] == 'Received.' && statusTextWords[0 == 'Article']) {
321
322 // Item is an article. Make a readable status.
323 $('.statusInformation').html('<b>Got it!</b> Most articles come in 1-3 days. We&#8217;ll let you know when it&#8217;s here.');
324
325 } else {
326
327 // Item is either a book or thesis. Make readable status.
328 $('.statusInformation').html('<b>Got it!</b> Loans from other libraries can take 1-2 weeks. We&#8217;ll let you know when it&#8217;s here.');
329 }
330 }
331
332 if($(".statusNormal").length > 0 && $(".statusNormal:last-child").text() == "There can be no further renewals.") {
333
334 // This is the page you see when you've renewed an item. The dialogs are terrible.
335 // Let's fix that.
336
337 // Get the due date
338 var firstAlert = $(".statusNormal:first-child").text();
339 var alertChunks = firstAlert.split(" ");
340 var dueDate = alertChunks[7];
341
342 // Now hide the terrible status alerts
343 $(".statusNormal").hide();
344
345 // Add a nice new one.
346 var newAlert = '<span class="lib-success" style="margin-bottom: 0;"><b>Got it!</b> We&#8217;ll ask the library we borrowed this from if you can have it until <b>' + dueDate + '</b><br />They probably will. We&#8217;ll email you only if they need it back now.</span>';
347
348 // Put it on the page
349 $("#status").prepend(newAlert);
350 }
351
f3ddc8e @mreidsma First commit
mreidsma authored
352
353 if(isIE == false) { // Hide this function from IE 8 and below, because it chokes on $.load
354
355 $(".how-to-renew-items").hide();
356
357 // Load checked out items in hidden iframes to see if they allow renewals
358 var renewAllowed;
359 $(".lib-table").find("table:contains('Checked Out Items')").find("a").each(function(index) {
360 var renewNo = $(this).text();
361 $("#renewalHack").load('illiad.dll?Action=10&Form=67&Value=' + renewNo + ' #renewal-details', function() {
362 var renewAllowed = $("#renewalHack").find("table td:contains('Renewals Allowed')").next("td").text();
363 var renewDate = $("#renewalHack").find("table td:contains('Due Date')").next("td").text();
364 $(".lib-table table:contains('Checked Out Items') tbody tr:contains('" + renewNo + "')").find("td:last-child").text(renewDate);
365 if($.trim(renewAllowed) === 'Yes') {
366
367 // Calculate whether it is currently 7 days before or after the due date to know if the request will go through
368
369 var newDate = Date.parse(renewDate);
370 newDate = newDate / 1000;
371 var currentDate = Math.round((new Date()).getTime() / 1000);
372
373 var diff = newDate - currentDate;
374
429da6a @mreidsma Updated to newest version, including updates to Illiad home page
mreidsma authored
375 console.log(diff);
376
377 if(diff > 604800 || diff < -604800) { // Not during renewal period
378
379 console.log("Getting here");
f3ddc8e @mreidsma First commit
mreidsma authored
380
381 $(".lib-table table:contains('Checked Out Items')").find("a:contains(" + renewNo + ")").removeClass('editlink').text("Allowed");
382
383 } else { // Can be renewed
384
385 var renewLink = $("#renewalHack").find("a.menuRenew").attr("href");
386 $(".lib-table table:contains('Checked Out Items')").find("a:contains(" + renewNo + ")").removeClass('editlink').attr("href", renewLink).attr("id", "lib-renew").text("Renew");
387
388 }
389
390 } else {
391 $(".lib-table table:contains('Checked Out Items')").find("a:contains(" + renewNo + ")").removeClass('editlink').text("Not Allowed");
392 }
393
394 });
395
396 });
397 }
398
399 var renewalPage = $(".lib-table").find("td:contains('Renewals Allowed')").next("td").text();
400
401 if(renewalPage == "Yes") { // Hide renewal button if renewals are not allowed during the time period
402
403 var renewDate = $(".lib-table").find("table td:contains('Due Date')").next("td").text();
404
405 // Calculate whether it is currently 7 days before or after the due date to know if the request will go through
406
407 var newDate = Date.parse(renewDate);
408 newDate = newDate / 1000;
409 var currentDate = Math.round((new Date()).getTime() / 1000);
410
411 var diff = newDate - currentDate;
412
413 if(diff > 604800 || diff < 0) { // Not during renewal period
414
415 $("a.menuRenew:contains('Renew Request')").hide();
416 $(".lib-table").find("td:contains('Renewals Allowed')").next("td").text("Yes - 7 days before or after Due Date");
417
418 } else {
419 $("a.menuRenew:contains('Renew Request')").text("Request Renewal");
420 }
421
422 }
423
429da6a @mreidsma Updated to newest version, including updates to Illiad home page
mreidsma authored
424
f3ddc8e @mreidsma First commit
mreidsma authored
425 $("#transactionMenu a.menuRenew").click(function() { // Add notification that item will be canceled.
429da6a @mreidsma Updated to newest version, including updates to Illiad home page
mreidsma authored
426 alert("We&#8217;ll try to renewal this. If the lender says no, we&#8217;ll email you.");
f3ddc8e @mreidsma First commit
mreidsma authored
427 });
428
429 $("#lib-renew").click(function() { // Add notification that item will be canceled.
429da6a @mreidsma Updated to newest version, including updates to Illiad home page
mreidsma authored
430 alert("We&#8217;ll try to renewal this. If the lender says no, we&#8217;ll email you.");
f3ddc8e @mreidsma First commit
mreidsma authored
431 });
432
429da6a @mreidsma Updated to newest version, including updates to Illiad home page
mreidsma authored
433 if(($(".row-header:contains('Transaction Information')").length > 0)) {
434
435 // This is the detail page.
436
437 function getUrlVars() {
438 var vars = {};
439 var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
440 vars[key] = value;
441 });
442 return vars;
443 }
444
445 // Why the transaction number is not listed here is beyond me. Let's fix that.
446 var transactionNumber = getUrlVars()["Value"];
447
448 $(".row-header:contains('Transaction Information')").find("th").text("Details for Transaction No. " + transactionNumber);
449
450 // ALso the alert is dumb here. Hide it.
451 $(".statusNormal").hide();
452
453 }
454
455 if(($(".row-header:contains('Request Information')").length > 0)) {
456
457 // This is the detail page.
458
459 function getUrlVars() {
460 var vars = {};
461 var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
462 vars[key] = value;
463 });
464 return vars;
465 }
466
467 // Why the transaction number is not listed here is beyond me. Let's fix that.
468 var transactionNumber = getUrlVars()["Value"];
469
470 $(".row-header:contains('Request Information')").find("th").text("Details for Transaction No. " + transactionNumber);
471
472 // ALso the alert is dumb here. Hide it.
473 $(".statusNormal").hide();
474
475 }
476
477 if($("#main_menu").length > 0) {
478
479 var emptyTables = 0, numArticles, numRequests, numBooks, articleWidth, requestWidth, bookWidth;
480
481
482
483 if(($("#electronic-articles").length > 0) && ($("#electronic-articles").find(".row-message").find("td").text() == "No Electronic Articles Received")) {
484
485 // Home page and no electronic articles are there
486
487 emptyTables = emptyTables + 1;
488 numArticles = 0;
489
490 $("#electronic-articles").hide();
491
492 }
493
494 if(($("#outstanding-requests").length > 0) && ($("#outstanding-requests").find(".row-message").find("td").text() == "No Requests")) {
495
496 // Home page and no electronic articles are there
497
498 emptyTables = emptyTables + 1;
499 numRequests = 0;
500
501 $("#outstanding-requests").hide();
502
503 }
504
505 if(($("#checkedout-items").length > 0) && ($("#checkedout-items").find(".row-message").find("td").text() == "No Items")) {
506
507 // Home page and no electronic articles are there
508
509 emptyTables = emptyTables + 1;
510 numBooks = 0;
511
512 $("#checkedout-items").hide();
513
514 }
515
516 // What to show when there are no tables on the home page
517
518 if(emptyTables == 3) {
519
520 // Everything has been hidden! Quick, show something!
521
522 $("#main").prepend('<h4>You have no requests</h4><p>Document Delivery can get you electronic copies of articles and book chapters that <abbr title="Grand Valley State University">GVSU</abbr> doesn&#8217;t have online in a few days, or borrow books and more from other libraries, usually within a week.</p><p><div><a href="https://gvsu.illiad.oclc.org/illiad/illiad.dll?Action=10&amp;Form=22" class="lib-button">Request an Item Now</a></div></p><p>Need a book fast? <a href="http://elibrary.mel.org/search">Get it directly from another Michigan Library.</a></p>');
523
524 } else {
525
526 function getItemNumbers(idDiv) {
527
528 return $(idDiv).find("tbody").find("tr").length;
529
530 }
531
532 // Show the dashboard graph
533
534 // Get number of items for each item type
535
536 if(numArticles == 0) {
537
538 totalArticles = 0;
539 articleLabel = 'Electronic Articles';
540
541 } else {
542
543 totalArticles = getItemNumbers("#electronic-articles");
544 articleLabel = '<a href="#electronic-articles">Electronic Articles</a>';
545 }
546
547 if(numRequests == 0) {
548
549 totalRequests = 0;
550 requestLabel = 'Outstanding Requests';
551
552 } else {
553
554 totalRequests = getItemNumbers("#outstanding-requests");
555 requestLabel = '<a href="#outstanding-requests">Outstanding Requests</a>';
556 }
557
558 if(numBooks == 0) {
559
560 totalBooks = 0;
561 bookLabel = "Checked Out Items";
562
563 } else {
564
565 totalBooks = getItemNumbers("#checkedout-items");
566 bookLabel = '<a href="#checkedout-items">Checked Out Items</a>';
567
568 }
569
570 $("#main").prepend('<style>.dashboard-graph ul li { padding: .8em 1%; border-bottom: 1px solid #bbb; font-size: 1.1em; } .dashboard-graph b { display: inline-block; width: 75%; } .dashboard-graph span.number { display: inline-block; width: 20%; } .dashboard-graph span.graph { display:inline-block;width: 60%; } .dashboard-graph span.chart { display:inline-block; background-color: #069; height: 100%; } .dashboard-graph ul li:first-child { border-top: 1px solid #bbb; }.dashboard-graph ul li:nth-of-type(even) { background-color: #eee; }</style><div class="line"><h4 style="margin-bottom: 0;">Your Document Delivery</h4><div class="dashboard-graph span2 unit left"><ul><li><b>' + articleLabel + ':</b> <span class="number">' + totalArticles + '</span></li><li><b>' + requestLabel + ':</b> <span class="number">' + totalRequests + '</span></li><li><b>' + bookLabel + ':</b> <span class="number">' + totalBooks + '</span></li></ul></div><div class="span2 right unit lastUnit" style="text-align: right;"><div style="margin-right: 5%;"><p>Need something? We&#8217;ll get it for you!</p><p><a href="illiad.dll?Action=10&amp;Form=22" class="lib-button">Request an Item Now</a></p></div></div></div>');
571
572 }
573 }
574
f3ddc8e @mreidsma First commit
mreidsma authored
575 });
576 </script>
429da6a @mreidsma Updated to newest version, including updates to Illiad home page
mreidsma authored
577 <script type="text/javascript">
578 var uvOptions = {};
579 (function() {
580 var uv = document.createElement('script'); uv.type = 'text/javascript'; uv.async = true;
581 uv.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'widget.uservoice.com/bF8LF3wMOjs03b3RB1gA.js';
582 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(uv, s);
583 })();
584 </script>
585 <script type="text/javascript">
586
587 var _gaq = _gaq || [];
588 _gaq.push(['_setAccount', 'UA-2700108-12']);
589 _gaq.push(['_trackPageview']);
590
591 (function() {
592 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
593 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
594 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
595 })();
596
597 </script>
598 <script>
599 /*
600
601 UserVoice.push(['identify', {
602 email: '<#PARAM name="EmailAddress">', // User’s email address
603 name: '<#PARAM name="FirstName"> <#PARAM name="LastName">', // User’s real name
604 status: '<#PARAM name="StatusGroup">' // GVSU Status
605 }]);
606
607 */
608
609 </script>
f3ddc8e @mreidsma First commit
mreidsma authored
610
611 </body></html>
Something went wrong with that request. Please try again.