Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Quack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
commul
Zeit.shift
Quack
Commits
2cb17605
Commit
2cb17605
authored
11 years ago
by
Toke Eskildsen
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix: The overlays in folder did not work after sorttable was introduced
parent
95f3481b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
web/folder_template.html
+1
-1
1 addition, 1 deletion
web/folder_template.html
web/quack_folder.js
+26
-3
26 additions, 3 deletions
web/quack_folder.js
with
27 additions
and
4 deletions
web/folder_template.html
+
1
−
1
View file @
2cb17605
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
Quack - ${SRC_FOLDER}
</title>
<title>
Quack - ${SRC_FOLDER}
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${UP}quack.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${UP}quack.css"
/>
<script
src=
"${UP}quack_folder.js"
></script>
<script
src=
"${UP}sorttable.js"
></script>
<script
src=
"${UP}sorttable.js"
></script>
<script
src=
"${UP}quack_folder.js"
></script>
</head>
</head>
<body
class=
"folder"
>
<body
class=
"folder"
>
...
...
This diff is collapsed.
Click to expand it.
web/quack_folder.js
+
26
−
3
View file @
2cb17605
...
@@ -10,7 +10,7 @@ function toggleBlownThumbs() {
...
@@ -10,7 +10,7 @@ function toggleBlownThumbs() {
content
[
i
].
style
.
display
=
state
;
content
[
i
].
style
.
display
=
state
;
}
}
}
}
function
toggleHistograms
()
{
function
toggleHistograms
()
{
if
(
document
.
getElementById
(
'
toggle_histograms
'
).
checked
)
{
if
(
document
.
getElementById
(
'
toggle_histograms
'
).
checked
)
{
thumb_state
=
'
none
'
;
thumb_state
=
'
none
'
;
hist_state
=
'
block
'
;
hist_state
=
'
block
'
;
...
@@ -29,7 +29,19 @@ function toggleHistograms() {
...
@@ -29,7 +29,19 @@ function toggleHistograms() {
}
}
}
}
function
setupThumbOverlays
()
{
function
thclick
()
{
// Consider a timeout if there is a race condition with the table sort
// TODO: Order the image divs like the table links are ordered
}
var
oldOnload
=
window
.
onload
;
function
initialSetup
()
{
if
(
oldOnload
!=
null
)
{
console
.
log
(
'
Calling previous onLoad
'
);
oldOnload
();
}
// Thumb overlays
console
.
log
(
'
Adding thumb overlays
'
);
var
content
=
document
.
getElementsByClassName
(
'
thumblink
'
);
var
content
=
document
.
getElementsByClassName
(
'
thumblink
'
);
for
(
var
i
=
0
;
i
<
content
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
content
.
length
;
i
++
)
{
var
href
=
content
[
i
].
href
;
var
href
=
content
[
i
].
href
;
...
@@ -42,5 +54,16 @@ function setupThumbOverlays() {
...
@@ -42,5 +54,16 @@ function setupThumbOverlays() {
span
.
style
.
background
=
"
url(
"
+
base
+
"
.black.thumb.png) 100% 100%, url(
"
+
base
+
"
.white.thumb.png) 100% 100%
"
;
span
.
style
.
background
=
"
url(
"
+
base
+
"
.black.thumb.png) 100% 100%, url(
"
+
base
+
"
.white.thumb.png) 100% 100%
"
;
document
.
title
=
span
.
style
.
background
;
document
.
title
=
span
.
style
.
background
;
}
}
console
.
log
(
'
Attaching hooks for table sort
'
);
var
tables
=
document
.
getElementsByClassName
(
'
sortable
'
);
for
(
var
i
=
0
;
i
<
tables
.
length
;
i
++
)
{
var
stable
=
tables
[
i
];
var
theads
=
stable
.
getElementsByTagName
(
'
th
'
);
for
(
var
h
=
0
;
h
<
theads
.
length
;
h
++
)
{
thead
=
theads
[
h
];
thead
.
onclick
=
thclick
;
}
}
}
}
window
.
onload
=
setupThumbOverlays
;
window
.
onload
=
initialSetup
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment