Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl
Commits
8cb9a7ca
Commit
8cb9a7ca
authored
Nov 18, 2011
by
Laurent Gil
Browse files
Fixed bugs concerning the colours for the set of tables
parent
da44116e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
17 deletions
+18
-17
misc-scripts/sql2html.pl
misc-scripts/sql2html.pl
+18
-17
No files found.
misc-scripts/sql2html.pl
View file @
8cb9a7ca
...
...
@@ -313,9 +313,9 @@ while (<SQLFILE>) {
$table
=
'';
$parenth_count
=
0
;
}
else
{
else
{
# warn "Processing table";
# warn "Processing table";
## INDEXES ##
if
(
$doc
=~
/^\s*(primary\s+key)\s*\((.+)\)/i
or
$doc
=~
/^\s*(unique)\s*\((.+)\)/i
){
# Primary or unique
...
...
@@ -508,11 +508,12 @@ sub display_tables_list {
$html
.=
add_table_name_to_list
(
$t_name
);
$table_count
++
;
}
$html
.=
qq{ </ul>\n</td></tr></table>
<input type="button" onclick="show_hide_all()" style="background-color:#933;color:#FFF;cursor:pointer" value="Show/hide all" />
<input type="hidden" id="expand" value="0" />
}
;
$html
.=
qq{ </ul>\n</td></tr></table>}
;
}
$html
.=
qq{
<input type="button" onclick="show_hide_all()" style="background-color:#933;color:#FFF;cursor:pointer" value="Show/hide all" />
<input type="hidden" id="expand" value="0" />
}
;
return
$html
;
}
...
...
@@ -523,7 +524,7 @@ sub display_header {
if
(
$show_colour
&&
$header_colour
)
{
my
$hcolour
=
$documentation
->
{
$header_name
}{
colour
};
$hcolour
=
$default_colour
if
(
!
$hcolour
);
$hcolour
=
$default_colour
if
(
!
defined
(
$hcolour
)
)
;
$html
.=
qq{
<table style="border: 1px solid #CCCCCC;padding:0px;margin:0px;background-color:#FAFAFF"><tr>
<td style="background-color:$hcolour;width:10px"></td>
...
...
@@ -563,26 +564,26 @@ sub fill_documentation {
}
$info
=
'';
}
# Table description
elsif
(
$table
ne
'')
{
$documentation
->
{
$header
}{'
tables
'}{
$table
}{
$tag
}
=
$tag_content
;
}
# Header description
els
e
{
els
if
(
!
$documentation
->
{
$header
}{'
tables
'})
{
$documentation
->
{
$header
}{'
desc
'}
=
$tag_content
;
}
# Table description
else
{
$documentation
->
{
$header
}{'
tables
'}{
$table
}{
$tag
}
=
$tag_content
;
}
}
elsif
(
$tag
eq
'
colour
')
{
if
(
$table
ne
'')
{
if
(
!
$documentation
->
{
$header
}{'
tables
'})
{
$documentation
->
{
$header
}{'
colour
'}
=
$tag_content
;
$header_colour
=
1
;
}
elsif
(
$table
ne
'')
{
$documentation
->
{
$header
}{'
tables
'}{
$table
}{
$tag
}
=
$tag_content
;
if
(
!
grep
{
$tag_content
eq
$_
}
@colours
)
{
push
(
@colours
,
$tag_content
);
}
}
else
{
$documentation
->
{
$header
}{'
colour
'}
=
$tag_content
;
$header_colour
=
1
;
}
}
elsif
(
$tag
eq
'
column
')
{
$tag_content
=~
/(\w+)[\s\t]+(.+)/
;
...
...
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