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
open-source
MetaGer
Commits
95fa82c2
Commit
95fa82c2
authored
Mar 08, 2018
by
Aria Givi
Browse files
Alle aufklappen/zuklappen funktioniert
parent
2a1904ab
Changes
4
Hide whitespace changes
Inline
Side-by-side
resources/assets/js/focus-creator.js
View file @
95fa82c2
$
(
function
()
{
setFocusCreatorActionListeners
();
setLabelText
();
setKeyListeners
();
setDropdownListener
();
});
/**
* Sets all action listeners for this page
*/
function
set
FocusCreatorAction
Listeners
()
{
function
set
Key
Listeners
()
{
$
(
document
).
keydown
(
function
(
event
)
{
if
(
$
(
"
input#show-create-focus
"
).
is
(
'
:checked
'
))
{
if
(
event
.
keyCode
==
27
)
{
...
...
@@ -17,3 +19,25 @@ function setFocusCreatorActionListeners () {
});
}
function
setDropdownListener
()
{
$
(
'
input:checkbox#toggle-dropdowns
'
).
change
(
function
()
{
if
(
$
(
this
).
is
(
'
:checked
'
))
{
$
(
"
#toggle-dropdowns-label
"
).
html
(
t
(
'
close-dropdowns
'
));
$
(
"
.focus-dropdown-toggle
"
).
prop
(
'
checked
'
,
true
);
}
else
{
$
(
"
#toggle-dropdowns-label
"
).
html
(
t
(
'
open-dropdowns
'
));
$
(
"
.focus-dropdown-toggle
"
).
prop
(
'
checked
'
,
false
);
}
}
)
}
function
setLabelText
()
{
if
(
$
(
'
input:checkbox#toggle-dropdowns
'
).
is
(
'
:checked
'
))
{
$
(
"
#toggle-dropdowns-label
"
).
html
(
t
(
'
close-dropdowns
'
));
}
else
{
$
(
"
#toggle-dropdowns-label
"
).
html
(
t
(
'
open-dropdowns
'
));
}
}
resources/assets/js/translations.js
View file @
95fa82c2
...
...
@@ -21,7 +21,9 @@ var translations = {
'
result-saver.deleteAll
'
:
'
<span class="hidden-xs">Ergebnisse</span> löschen</button>
'
,
'
result-saver.save.this
'
:
'
ÖFFNEN
'
,
'
result-saver.save.newtab
'
:
'
IN NEUEM TAB
'
,
'
result-saver.save.anonymous
'
:
'
ANONYM ÖFFNEN
'
'
result-saver.save.anonymous
'
:
'
ANONYM ÖFFNEN
'
,
'
close-dropdowns
'
:
'
Alle zuklappen
'
,
'
open-dropdowns
'
:
'
Alle aufklappen
'
},
'
en
'
:
{
...
...
@@ -39,7 +41,9 @@ var translations = {
'
result-saver.deleteAll
'
:
'
delete <span class="hidden-xs">results</span>
'
,
'
result-saver.save.this
'
:
'
OPEN
'
,
'
result-saver.save.newtab
'
:
'
IN NEW TAB
'
,
'
result-saver.save.anonymous
'
:
'
OPEN ANONYMOUSLY
'
'
result-saver.save.anonymous
'
:
'
OPEN ANONYMOUSLY
'
,
'
close-dropdowns
'
:
'
Collapse all
'
,
'
open-dropdowns
'
:
'
Expand all
'
},
'
es
'
:
{
...
...
resources/assets/less/metager/foki.less
View file @
95fa82c2
...
...
@@ -39,8 +39,12 @@
}
}
}
#toggle-dropdowns {
#toggle-dropdowns-label {
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.focus-dropdown-toggle {
display: none;
...
...
@@ -52,14 +56,15 @@
}
&:checked {
&~.focus-dropdown-label::after {
content: "
🡡
";
content: "
➖
";
}
}
}
.focus-dropdown-label {
cursor: pointer;
&::after {
font-size: 16px;
content: "
🡣
";
content: "
➕
";
margin-left: 3px;
}
&~.row {
...
...
resources/views/modals/create-focus-modal.blade.php
View file @
95fa82c2
...
...
@@ -17,8 +17,8 @@
</div>
</div>
<div
class=
"modal-body"
>
<input
type=
"hidden"
id=
"toggle-dropdowns"
>
<label
for=
"toggle
=
dropdowns"
class=
"js-only"
></label>
<input
type=
"
checkbox"
class=
"
hidden"
id=
"toggle-dropdowns"
checked
>
<label
id=
"toggle-dropdowns-label"
for=
"toggle
-
dropdowns"
class=
"js-only"
></label>
<form
id=
"customSearchForm"
method=
"GET"
action=
"{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "
/
meta
/
meta.ger3
")
}}"
accept-charset=
"UTF-8"
>
<input
type=
"hidden"
name=
"eingabe"
value=
"@if(isset($eingabe)){{$eingabe}}@endif"
>
<input
type=
"hidden"
name=
"encoding"
value=
"utf8"
>
...
...
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