Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IGWN Computing and Software
GraceDB
GraceDB Server
Commits
91be6c3b
Commit
91be6c3b
authored
10 years ago
by
Branson Craig Stephens
Browse files
Options
Downloads
Patches
Plain Diff
Some minor style fixes.
parent
b11fbce2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
static/css/style.css
+3
-2
3 additions, 2 deletions
static/css/style.css
templates/gracedb/event_detail_script.js
+74
-69
74 additions, 69 deletions
templates/gracedb/event_detail_script.js
with
77 additions
and
71 deletions
static/css/style.css
+
3
−
2
View file @
91be6c3b
...
...
@@ -62,11 +62,12 @@ table.figures {width:300px;height:270px;border:1px solid gray;}
background-color
:
rgb
(
200
,
200
,
200
);
cursor
:
pointer
;
min-width
:
20px
;
min-height
:
20px
;
/* min-height: 20px; */
height
:
20px
;
}
.modButtonClass.left
{
padding
:
0
px
0px
0
px
0px
;
padding
:
2
px
0px
2
px
0px
;
margin
:
2px
0px
2px
2px
;
}
...
...
This diff is collapsed.
Click to expand it.
templates/gracedb/event_detail_script.js
+
74
−
69
View file @
91be6c3b
...
...
@@ -293,83 +293,88 @@ require([
// Pull the EELs out of the rest content and create a new simple store from them.
var
eels
=
content
.
embblog
;
var
columns
=
[
{
field
:
'
created
'
,
label
:
'
Time Created (UTC)
'
},
{
field
:
'
submitter
'
,
label
:
'
Submitter
'
},
{
field
:
'
group
'
,
label
:
'
MOU Group
'
},
{
field
:
'
gpstime
'
,
label
:
'
GPS time of observation
'
},
{
field
:
'
duration
'
,
label
:
'
Exposure time (s)
'
},
{
field
:
'
radec
'
,
label
:
'
Covering (ra, dec)
'
,
get
:
function
(
object
){
var
rastring
=
object
.
ra
+
"
\
xB1
"
+
object
.
raWidth
/
2.0
;
var
decstring
=
object
.
dec
+
"
\
xB1
"
+
object
.
decWidth
/
2.0
;
return
"
(
"
+
rastring
+
'
,
'
+
decstring
+
"
)
"
;
},
if
(
eels
.
length
==
0
)
{
eelDiv
=
dom
.
byId
(
'
eel-grid
'
);
eelDiv
.
innerHTML
=
'
<p> (No EMBB log entries.) </p>
'
;
}
else
{
var
columns
=
[
{
field
:
'
created
'
,
label
:
'
Time Created (UTC)
'
},
{
field
:
'
submitter
'
,
label
:
'
Submitter
'
},
{
field
:
'
group
'
,
label
:
'
MOU Group
'
},
{
field
:
'
gpstime
'
,
label
:
'
GPS time of observation
'
},
{
field
:
'
duration
'
,
label
:
'
Exposure time (s)
'
},
{
field
:
'
radec
'
,
label
:
'
Covering (ra, dec)
'
,
get
:
function
(
object
){
var
rastring
=
object
.
ra
+
"
\
xB1
"
+
object
.
raWidth
/
2.0
;
var
decstring
=
object
.
dec
+
"
\
xB1
"
+
object
.
decWidth
/
2.0
;
return
"
(
"
+
rastring
+
'
,
'
+
decstring
+
"
)
"
;
},
}
];
var
subRowColumns
=
[
{
field
:
'
instrument
'
,
label
:
'
Instrument
'
},
{
field
:
'
eel_status
'
,
label
:
'
Entry type
'
},
{
field
:
'
footprintID
'
,
label
:
'
Observation ID
'
},
{
field
:
'
waveband
'
,
label
:
'
Waveband
'
},
{
field
:
'
obs_status
'
,
label
:
'
Observation status
'
},
{
field
:
'
extra_info_dict
'
,
label
:
'
JSON info
'
},
];
// Add extra class names to our grid cells so we can style them separately
for
(
i
=
0
;
i
<
columns
.
length
;
i
++
)
{
columns
[
i
].
className
=
'
supergrid-cell
'
;
}
];
var
subRowColumns
=
[
{
field
:
'
instrument
'
,
label
:
'
Instrument
'
},
{
field
:
'
eel_status
'
,
label
:
'
Entry type
'
},
{
field
:
'
footprintID
'
,
label
:
'
Observation ID
'
},
{
field
:
'
waveband
'
,
label
:
'
Waveband
'
},
{
field
:
'
obs_status
'
,
label
:
'
Observation status
'
},
{
field
:
'
extra_info_dict
'
,
label
:
'
JSON info
'
},
];
// Add extra class names to our grid cells so we can style them separately
for
(
i
=
0
;
i
<
columns
.
length
;
i
++
)
{
columns
[
i
].
className
=
'
supergrid-cell
'
;
}
for
(
i
=
0
;
i
<
subRowColumns
.
length
;
i
++
)
{
subRowColumns
[
i
].
className
=
'
subgrid-cell
'
;
}
var
grid
=
new
Grid
({
columns
:
columns
,
className
:
'
dgrid-autoheight
'
,
renderRow
:
function
(
object
,
options
)
{
// Add the supergrid-row class to the row so we can style it separately from the subrows.
var
div
=
put
(
'
div.collapsed.supergrid-row
'
,
Grid
.
prototype
.
renderRow
.
call
(
this
,
object
,
options
));
// Add the subdiv table which will expand and contract.
var
t
=
put
(
div
,
'
div.expando table
'
);
// I'm finding that the table needs to be 100% of the available width, otherwise
// Firefox doesn't like it. Hence the extra empty column.
var
subGridNode
=
put
(
t
,
'
tr td[style="width: 5%"]+td div
'
);
var
sg
=
new
Grid
({
columns
:
subRowColumns
,
className
:
'
dgird-subgrid
'
,
},
subGridNode
);
sg
.
renderArray
([
object
]);
// Add the text comment
put
(
t
,
'
tr td[style="width: 5%"]+td div.subrid-text
'
,
object
.
comment
);
return
div
;
for
(
i
=
0
;
i
<
subRowColumns
.
length
;
i
++
)
{
subRowColumns
[
i
].
className
=
'
subgrid-cell
'
;
}
},
'
eel-grid
'
);
grid
.
renderArray
(
eels
);
grid
.
set
(
"
sort
"
,
'
N
'
,
descending
=
true
);
var
expandedNode
=
null
;
var
grid
=
new
Grid
({
columns
:
columns
,
className
:
'
dgrid-autoheight
'
,
renderRow
:
function
(
object
,
options
)
{
// Add the supergrid-row class to the row so we can style it separately from the subrows.
var
div
=
put
(
'
div.collapsed.supergrid-row
'
,
Grid
.
prototype
.
renderRow
.
call
(
this
,
object
,
options
));
// Add the subdiv table which will expand and contract.
var
t
=
put
(
div
,
'
div.expando table
'
);
// I'm finding that the table needs to be 100% of the available width, otherwise
// Firefox doesn't like it. Hence the extra empty column.
var
subGridNode
=
put
(
t
,
'
tr td[style="width: 5%"]+td div
'
);
var
sg
=
new
Grid
({
columns
:
subRowColumns
,
className
:
'
dgird-subgrid
'
,
},
subGridNode
);
sg
.
renderArray
([
object
]);
// Add the text comment
put
(
t
,
'
tr td[style="width: 5%"]+td div.subrid-text
'
,
object
.
comment
);
return
div
;
}
},
'
eel-grid
'
);
grid
.
renderArray
(
eels
);
grid
.
set
(
"
sort
"
,
'
N
'
,
descending
=
true
);
// listen for clicks to trigger expand/collapse in table view mode
var
expandoListener
=
on
(
grid
.
domNode
,
'
.dgrid-row:click
'
,
function
(
event
)
{
var
node
=
grid
.
row
(
event
).
element
;
var
collapsed
=
node
.
className
.
indexOf
(
'
collapsed
'
)
>=
0
;
var
expandedNode
=
null
;
// toggle state of node which was clicked
put
(
node
,
(
collapsed
?
'
!
'
:
'
.
'
)
+
'
collapsed
'
);
// listen for clicks to trigger expand/collapse in table view mode
var
expandoListener
=
on
(
grid
.
domNode
,
'
.dgrid-row:click
'
,
function
(
event
)
{
var
node
=
grid
.
row
(
event
).
element
;
var
collapsed
=
node
.
className
.
indexOf
(
'
collapsed
'
)
>=
0
;
// if clicked row wasn't expanded, collapse any previously-expanded row
collapsed
&&
expandedNode
&&
put
(
expandedNode
,
'
.
collapsed
'
);
// toggle state of node which was clicked
put
(
node
,
(
collapsed
?
'
!
'
:
'
.
'
)
+
'
collapsed
'
);
// if the row clicked was previously expanded, nothing is expanded now
expandedNode
=
collapsed
?
node
:
null
;
});
// if clicked row wasn't expanded, collapse any previously-expanded row
collapsed
&&
expandedNode
&&
put
(
expandedNode
,
'
.collapsed
'
);
// if the row clicked was previously expanded, nothing is expanded now
expandedNode
=
collapsed
?
node
:
null
;
});
}
// endif on whether we have any eels or not.
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment