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
vidjil
vidjil
Commits
c6f9c1a7
Commit
c6f9c1a7
authored
Jan 12, 2017
by
Armand Bour
Committed by
Mikaël Salson
Feb 22, 2017
Browse files
Add export fasta button (bug)
parent
c7b7a6bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
browser/segmenter_page.html
View file @
c6f9c1a7
...
...
@@ -31,6 +31,7 @@
<p>
or
</p>
<input
id=
"form_sequences_file"
name=
"sequences_file"
type=
"file"
/>
<input
id=
"form_submit"
type=
"button"
value=
"Submit"
/>
<button
id=
"btn_exportfasta"
class=
"btn_feature"
>
Export to FASTA
</button>
</div>
</form>
<p
id=
"copyright"
>
Copyright Vidjil © 2016
</p>
...
...
browser/segmenter_page.js
View file @
c6f9c1a7
...
...
@@ -143,13 +143,36 @@ function displayWaitingForCallback(waiting) {
/**
* Enables or disables the submit button.
* @param {bool} disabled - 'true' to
en
able, 'false' to
dis
able.
* @param {bool} disabled - 'true' to
dis
able, 'false' to
en
able.
*/
function
disableSubmitButt
(
disabled
)
{
var
submitButt
=
document
.
getElementById
(
'
form_submit
'
);
submitButt
.
disabled
=
disabled
;
}
/**
* Enables or disables the feature buttons.
* @param {bool} disabled - 'true' to disable, 'false' to enable.
*/
function
disableFeatures
(
disabled
)
{
var
featuresBtn
=
document
.
getElementsByClassName
(
'
btn_feature
'
);
for
(
var
i
=
0
;
i
<
featuresBtn
.
length
;
i
++
)
{
featuresBtn
[
i
].
disabled
=
disabled
;
}
}
/**
* Prepares the button listeners.
*/
function
prepareButtons
()
{
var
exportFastaBtn
=
document
.
getElementById
(
'
btn_exportfasta
'
);
exportFastaBtn
.
addEventListener
(
'
click
'
,
function
()
{
model
.
exportFasta
();
});
}
/**
* Removes all children from Vidjil views.
*/
...
...
@@ -177,6 +200,9 @@ function main() {
console
=
new
Com
(
window
.
console
);
setCrossDomainModel
(
model
);
prepareButtons
();
disableFeatures
(
true
);
// Parse sequences and add to segmenter
// displayVidjilViews(false);
submitNode
.
addEventListener
(
'
click
'
,
function
()
{
...
...
@@ -205,6 +231,7 @@ function main() {
addPrefixedEvent
(
segContainer
,
'
TransitionEnd
'
,
funct
);
displayWaitingForCallback
(
false
);
disableSubmitButt
(
false
);
disableFeatures
(
false
);
},
function
(
xhr
,
textStatus
,
exc
)
{
// On error return
displayError
(
'
We had a problem processing your request.
'
,
textStatus
,
exc
);
...
...
Write
Preview
Supports
Markdown
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