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
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Michael Coughlin
GraceDB Server
Commits
2d0b432d
Commit
2d0b432d
authored
11 years ago
by
Branson Stephens
Browse files
Options
Downloads
Patches
Plain Diff
crazy stuff that's probably bad.
parent
fbdf560c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/gracedb/event_detail.html
+54
-6
54 additions, 6 deletions
templates/gracedb/event_detail.html
with
54 additions
and
6 deletions
templates/gracedb/event_detail.html
+
54
−
6
View file @
2d0b432d
...
...
@@ -99,6 +99,7 @@
function
getAuditLogContents
()
{
logs
=
new
Array
();
tags
=
new
Array
();
var
ret
=
""
;
...
...
@@ -134,9 +135,16 @@
ret
+=
'
<td>{{log.N}}
\n
'
;
ret
+=
'
<td>{{log.created|multiTime:"logtime"}}</td>
\n
'
;
ret
+=
'
<td>{{log.issuer.first_name}} {{ log.issuer.last_name}}</td>
\n
'
;
{
%
if
object
.
getAvailableTags
%
}
ret
+=
'
<td>
\n
'
;
ret
+=
'
<table>
\n
'
;
log
=
new
Object
();
log
.
n
=
{{
log
.
N
}};
log
.
button_id
=
"
addtag_{{log.N}}
"
;
logs
.
push
(
log
);
ret
+=
'
<tr> <td>
\n
'
;
ret
+=
'
<button type="button" data-dojo-type="dijit/form/Button" id="addtag_{{log.N}}">add</button>
\n
'
;
ret
+=
'
</td> </tr>
\n
'
;
{
%
if
object
.
getAvailableTags
%
}
{
%
for
tag
in
log
.
tag_set
.
all
%
}
tag
=
new
Object
();
tag
.
name
=
"
{{tag.name}}
"
;
...
...
@@ -150,9 +158,9 @@
ret
+=
'
</button>
\n
'
;
ret
+=
'
</td> </tr>
\n
'
;
{
%
endfor
%
}
{
%
endif
%
}
ret
+=
'
</table>
\n
'
;
ret
+=
'
</td>
\n
'
;
{
%
endif
%
}
ret
+=
'
<td>{{log.comment|sanitize|escapejs}}
\n
'
;
{
%
if
log
.
fileurl
%
}
ret
+=
'
<a href="{{log.fileurl}}">{{log.filename}}</a>
\n
'
;
...
...
@@ -166,7 +174,7 @@
ret
+=
'
</tr>
\n
'
;
{
%
endfor
%
}
ret
+=
'
</table>
'
;
return
{
'
logContents
'
:
ret
,
'
tags
'
:
tags
};
return
{
'
logContents
'
:
ret
,
'
logs
'
:
logs
,
'
tags
'
:
tags
};
}
//-----------------------------------
...
...
@@ -182,6 +190,7 @@
"
dojox/editor/plugins/Save
"
,
"
dojox/editor/plugins/Preview
"
,
"
dijit/form/Button
"
,
"
dijit/form/Form
"
,
"
dijit/TitlePane
"
,
"
dojox/layout/ScrollPane
"
,
"
dojo/store/Memory
"
,
...
...
@@ -194,7 +203,7 @@
"
dijit/_editor/plugins/NewPage
"
,
"
dijit/_editor/plugins/FullScreen
"
,
"
dojo/domReady!
"
],
function
(
dom
,
parser
,
on
,
request
,
domForm
,
domConstruct
,
Editor
,
Save
,
Preview
,
Button
,
TitlePane
,
ScrollPane
,
Memory
,
ComboBox
,
Dialog
)
{
Button
,
Form
,
TitlePane
,
ScrollPane
,
Memory
,
ComboBox
,
Dialog
)
{
parser
.
parse
();
...
...
@@ -244,7 +253,9 @@
var
auditLogContents
=
ret
.
logContents
;
var
tags
=
ret
.
tags
;
console
.
log
(
"
before trying to get annotationsDiv
"
);
annotationsDiv
=
dom
.
byId
(
"
annotations
"
);
console
.
log
(
"
after getting it, contents = %s
"
,
annotationsDiv
.
innerHTML
);
if
(
doingPanes
)
{
...
...
@@ -369,7 +380,44 @@
'
insertImage
'
,
'
fullscreen
'
,
'
viewsource
'
,
'
newpage
'
,
'
|
'
,
previewbutton
,
savebutton
]
},
editor_div
);
// Now that all of the delete buttons have been added to the dom, we can set their actions.
// Now that all of the add and delete tag buttons have been added to the dom, we can set their actions.
for
(
var
i
=
0
;
i
<
logs
.
length
;
i
++
)
{
log
=
logs
[
i
];
var
n
=
log
.
n
;
tagButton
=
dom
.
byId
(
log
.
button_id
);
// Each one will have its own dialogue. Craziness.
var
addTagForm
=
new
Form
();
var
tagNameBox
=
new
TextBox
({
name
:
"
tagName
"
,
}).
placeAt
(
addTagForm
.
containerNode
);
var
addTagButton
=
new
Button
({
type
:
"
submit
"
,
label
:
"
OK
"
,
}).
placeAt
(
addTagForm
.
containerNode
);
on
(
addTagForm
,
"
submit
"
,
function
(
evt
)
{
evt
.
stopPropagation
();
evt
.
preventDefault
();
formData
=
addTagForm
.
getValues
()
var
tagName
=
formData
.
tagName
;
console
.
log
(
"
tagName = %s
"
,
tagName
);
addTagDialog
.
hide
();
});
addTagDialog
=
new
Dialog
({
title
:
"
Add Tag
"
,
content
:
addTagForm
,
style
:
"
width: 300px
"
});
on
(
tagButton
,
"
click
"
,
function
()
{
addTagDialog
.
show
();});
}
for
(
var
i
=
0
;
i
<
tags
.
length
;
i
++
)
{
tag
=
tags
[
i
];
tagButton
=
dom
.
byId
(
tag
.
button_id
);
...
...
@@ -599,7 +647,7 @@
</script>
{# {% include "gracedb/neighbors_frag.html" %} #}
{# {% include "gracedb/neighbors_frag.html" %}
#}
<div
id=
"annotations"
class=
"content-area"
>
...
...
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