Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fractalis
fractal.js
Commits
404834ac
Commit
404834ac
authored
May 04, 2017
by
Sascha Herzinger
Browse files
Fixed click event issue
parent
bc2c1cb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/components/DataBox.vue
View file @
404834ac
...
...
@@ -6,9 +6,8 @@
:data-state=
"item.state"
v-for=
"item in items"
>
<div
class=
"data-entry-header"
:data-state=
"item.state"
@
click=
"toggleDataEntryBody($event)"
>
<span
class=
"cross"
v-if=
"item.state === 'FAILURE'"
>
&
#xd7
</span>
:data-state=
"item.state"
>
<span
class=
"cross"
v-if=
"item.state === 'FAILURE'"
>
×
</span>
<input
type=
"checkbox"
:id=
"'data-check-' + item.data_id"
:value=
"item.data_id"
...
...
@@ -17,16 +16,16 @@
<label
:for=
"'data-check-' + item.data_id"
>
{{
item
.
label
}}
</label>
<span
class=
"options"
@
click=
"toggleDataEntryBody(item.data_id)"
>
☰
</span>
</div>
<div
class=
"data-entry-body"
:data-state=
"item.state"
>
<div
class=
"data-entry-body"
:data-state=
"item.state"
:data-id=
"item.data_id"
>
<div
class=
"action-btns"
>
<button
class=
"reload-btn"
@
click=
"reloadData(item.data_id)"
>
&
#8635
</button>
<button
class=
"delete-btn"
@
click=
"deleteData(item.data_id)"
>
&
#215
</button><br/>
<button
class=
"reload-btn"
@
click=
"reloadData(item.data_id)"
>
↻
;
</button>
<button
class=
"delete-btn"
@
click=
"deleteData(item.data_id)"
>
×
;
</button><br/>
</div>
{{
item
.
message
}}
</div>
</div>
</div>
</div>
...
...
@@ -69,10 +68,9 @@
}
},
methods
:
{
toggleDataEntryBody
(
$event
)
{
const
$header
=
$
(
$event
.
currentTarget
)
const
$content
=
$header
.
next
()
$content
.
slideToggle
(
500
)
toggleDataEntryBody
(
dataID
)
{
const
$body
=
$
(
`.data-entry-body[data-id="
${
dataID
}
"]`
)
$body
.
slideToggle
(
500
)
},
reloadData
(
dataID
)
{
store
.
getters
.
requestManager
.
reloadData
({
dataID
})
...
...
@@ -99,18 +97,21 @@
.data-entry-header
{
background-color
:
#eee
;
padding
:
2px
;
padding
:
5px
;
margin
:
2px
;
width
:
95%
;
}
.data-entry-header
>
*
{
display
:
inline-block
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
width
:
98%
;
cursor
:
pointer
;
vertical-align
:
middle
;
}
.data-entry-header
label
{
width
:
80%
;
pointer-events
:
none
;
width
:
85%
;
word-break
:
keep-all
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.data-entry-header
:nth-child
(
odd
)[
data-state
=
"SUCCESS"
]
{
...
...
@@ -148,4 +149,9 @@
color
:
red
;
padding
:
5px
;
}
.options
{
cursor
:
pointer
;
white-space
:
nowrap
;
}
</
style
>
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