-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathapiDocDyn.js
More file actions
124 lines (110 loc) · 3.63 KB
/
apiDocDyn.js
File metadata and controls
124 lines (110 loc) · 3.63 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
$(document).ready(function() {
window.showAll = true;
window.showDeprecated = false;
$(".fh").hide();
$(".fs").on('click', function() {
$(this).parent().children('tr').each(function(n,v){if (n>0) $(v).toggle();});
/*
if (!ts.is(":visible")) {
ts.slideToggle('slow');
} else {
ts.slideUp("fast");
}
*/
});
$(".classRef").on('click', function() {
toggle($(this));
/*
if (!n.eq(index).is(":visible")) {
n.eq(index).slideToggle('slow');
} else {
n.eq(index).slideUp("fast");
}
*/
});
$(".list").on('click', function() {
var t = $(this).parent().parent().parent().children('tr');
$.each(t, function(index, val) {
if (index >= 1) {
$(this).children('td').children('table').children('tbody').children('tr').eq(2).slideUp("fast");
}
});
});
$(".expand").on('click', function() {
var t = $(this).parent().parent().parent().children('tr');
$.each(t, function(index, val) {
if (index >= 1) {
$(this).children('td').children('table').children('tbody').children('tr').each(function(n,v){if (n>0) $(v).toggle();});
}
});
});
$(".moreDefClass").on('click', function() {
var etc = $(this).parent().children("span").eq(0);
var more = $(this).parent().children("span").eq(1);
if(!more.is(":visible")) {
more.show();
etc.hide();
$(this).text("Read less");
}
else {
more.hide();
etc.show();
$(this).text("Read more");
}
});
$(".moreAVS").on('click', function() {
var moreAVS=$(this);
var avsTable = $(this).parent().children("table");
if(moreAVS.text()=="See Allowed Values") {
$.each(avsTable, function(index, val) {
$(this).show();
});
moreAVS.text("Hide Allowed Values");
}
else {
$.each(avsTable, function(index, val) {
$(this).hide();
});
$(this).text("See Allowed Values");
}
});
$(".moreATS").on('click', function() {
var moreATS=$(this);
var atsTable = $(this).parent().children("table");
if(moreATS.text()=="See Allowed Types") {
$.each(atsTable, function(index, val) {
$(this).show();
});
moreATS.text("Hide Allowed Types");
}
else {
$.each(atsTable, function(index, val) {
$(this).hide();
});
$(this).text("See Allowed Types");
}
});
$("#listAll").on('click', function () {
window.showAll = !window.showAll;
var deprecatedSelector = !window.showDeprecated ? ":not(:has(.deprecated)), :has(.section)" : "";
var elems = $('.classRef').parent().parent().siblings(deprecatedSelector);
if (window.showAll) {
elems.show();
$('.classRef').removeClass('closed');
}
else {
elems.hide();
$('.classRef').addClass('closed');
}
});
$("#showHideDeprecated").on('click', function () {
window.showDeprecated = !window.showDeprecated;
$('.classRef').parent().parent().siblings(":not(:has(.closed, .section)) :has(.deprecated)").toggle();
});
function toggle(elem) {
elem.toggleClass('closed')
var hasSubClasses = elem.parent().parent().parent().find('.section').length > 0
var deprecatedSelector = !(hasSubClasses || window.showDeprecated) ? ":not(:has(.deprecated))" : "";
elem.parent().parent().siblings(deprecatedSelector).toggle();
}
});