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
genotoul-bioinfo
D-GENIES
Commits
8b6cd807
Commit
8b6cd807
authored
Apr 16, 2018
by
Floreal Cabanettes
Browse files
Better fix of headers link
parent
8c92c3f8
Changes
6
Show whitespace changes
Inline
Side-by-side
minify-js.sh
View file @
8b6cd807
...
@@ -22,3 +22,4 @@ babel.js -o dgenies.result.min.js --compact --minified dgenies.result.js dgenies
...
@@ -22,3 +22,4 @@ babel.js -o dgenies.result.min.js --compact --minified dgenies.result.js dgenies
babel.js
-o
jquery.fileupload.min.js
--compact
--minified
jquery.fileupload.js jquery.fileupload-process.js jquery.fileupload-validate.js
babel.js
-o
jquery.fileupload.min.js
--compact
--minified
jquery.fileupload.js jquery.fileupload-process.js jquery.fileupload-validate.js
babel.js
-o
dgenies.run.min.js
--compact
--minified
dgenies.run.js
babel.js
-o
dgenies.run.min.js
--compact
--minified
dgenies.run.js
babel.js
-o
dgenies.status.min.js
--compact
--minified
dgenies.status.js
babel.js
-o
dgenies.status.min.js
--compact
--minified
dgenies.status.js
babel.js
-o
dgenies.documentation.min.js
--compact
--minified
dgenies.documentation.js
src/dgenies/lib/functions.py
View file @
8b6cd807
...
@@ -283,12 +283,3 @@ class Functions:
...
@@ -283,12 +283,3 @@ class Functions:
def
query_fasta_file_exists
(
res_dir
):
def
query_fasta_file_exists
(
res_dir
):
fasta_file
=
os
.
path
.
join
(
res_dir
,
".query"
)
fasta_file
=
os
.
path
.
join
(
res_dir
,
".query"
)
return
os
.
path
.
exists
(
fasta_file
)
and
os
.
path
.
isfile
(
fasta_file
)
return
os
.
path
.
exists
(
fasta_file
)
and
os
.
path
.
isfile
(
fasta_file
)
@
staticmethod
def
replace_headers
(
text
):
headers
=
re
.
findall
(
"<h\d id=
\"
[^
\"
]+
\"
>"
,
text
)
for
header
in
headers
:
id_header
=
re
.
search
(
"id=
\"
([^
\"
]+)
\"
"
,
header
).
group
(
1
)
text
=
text
.
replace
(
header
,
"<span class=
\"
anchor
\"
id=
\"
%s
\"
></span>%s"
%
(
id_header
,
re
.
sub
(
r
"id=\"[^\"]+\""
,
"class=
\"
section
\"
"
,
header
)))
return
text
src/dgenies/static/js/dgenies.documentation.js
0 → 100644
View file @
8b6cd807
if
(
!
dgenies
)
{
throw
"
dgenies wasn't included!
"
}
dgenies
.
documentation
=
{};
dgenies
.
documentation
.
init
=
function
()
{
$
(
"
table
"
).
addClass
(
"
table table-striped
"
);
dgenies
.
documentation
.
fix_links_headers
();
};
dgenies
.
documentation
.
fix_links_headers
=
function
()
{
$
(
"
#plan
"
).
on
(
"
click
"
,
"
a
"
,
function
(
e
)
{
e
.
preventDefault
();
dgenies
.
documentation
.
goto
(
this
);
})
};
dgenies
.
documentation
.
goto
=
function
(
elem
)
{
let
top
=
$
(
$
(
elem
).
attr
(
"
href
"
)).
offset
()[
"
top
"
];
$
(
window
).
scrollTop
(
top
-
55
);
$
(
elem
).
blur
();
};
\ No newline at end of file
src/dgenies/static/js/dgenies.documentation.min.js
0 → 100644
View file @
8b6cd807
if
(
!
dgenies
){
throw
"
dgenies wasn't included!
"
}
dgenies
.
documentation
=
{};
dgenies
.
documentation
.
init
=
function
(){
$
(
"
table
"
).
addClass
(
"
table table-striped
"
);
dgenies
.
documentation
.
fix_links_headers
()};
dgenies
.
documentation
.
fix_links_headers
=
function
(){
$
(
"
#plan
"
).
on
(
"
click
"
,
"
a
"
,
function
(
e
){
e
.
preventDefault
();
dgenies
.
documentation
.
goto
(
this
)})};
dgenies
.
documentation
.
goto
=
function
(
elem
){
let
top
=
$
(
$
(
elem
).
attr
(
"
href
"
)).
offset
()[
"
top
"
];
$
(
window
).
scrollTop
(
top
-
55
);
$
(
elem
).
blur
()};
src/dgenies/templates/documentation.html
View file @
8b6cd807
{% extends 'base.html' %}
{% extends 'base.html' %}
{% block scripts %}
{% block scripts %}
{{ super() }}
{{ super() }}
{% if debug %}
<script
src=
"{{ url_for('static', filename='js/dgenies.documentation.js') }}"
type=
"text/JavaScript"
></script>
{% else %}
<script
src=
"{{ url_for('static', filename='js/dgenies.documentation.min.js') }}"
type=
"text/JavaScript"
></script>
{% endif %}
<style>
<style>
#plan-back
,
#body
{
#plan-back
,
#body
{
display
:
inline-block
;
display
:
inline-block
;
...
@@ -45,12 +50,10 @@
...
@@ -45,12 +50,10 @@
}
}
{
%
endif
%
}
{
%
endif
%
}
</style>
</style>
{% endblock %}
<script
type=
"text/javascript"
>
{% block onload %}
$
(
document
).
ready
(
function
()
{
{{ super() }}
$
(
"
table
"
).
addClass
(
"
table table-striped
"
);
dgenies.documentation.init();
});
</script>
{% endblock %}
{% endblock %}
{% block content %}
{% block content %}
...
...
src/dgenies/views.py
View file @
8b6cd807
...
@@ -347,7 +347,7 @@ def documentation_run():
...
@@ -347,7 +347,7 @@ def documentation_run():
content
=
template
.
render
(
mode
=
MODE
,
version
=
version
,
size
=
max_upload_file_size
,
size_unc
=
max_upload_size
,
content
=
template
.
render
(
mode
=
MODE
,
version
=
version
,
size
=
max_upload_file_size
,
size_unc
=
max_upload_size
,
size_ava
=
max_upload_size_ava
)
size_ava
=
max_upload_size_ava
)
md
=
Markdown
(
extensions
=
[
TocExtension
(
baselevel
=
1
)])
md
=
Markdown
(
extensions
=
[
TocExtension
(
baselevel
=
1
)])
content
=
Functions
.
replace_headers
(
str
(
Markup
(
md
.
convert
(
content
))
))
content
=
Markup
(
md
.
convert
(
content
))
toc
=
Markup
(
md
.
toc
)
toc
=
Markup
(
md
.
toc
)
return
render_template
(
"documentation.html"
,
menu
=
"documentation"
,
content
=
content
,
toc
=
toc
)
return
render_template
(
"documentation.html"
,
menu
=
"documentation"
,
content
=
content
,
toc
=
toc
)
...
@@ -358,7 +358,7 @@ def documentation_result():
...
@@ -358,7 +358,7 @@ def documentation_result():
encoding
=
'utf-8'
)
as
install_instr
:
encoding
=
'utf-8'
)
as
install_instr
:
content
=
install_instr
.
read
()
content
=
install_instr
.
read
()
md
=
Markdown
(
extensions
=
[
TocExtension
(
baselevel
=
1
)])
md
=
Markdown
(
extensions
=
[
TocExtension
(
baselevel
=
1
)])
content
=
Functions
.
replace_headers
(
str
(
Markup
(
md
.
convert
(
content
))
))
content
=
Markup
(
md
.
convert
(
content
))
toc
=
Markup
(
md
.
toc
)
toc
=
Markup
(
md
.
toc
)
return
render_template
(
"documentation.html"
,
menu
=
"documentation"
,
content
=
content
,
toc
=
toc
)
return
render_template
(
"documentation.html"
,
menu
=
"documentation"
,
content
=
content
,
toc
=
toc
)
...
@@ -369,7 +369,7 @@ def documentation_formats():
...
@@ -369,7 +369,7 @@ def documentation_formats():
encoding
=
'utf-8'
)
as
install_instr
:
encoding
=
'utf-8'
)
as
install_instr
:
content
=
install_instr
.
read
()
content
=
install_instr
.
read
()
md
=
Markdown
(
extensions
=
[
TocExtension
(
baselevel
=
1
),
TableExtension
()])
md
=
Markdown
(
extensions
=
[
TocExtension
(
baselevel
=
1
),
TableExtension
()])
content
=
Functions
.
replace_headers
(
str
(
Markup
(
md
.
convert
(
content
))
))
content
=
Markup
(
md
.
convert
(
content
))
toc
=
Markup
(
md
.
toc
)
toc
=
Markup
(
md
.
toc
)
return
render_template
(
"documentation.html"
,
menu
=
"documentation"
,
content
=
content
,
toc
=
toc
)
return
render_template
(
"documentation.html"
,
menu
=
"documentation"
,
content
=
content
,
toc
=
toc
)
...
@@ -380,7 +380,7 @@ def documentation_dotplot():
...
@@ -380,7 +380,7 @@ def documentation_dotplot():
encoding
=
'utf-8'
)
as
install_instr
:
encoding
=
'utf-8'
)
as
install_instr
:
content
=
install_instr
.
read
()
content
=
install_instr
.
read
()
md
=
Markdown
(
extensions
=
[
TocExtension
(
baselevel
=
1
)])
md
=
Markdown
(
extensions
=
[
TocExtension
(
baselevel
=
1
)])
content
=
Functions
.
replace_headers
(
str
(
Markup
(
md
.
convert
(
content
))
))
content
=
Markup
(
md
.
convert
(
content
))
toc
=
Markup
(
md
.
toc
)
toc
=
Markup
(
md
.
toc
)
return
render_template
(
"documentation.html"
,
menu
=
"documentation"
,
content
=
content
,
toc
=
toc
)
return
render_template
(
"documentation.html"
,
menu
=
"documentation"
,
content
=
content
,
toc
=
toc
)
...
@@ -395,7 +395,7 @@ def install():
...
@@ -395,7 +395,7 @@ def install():
template
=
env
.
from_string
(
content
)
template
=
env
.
from_string
(
content
)
content
=
template
.
render
(
version
=
latest
.
latest
,
win32
=
latest
.
win32
)
content
=
template
.
render
(
version
=
latest
.
latest
,
win32
=
latest
.
win32
)
md
=
Markdown
(
extensions
=
[
TocExtension
(
baselevel
=
1
)])
md
=
Markdown
(
extensions
=
[
TocExtension
(
baselevel
=
1
)])
content
=
Functions
.
replace_headers
(
str
(
Markup
(
md
.
convert
(
content
))
))
content
=
Markup
(
md
.
convert
(
content
))
toc
=
Markup
(
md
.
toc
)
toc
=
Markup
(
md
.
toc
)
return
render_template
(
"documentation.html"
,
menu
=
"install"
,
content
=
content
,
toc
=
toc
)
return
render_template
(
"documentation.html"
,
menu
=
"install"
,
content
=
content
,
toc
=
toc
)
...
...
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