-
Notifications
You must be signed in to change notification settings - Fork 0
/
docs_old.html
326 lines (255 loc) · 7.57 KB
/
docs_old.html
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="author" content="Wendelin Thomas" />
<meta name="description" content="jQuery plugins" />
<!--
<link rel="shortcut icon" href="../../assets/ico/favicon.ico">
-->
<title>jquery.fn</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" />
<!-- Custom styles for this template -->
<style>
/*
* Base structure
*/
/* Move down content because we have a fixed navbar that is 50px tall */
body {
padding-top: 50px;
}
/*
* Global add-ons
*/
.sub-header {
padding-bottom: 10px;
border-bottom: 1px solid #eee;
}
/*
* Sidebar
*/
/* Hide for mobile, show later */
#sidebar {
display: none;
}
@media (min-width: 768px) {
#sidebar {
position: fixed;
top: 51px;
bottom: 0;
left: 0;
z-index: 1000;
display: block;
padding: 20px;
overflow-x: hidden;
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
background-color: #f5f5f5;
border-right: 1px solid #eee;
}
}
/* Sidebar navigation */
.nav-sidebar {
margin-right: -21px; /* 20px padding + 1px border */
margin-bottom: 20px;
margin-left: -20px;
}
.nav-sidebar > li > a {
padding-right: 15px;
padding-left: 15px;
}
.nav-sidebar > .active > a {
color: #fff;
background-color: #428bca;
}
.nav-sidebar > li > .nav > li > a {
padding: 5px 15px 5px 25px;
}
.nav-sidebar .active > .nav > .active > a {
color: #fff;
background-color: #428bca;
}
.nav-sidebar li.active {
color:#F00;
}
.nav-sidebar .nav {
display: none;
padding-bottom: 10px;
}
.nav-sidebar > .active > ul {
display: block;
}
/*
* Main content
*/
#main {
padding: 20px;
}
@media (min-width: 768px) {
#main {
padding-right: 40px;
padding-left: 40px;
}
#main .anchor {
position:relative;
top:-50px
}
}
#main .page-header {
margin-top: 0;
}
</style>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">jquery.fn</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right" id="doc-files">
<li><a href="#">Dashboard</a></li>
<li><a href="#">Settings</a></li>
<li><a href="#">Profile</a></li>
<li><a href="#">Help</a></li>
</ul>
<!--
<form class="navbar-form navbar-right">
<input type="text" class="form-control" placeholder="Search...">
</form>
-->
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-2" id="sidebar">
<ul class="nav nav-sidebar">
<li class="active"><a href="#">Overview</a></li>
<li><a href="#">Reports</a></li>
<li><a href="#">Analytics</a></li>
<li><a href="#">Export</a></li>
</ul>
</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2" id="main">
<h1 class="page-header">jquery.fn</h1>
<p class="lead">These are a series of jquery plugins.</p>
<div id="doc-content">
<p>Documentation should automatically be generated from the comments in the source files and placed here.</p>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="./jquery.yuidoc.js"></script>
<script>
$.yuidoc(
"jquery.draw.js",
"jquery.media.js",
"jquery.notification.js",
"jquery.stream.js",
"jquery.yuidoc.js"
).then(function(results){
window.results = results;
var uId = 0;
var $docContent = $("#doc-content").empty();
var $docSidebar = $("#sidebar .nav").empty();
$.each(results, function(file,comments) {
var pid = "p" + uId++;
var $panel = $('<div class="panel panel-info"></div>')
.append('<span id="'+pid+'" class="anchor"></span>'),
$panelHeading = $('<div class="panel-heading"></div>').text(file).appendTo($panel);
if (comments.length) {
var $nav = $('<ul class="nav"></ul>');
var $listGroup = $('<ul class="list-group"></ul>');
$('<li></a>')
.append(
$('<a></a>')
.attr("href","#"+pid)
.text(file)
)
.append($nav)
.appendTo($docSidebar);
$panel.append($listGroup);
$.each(comments, function(i,comment) {
var cId = "i" + uId++,
cName = comment.method || comment.function,
cAltName = comment.todo;
/*
console.log(
file.match(/([^/]+)$/)[1]
+ "-"
+ (comment.method || comment.function)
);
*/
var $listItem = $('<li class="list-group-item"></li>')
.append('<span id="'+cId+'" class="anchor"></span>');
if ("private" in comment)
$listItem.addClass("list-group-item-warning");
if (!cName)
$listItem.addClass('list-group-item-danger');
$listItem.append(
$('<span class="badge"></span>').attr("title","line: " + comment.line).text(comment.line)
);
var $navItem = $('<li></li>')
.append(
$("<a></a")
.text(cName||cAltName)
.attr("href","#" + cId)
)
.appendTo($nav);
if ("private" in comment)
$navItem.find("a").append(' <span class="label label-warning">private</span>');
var $listItemHeading = $('<h5 class="list-group-item-heading"></h5>')
.text(cName||cAltName)
.appendTo($listItem);
if ("private" in comment)
$listItemHeading.append(' <span class="label label-warning">private</span>');
if ("chainable" in comment)
$listItemHeading.append(' <span class="label label-success">chainable</span>');
if ("todo" in comment)
$listItemHeading.append(' <span class="label label-danger">todo</span>');
if (comment.description)
$('<pre class="list-group-item-text"></pre>').text(comment.description).appendTo($listItem);
var $table = $('<table class="table table-striped table-condensed table-bordered"></table>');
$.each(comment, function(a,b) {
if (["description","file","line","method","function","private","chainable","todo"].indexOf(a) === -1)
$("<tr></tr>")
.append(
$("<th></th>").text(a),
$("<td></td>").text(b) // todo: support arrays
)
.appendTo($table);
});
if ($table.children().size())
$table.appendTo($listItem);
$listItem.appendTo($listGroup);
});
} else {
$panel.append('<div class="panel-body">no documentation</div>');
}
$panel.appendTo($docContent);
$('body').scrollspy({ target: '#sidebar', offset:50 });
$('body').scrollspy("refresh");
});
});
</script>
</body>
</html>