This repository has been archived by the owner on Feb 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
js.js
90 lines (76 loc) · 2.39 KB
/
js.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
$(document).ready(function()
{
$('.changeLink').parent().parent().next().hide();
$('.changeLink').click(function() {
$(this).parent().parent().next().toggle();
$(this).text($(this).text() == "[Change]" ? "[Hide]" : "[Change]");
return false;
})
$('#showTestLink').click(function() {
$('.hideFromTest').show();
$('#showTestLink').hide();
$('#hideTestLink').show();
return false;
})
$('#hideTestLink').click(function() {
$('.hideFromTest').hide();
$('#showTestLink').show();
$('#hideTestLink').hide();
return false;
})
$('#uploaddraft').hide();
$('#uploaddraftLink').click(function() {
$('#uploaddraft').toggle();
$(this).text($(this).text() == "[Upload New]" ? "[Hide]" : "[Upload New]");
return false;
})
$('#uploadsolution').hide();
$('#uploadsolutionLink').click(function() {
$('#uploadsolution').toggle();
$(this).text($(this).text() == "[Upload New]" ? "[Hide]" : "[Upload New]");
return false;
})
$('#uploadmisc').hide();
$('#uploadmiscLink').click(function() {
$('#uploadmisc').toggle();
$(this).text($(this).text() == "[Upload New]" ? "[Hide]" : "[Upload New]");
return false;
})
$('#uploadpostprod').hide();
$('#uploadpostprodLink').click(function() {
$('#uploadpostprod').toggle();
$(this).text($(this).text() == "[Upload New]" ? "[Hide]" : "[Upload New]");
return false;
})
$('.fileInfoOld').hide();
$('#toggleFiles').click(function() {
$('.fileInfoOld').toggle();
if ($('#toggleFiles').text() == "Show Older Files") {
$('#toggleFiles').text("Hide Older Files");
$('td.fileInfoLatest').css('padding-top', '1em');
$('div.fileInfo').css('padding-top', '0em');
} else {
$(this).text("Show Older Files");
$('td.fileInfoLatest').css('padding-top', '.25em');
$('div.fileInfo').css('padding-top', '.75em');
}
return false;
})
$('.description').parent().next().hide();
$('.description').click(function() {
$(this).parent().next().toggle();
return false;
})
$(".tablesorter").tablesorter({
textExtraction: function(node, table, cellIndex) {
var n = $(node);
return n.attr('data-sort-value') || n.text();
}
});
$('textarea').one('keyup',function() {
$(window).bind('beforeunload',function() { return 'Leaving this page will cause any unsaved data to be lost.'; });
});
$('.okSubmit').click(function() {
$(window).unbind('beforeunload');
});
})