Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
upnd
rcf-sparnatural
Commits
512832e3566f
Commit
fac71442
authored
Feb 03, 2021
by
Fabien Amarger
Browse files
feat(query): Execute query only when the query button is clicked
It was launched after each query modification.
parent
feb04ebd0174
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/index.html
View file @
512832e3
...
...
@@ -92,7 +92,8 @@
</div>
</div>
<div
class=
"row justify-content-center"
>
<button
class=
"btn btn-primary"
id=
"csv-export-button"
disabled
>
Télécharger en CSV
</button>
<button
class=
"btn btn-primary"
id=
"query-button"
disabled
>
Exécuter la requête
</button>
<button
class=
"btn btn-secondary"
id=
"csv-export-button"
disabled
>
Télécharger en CSV
</button>
<div
class=
"col-md-11"
>
<div
id=
"yasr"
></div>
</div>
...
...
@@ -319,11 +320,11 @@
yasqe
.
setValue
(
queryString
);
if
(
queryString
.
length
===
0
)
{
$
(
"
#csv-export-button
"
).
prop
(
"
disabled
"
,
true
);
$
(
"
#query-button
"
).
prop
(
"
disabled
"
,
true
);
}
else
{
$
(
"
#csv-export-button
"
).
prop
(
"
disabled
"
,
false
);
$
(
"
#query-button
"
).
prop
(
"
disabled
"
,
false
);
}
yasqe
.
query
();
},
});
});
...
...
@@ -356,6 +357,9 @@
var
win
=
window
.
open
(
url
,
'
_blank
'
);
win
.
focus
();
};
document
.
getElementById
(
"
query-button
"
).
onclick
=
()
=>
{
yasqe
.
query
();
};
</script>
</body>
</html>
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