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
2b2cff64
Commit
2b2cff64
authored
Nov 27, 2017
by
Aria Givi
Browse files
Dialog laesst sich oeffnen
parent
f73c3b19
Changes
4
Hide whitespace changes
Inline
Side-by-side
public/js/searchbar.js
View file @
2b2cff64
...
...
@@ -22,9 +22,9 @@ function setSearchbarActionListeners () {
$
(
'
.focusCheckbox
'
).
click
(
checkboxCheckListener
);
$
(
'
#addFocusBtn
'
).
click
(()
=>
showFocusCreateDialog
(
''
));
$
(
'
#editFocusBtn
'
).
click
(
editCurrentFocus
);
$
(
'
#toggleOptBtn
'
).
click
(
toggleOptionsDialog
);
$
(
'
.save-focus-btn
'
).
click
(
saveFocus
);
$
(
'
.delete-focus-btn
'
).
click
(
deleteFocus
);
$
(
'
.search-focus-selector
'
).
click
(
toggleOptionsDialog
);
$
(
'
#focus-select
'
).
change
(
focusChanged
);
// Save Focus on clicking enter while in the focus name input
$
(
'
#focus-name
'
).
keyup
(
function
(
event
)
{
...
...
@@ -379,16 +379,28 @@ function getFocusInUrl () {
}
function
toggleOptionsDialog
()
{
var
btnMode
=
$
(
'
.toggleOptBtn
'
).
attr
(
'
data-mode
'
);
if
(
btnMode
==
'
open
'
)
{
$
(
'
.toggleOptBtn
'
).
attr
(
'
data-mode
'
,
'
close
'
);
$
(
'
.toggleOptBtn
'
).
html
(
'
<i class="fa fa-chevron-up" aria-hidden="true"></i>
'
);
var
btnMode
=
$
(
'
#toggleOptBtn
'
).
attr
(
'
data-mode
'
);
if
(
btnMode
==
'
o
'
)
{
openOptionsDialog
();
}
else
{
$
(
'
.toggleOptBtn
'
).
attr
(
'
data-mode
'
,
'
open
'
);
$
(
'
.toggleOptBtn
'
).
html
(
'
<i class="fa fa-chevron-down" aria-hidden="true"></i>
'
);
closeOptionsDialog
();
}
}
function
openOptionsDialog
()
{
$
(
'
#toggleOptBtn
'
).
html
(
'
<i class="fa fa-chevron-up" aria-hidden="true"></i>
'
);
$
(
'
#toggleOptBtn
'
).
attr
(
'
data-mode
'
,
'
c
'
);
$
(
'
.search-option-frame
'
).
css
(
'
display
'
,
'
inline-block
'
);
}
function
closeOptionsDialog
()
{
$
(
'
#toggleOptBtn
'
).
html
(
'
<i class="fa fa-chevron-down" aria-hidden="true"></i>
'
);
$
(
'
#toggleOptBtn
'
).
attr
(
'
data-mode
'
,
'
o
'
);
$
(
'
.search-option-frame
'
).
css
(
'
display
'
,
'
none
'
);
}
function
checkboxCheckListener
(
event
)
{
toggleDeleteButton
();
...
...
resources/assets/js/searchbar.js
View file @
2b2cff64
...
...
@@ -22,9 +22,9 @@ function setSearchbarActionListeners () {
$
(
'
.focusCheckbox
'
).
click
(
checkboxCheckListener
);
$
(
'
#addFocusBtn
'
).
click
(()
=>
showFocusCreateDialog
(
''
));
$
(
'
#editFocusBtn
'
).
click
(
editCurrentFocus
);
$
(
'
#toggleOptBtn
'
).
click
(
toggleOptionsDialog
);
$
(
'
.save-focus-btn
'
).
click
(
saveFocus
);
$
(
'
.delete-focus-btn
'
).
click
(
deleteFocus
);
$
(
'
.search-focus-selector
'
).
click
(
toggleOptionsDialog
);
$
(
'
#focus-select
'
).
change
(
focusChanged
);
// Save Focus on clicking enter while in the focus name input
$
(
'
#focus-name
'
).
keyup
(
function
(
event
)
{
...
...
@@ -379,16 +379,28 @@ function getFocusInUrl () {
}
function
toggleOptionsDialog
()
{
var
btnMode
=
$
(
'
.toggleOptBtn
'
).
attr
(
'
data-mode
'
);
if
(
btnMode
==
'
open
'
)
{
$
(
'
.toggleOptBtn
'
).
attr
(
'
data-mode
'
,
'
close
'
);
$
(
'
.toggleOptBtn
'
).
html
(
'
<i class="fa fa-chevron-up" aria-hidden="true"></i>
'
);
var
btnMode
=
$
(
'
#toggleOptBtn
'
).
attr
(
'
data-mode
'
);
if
(
btnMode
==
'
o
'
)
{
openOptionsDialog
();
}
else
{
$
(
'
.toggleOptBtn
'
).
attr
(
'
data-mode
'
,
'
open
'
);
$
(
'
.toggleOptBtn
'
).
html
(
'
<i class="fa fa-chevron-down" aria-hidden="true"></i>
'
);
closeOptionsDialog
();
}
}
function
openOptionsDialog
()
{
$
(
'
#toggleOptBtn
'
).
html
(
'
<i class="fa fa-chevron-up" aria-hidden="true"></i>
'
);
$
(
'
#toggleOptBtn
'
).
attr
(
'
data-mode
'
,
'
c
'
);
$
(
'
.search-option-frame
'
).
css
(
'
display
'
,
'
inline-block
'
);
}
function
closeOptionsDialog
()
{
$
(
'
#toggleOptBtn
'
).
html
(
'
<i class="fa fa-chevron-down" aria-hidden="true"></i>
'
);
$
(
'
#toggleOptBtn
'
).
attr
(
'
data-mode
'
,
'
o
'
);
$
(
'
.search-option-frame
'
).
css
(
'
display
'
,
'
none
'
);
}
function
checkboxCheckListener
(
event
)
{
toggleDeleteButton
();
...
...
resources/assets/less/metager/searchbar.less
View file @
2b2cff64
...
...
@@ -12,6 +12,7 @@
&>button {
border: none;
background-color: white;
margin: 5px;
}
...
...
@@ -23,47 +24,59 @@
appearance: none;
background-color: transparent;
padding-right: 35px;
border: 1px solid #ccc;
border-radius: 4px;
}
}
.search-
button-container
{
.search-
option-frame
{
display: none;
position: absolute;
margin-top: 145px;
padding: 1%;
border: 1px solid #ccc;
border-radius: 4px;
}
.search-add-focus {
//display: flex;
button {
background-color: white;
border: none;
padding: 0px 8px;
font-size: 16px;
&:hover {
background-color: #e6e6e6;
.search-button-container {
display: flex;
.search-add-focus {
//display: flex;
button {
background-color: white;
border: none;
padding: 0px 8px;
font-size: 16px;
&:hover {
background-color: #e6e6e6;
}
}
}
}
.search-edit-focus {
//display: flex;
b
utton {
background-color: whit
e;
border: none
;
padding: 0px 8
px;
font-size: 16px;
&:hover {
background-color: #e6e6e6;
.search-edit-focus {
//display: flex;
button {
b
ackground-color: white;
border: non
e;
padding: 0px 8px
;
font-size: 16
px;
&:hover {
background-color: #e6e6e6;
}
}
}
}
.search-settings {
//display: flex;
a.btn {
border: none
;
padding: 0px 8p
x;
display: flex
;
align-items: center
;
font-size: 16px;
.search-settings {
//display: flex;
a.btn {
border: none;
padding: 0px 8px
;
display: fle
x;
align-items: center
;
font-size: 16px
;
}
}
}
.search-input-submit {
flex-grow: 1;
display: flex;
...
...
@@ -103,11 +116,6 @@
}
}
.search-focus-selector {
background-color: white;
position: relative;
text-overflow: ellipsis;
}
.searchform-bonus {
li {
...
...
resources/views/parts/searchbar.blade.php
View file @
2b2cff64
...
...
@@ -4,7 +4,7 @@
<
form
id
=
"searchForm"
method
=
{{
$request
}}
action
=
"{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "
/
meta
/
meta
.
ger3
") }}"
accept
-
charset
=
"UTF-8"
>
<
div
class
=
"searchbar {{$class or ''}}"
>
<
div
class
=
"search-focus-selector"
>
<
button
type
=
"button"
class
=
"toggleOptBtn"
data
-
mode
=
"o
pen
"
>
<
button
type
=
"button"
id
=
"toggleOptBtn"
data
-
mode
=
"o"
>
<
i
class
=
"fa fa-chevron-down"
></
i
>
</
button
>
<
div
class
=
"search-option-frame"
style
=
"display:none;"
>
...
...
@@ -15,38 +15,38 @@
<
option
value
=
"produktsuche"
style
=
"font-family: FontAwesome, sans-serif;"
>&
#xf07a; Produktsuche</option>
<
option
value
=
"maps"
style
=
"font-family: FontAwesome, sans-serif;"
>&
#xf279; Kartensuche</option>
</
select
>
<
/
div
>
<
/
div
>
<
div
class
=
"search-button-container
"
>
<
div
class
=
"
search-add-focus js-only"
>
<
button
type
=
"button"
id
=
"addFocusBtn"
>
<
i
class
=
"
fa fa-plus"
></
i
>
</
button
>
<
div
class
=
"searchbar-tooltip"
>
<
div
class
=
"searchbar-tooltip-
arrow
"
>
</
div
>
<
div
class
=
"searchbar-tooltip-content"
>
<
p
>
{{{
trans
(
'index.add-focus'
)
}}}
</
p
>
<
div
class
=
"search-button-container"
>
<
div
class
=
"search-add-focus js-only"
>
<
button
type
=
"button"
id
=
"addFocusBtn
"
>
<
i
class
=
"
fa fa-plus"
></
i
>
</
button
>
<
div
class
=
"
searchbar-tooltip"
>
<
div
class
=
"searchbar-tooltip-arrow"
>
</
div
>
<
div
class
=
"searchbar-tooltip-
content
"
>
<
p
>
{{{
trans
(
'index.add-focus'
)
}}}
</
p
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"search-edit-focus js-only"
>
<
button
type
=
"button"
id
=
"editFocusBtn"
title
=
"@lang('index.edit-focus')"
>
<
i
class
=
"fa fa-wrench"
></
i
>
</
button
>
<
div
class
=
"searchbar-tooltip"
>
<
div
class
=
"searchbar-tooltip-arrow"
>
<
div
class
=
"search-edit-focus js-only"
>
<
button
type
=
"button"
id
=
"editFocusBtn"
title
=
"@lang('index.edit-focus')"
>
<
i
class
=
"fa fa-wrench"
></
i
>
</
button
>
<
div
class
=
"searchbar-tooltip"
>
<
div
class
=
"searchbar-tooltip-arrow"
>
</
div
>
<
div
class
=
"searchbar-tooltip-content"
>
<
p
>
{{{
trans
(
'index.edit-focus'
)
}}}
</
p
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"searchbar-tooltip-content"
>
<
p
>
{{{
trans
(
'index.edit-focus'
)
}}}
</
p
>
<
div
class
=
"search-settings"
>
<
a
id
=
"settings-btn"
class
=
"mutelink btn btn-default"
href
=
"{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "
settings
") }}"
>
<
i
class
=
"fa fa-cog"
aria
-
hidden
=
"true"
></
i
>
</
a
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"search-settings"
>
<
a
id
=
"settings-btn"
class
=
"mutelink btn btn-default"
href
=
"{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "
settings
") }}"
>
<
i
class
=
"fa fa-cog"
aria
-
hidden
=
"true"
></
i
>
</
a
>
</
div
>
</
div
>
<
div
class
=
"search-input-submit"
>
<
div
class
=
"search-input"
>
...
...
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