Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
radiopanik
panikweb
Commits
928088bf
Commit
928088bf
authored
Sep 11, 2013
by
fred
Browse files
special case the "all untoggled" case to display all emissions/sounds
parent
4f14dfa5
Changes
3
Hide whitespace changes
Inline
Side-by-side
panikweb_templates/static/js/specifics.js
View file @
928088bf
...
...
@@ -310,9 +310,22 @@ $(function() {
$
(
this
).
trigger
(
'
uncheck
'
);
});
$
(
'
[data-toggle]
'
).
on
(
'
check
'
,
function
(){
/* make sure all other unchecked items are hidden */
$
(
'
[data-toggle].icon-check-empty
'
).
each
(
function
()
{
$
(
$
(
this
).
attr
(
'
data-about
'
)).
find
(
$
(
this
).
attr
(
'
data-toggle
'
)).
hide
();
});
$
(
$
(
this
).
attr
(
'
data-about
'
)).
find
(
$
(
this
).
attr
(
'
data-toggle
'
)).
show
();
}).
on
(
'
uncheck
'
,
function
(){
$
(
$
(
this
).
attr
(
'
data-about
'
)).
find
(
$
(
this
).
attr
(
'
data-toggle
'
)).
hide
();
if
(
$
(
'
[data-toggle].icon-check
'
).
length
==
0
)
{
/* special case the situation where all toggles
* are unchecked, as we want that to mean
* "everything", not "nothing".
*/
$
(
'
[data-toggle].icon-check-empty
'
).
each
(
function
()
{
$
(
$
(
this
).
attr
(
'
data-about
'
)).
find
(
$
(
this
).
attr
(
'
data-toggle
'
)).
show
();
});
}
}).
on
(
'
click
'
,
function
(){
$
(
this
).
toggleClass
(
'
icon-check icon-check-empty
'
);
if
(
$
(
this
).
hasClass
(
'
icon-check
'
)){
$
(
this
).
trigger
(
'
check
'
);
...
...
panikweb_templates/templates/emissions/nav.html
View file @
928088bf
...
...
@@ -26,13 +26,13 @@
<nav
id=
"gridNav"
class=
"checkable"
>
<ul
class=
"by{{ categories.count }}"
>
{% if class = "emissions" %}
<li><button
class=
"check icon-check"
data-about=
"#Main"
data-toggle=
".nocat"
>
?
</button></li>
<li><button
class=
"check icon-check
-empty
"
data-about=
"#Main"
data-toggle=
".nocat"
>
?
</button></li>
{% endif %}
{% for category in categories %}
{% if class = "grid" %}
<li><button
class=
"check icon-check-empty"
data-about=
"#Main"
data-highlight=
".{{ category|slugify }}"
>
{{ category }}
<span
class=
"icon-{{category|slugify}}"
></span></button></li>
{% else %}
<li><button
class=
"check icon-check"
data-about=
"#Main"
data-toggle=
".{{ category|slugify }}"
>
{{ category }}
<span
class=
"icon-{{category|slugify}}"
></span></button></li>
<li><button
class=
"check icon-check
-empty
"
data-about=
"#Main"
data-toggle=
".{{ category|slugify }}"
>
{{ category }}
<span
class=
"icon-{{category|slugify}}"
></span></button></li>
{% endif %}
{% endfor %}
</ul>
...
...
panikweb_templates/templates/listen/nav.html
View file @
928088bf
...
...
@@ -17,9 +17,9 @@
{% if categories and class != "archives" %}
<nav
id=
"gridNav"
class=
"checkable"
>
<ul
class=
"by{{ categories.count }}"
>
<li><button
class=
"check icon-check"
data-about=
"#Main"
data-toggle=
".nocat"
>
?
</button></li>
<li><button
class=
"check icon-check
-empty
"
data-about=
"#Main"
data-toggle=
".nocat"
>
?
</button></li>
{% for category in categories %}
<li><button
class=
"check icon-check"
data-about=
"#Main"
data-toggle=
".{{ category|slugify }}"
>
{{ category }}
</button></li>
<li><button
class=
"check icon-check
-empty
"
data-about=
"#Main"
data-toggle=
".{{ category|slugify }}"
>
{{ category }}
</button></li>
{% endfor %}
</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