Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
00cae17a
Commit
00cae17a
authored
Aug 16, 2017
by
Mengyun Yang
Committed by
Yuxin Wu
Aug 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring javascript to show class name (#385)
parent
37ecbd4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
9 deletions
+32
-9
docs/_static/pymunk.js
docs/_static/pymunk.js
+32
-9
No files found.
docs/_static/pymunk.js
View file @
00cae17a
...
...
@@ -3,14 +3,22 @@
$
(
function
(){
var
createList
=
function
(
selected
)
{
var
obj
=
{};
var
ul
=
$
(
'
<ul>
'
);
selected
.
each
(
function
(
i
,
e
)
{
var
className
=
e
.
getElementsByTagName
(
'
a
'
)[
0
].
href
;
className
=
className
.
substr
(
className
.
lastIndexOf
(
'
/
'
)
+
1
);
className
=
className
.
substr
(
0
,
className
.
lastIndexOf
(
"
.html
"
));
var
fullname
=
e
.
id
;
var
n
=
$
(
e
).
children
(
'
.descname
'
).
clone
();
if
(
fullname
.
startsWith
(
'
tensorpack.
'
))
fullname
=
fullname
.
substr
(
11
);
var
n
=
$
(
e
).
children
(
'
.descname
'
).
clone
();
n
[
0
].
innerText
=
fullname
;
var
l
=
$
(
e
).
children
(
'
.headerlink
'
);
...
...
@@ -20,9 +28,19 @@ $(function (){
a
.
append
(
n
);
var
entry
=
$
(
'
<li>
'
).
append
(
a
);
ul
.
append
(
entry
);
if
(
className
in
obj
)
{
obj
[
className
]
=
obj
[
className
].
append
(
entry
);
}
else
{
var
ul
=
$
(
'
<ul>
'
);
ul
.
append
(
entry
);
obj
[
className
]
=
ul
;
}
});
return
ul
;
return
obj
;
}
...
...
@@ -30,15 +48,20 @@ $(function (){
var
customIndex
=
$
(
'
.custom-index
'
);
customIndex
.
empty
();
var
selected
=
$
(
'
div.section>dl>dt
'
);
if
(
selected
.
length
===
0
)
return
;
var
l
=
createList
(
selected
);
var
c
=
$
(
'
<div style="min-width: 300px;">
'
);
var
ul
=
c
.
clone
()
.
append
(
l
);
customIndex
.
append
(
ul
);
var
obj
=
createList
(
selected
);
for
(
var
key
in
obj
)
{
var
c
=
$
(
'
<div style="min-width: 300px;">
'
);
var
a
=
$
(
'
<h4>
'
);
a
.
html
(
key
);
var
u
=
c
.
clone
().
append
(
a
);
var
ul
=
c
.
clone
().
append
(
obj
[
key
]);
customIndex
.
append
(
u
);
customIndex
.
append
(
ul
);
}
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment