Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
d6c20b24
Commit
d6c20b24
authored
Jan 15, 2014
by
Matija Obreza
Browse files
Using <content tag="javascript"> to move script blocks to the end of
html in the decorator
parent
44f45f8c
Changes
22
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/WEB-INF/jsp/accession/details.jsp
View file @
d6c20b24
...
...
@@ -331,6 +331,8 @@
<c:if
test=
"
${
accession
.
lastModifiedBy
ne
null
}
"
><spring:message
code=
"audit.lastModifiedBy"
arguments=
"
${
jspHelper
.
userFullName
(
accession
.
lastModifiedBy
)
}
"
/></c:if>
<fmt:formatDate
value=
"
${
accession
.
lastModifiedDate
}
"
type=
"both"
/>
</div>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
>
<c:if
test=
"
${
accessionGeo
ne
null
and
accessionGeo
.
latitude
ne
null
}
"
>
jQuery
(
document
).
ready
(
function
()
{
...
...
@@ -341,5 +343,6 @@
<%@include
file=
"/WEB-INF/jsp/wiews/ga.jsp"
%>
_pageDim
=
{
institute
:
'
${accession.instituteCode}
'
,
genus
:
'
${accession.taxonomy.genus}
'
};
</script>
</content>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/acl/editor.jsp
View file @
d6c20b24
...
...
@@ -46,6 +46,8 @@
<button
class=
"btn btn-primary"
><spring:message
code=
"save"
/></button>
<a
href=
"
<c:url
value=
"
${
backUrl
}
"
/>
"
class=
"btn btn-default"
><spring:message
code=
"cancel"
/></a>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
$
(
"
#permissionAdder input[type=button]
"
).
on
(
"
click
"
,
function
(
a
,
b
,
c
)
{
...
...
@@ -70,5 +72,6 @@
});
});
</script>
</content>
</body>
</html>
src/main/webapp/WEB-INF/jsp/admin/oauth/client/edit.jsp
View file @
d6c20b24
...
...
@@ -5,7 +5,6 @@
<html>
<head>
<title><spring:message
code=
"oauth-client.page.profile.title"
arguments=
"
${
item
.
clientId
}
"
argumentSeparator=
"|"
/></title>
<script
type=
"text/javascript"
src=
"/html/js/tinymce/tinymce.min.js"
></script>
</head>
<body>
<h1>
...
...
@@ -27,6 +26,8 @@
</a>
</form>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
src=
"/html/js/tinymce/tinymce.min.js"
></script>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
tinyMCE
.
init
({
...
...
@@ -39,6 +40,6 @@
});
});
</script>
</content>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/content/activitypost-edit.jsp
View file @
d6c20b24
...
...
@@ -5,7 +5,6 @@
<html>
<head>
<title>
${acitivtypost.title}
</title>
<script
type=
"text/javascript"
src=
"/html/js/tinymce/tinymce.min.js"
></script>
</head>
<body>
<h1>
...
...
@@ -40,6 +39,8 @@
<a
class=
"btn btn-default"
href=
"
<c:url
value=
"/"
/>
"
><spring:message
code=
"cancel"
/></a>
</form>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
src=
"/html/js/tinymce/tinymce.min.js"
></script>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
tinyMCE
.
init
({
...
...
@@ -60,7 +61,7 @@
});
});
</script>
</content>
</body>
</html>
src/main/webapp/WEB-INF/jsp/content/article-edit.jsp
View file @
d6c20b24
...
...
@@ -5,7 +5,6 @@
<html>
<head>
<title>
${title}
</title>
<script
type=
"text/javascript"
src=
"/html/js/tinymce/tinymce.min.js"
></script>
</head>
<body>
<h1>
...
...
@@ -41,6 +40,8 @@
<a
href=
"
<c:url
value=
"
${
article
.
id
ne
null
?
'/content/'
.
concat
(
article
.
slug
)
:
'/'
}
"
/>
"
class=
"btn btn-default"
>
Cancel
</a>
</form>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
src=
"/html/js/tinymce/tinymce.min.js"
></script>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
tinyMCE
.
init
({
...
...
@@ -53,5 +54,6 @@
});
});
</script>
</content>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/content/include/activitypost.jsp
View file @
d6c20b24
<%@include
file=
"/WEB-INF/jsp/init.jsp"
%>
<div
class=
"post type-article"
>
<div
class=
"activity-post"
>
<security:authorize
access=
"hasRole('ADMINISTRATOR')"
>
<a
href=
"
<c:url
value=
"/content/activitypost/${activityPost.id}/edit"
/>
"
class=
"close"
>
<spring:message
code=
"edit"
/>
</a>
</security:authorize>
<div
class=
"heading"
>
<c:out
value=
"
${
activityPost
.
title
}
"
escapeXml=
"false"
/>
</div>
<c:if
test=
"
${
activityPost
.
body
ne
null
and
activityPost
.
body
.
length
()
gt
0
}
"
>
<div
class=
"post-body"
>
<div
class=
"post-icon"
></div>
<div
class=
"post-head clearfix"
>
<div
class=
"user-icon"
><img
src=
"
<c:url
value=
"/html/images/icon_user_genesys.png"
/>
"
alt=
""
/></div>
<div
class=
"post-head-content"
><c:out
value=
"
${
activityPost
.
title
}
"
escapeXml=
"false"
/></div>
</div>
<c:if
test=
"
${
activityPost
.
body
ne
null
and
activityPost
.
body
.
length
()
gt
0
}
"
>
<div
class=
"post-inner clearfix"
>
<div
class=
"post-content"
>
<c:out
value=
"
${
activityPost
.
body
}
"
escapeXml=
"false"
/>
</div>
</c:if>
<div
class=
"foot"
>
</div>
</c:if>
<div
class=
"post-actions"
>
<security:authorize
access=
"hasRole('ADMINISTRATOR')"
>
<a
href=
"
<c:url
value=
"/content/activitypost/${activityPost.id}/edit"
/>
"
class=
"close"
>
<spring:message
code=
"edit"
/></a>
•
</security:authorize>
<%--
<a href="#">Like</a>
•
<a href="#">Comment</a>
•
<a href="#">Share</a>
•
<a href="#" class="comments-num">12</a>
•
--%>
<%-- <spring:message code="audit.createdBy" arguments="${activityPost.createdBy.name}" /> --%>
<c:if
test=
"
${
activityPost
.
lastModifiedBy
ne
null
}
"
><spring:message
code=
"audit.lastModifiedBy"
arguments=
"
${
jspHelper
.
userFullName
(
activityPost
.
lastModifiedBy
)
}
"
/></c:if>
<fmt:formatDate
value=
"
${
activityPost
.
postDate
.
time
}
"
/>
</div>
</div>
\ No newline at end of file
</div>
</div>
src/main/webapp/WEB-INF/jsp/country/edit.jsp
View file @
d6c20b24
...
...
@@ -5,7 +5,6 @@
<html>
<head>
<title><spring:message
code=
"country.page.profile.title"
arguments=
"
${
country
.
getName
(
pageContext
.
response
.
locale
)
}
"
argumentSeparator=
"|"
/></title>
<script
type=
"text/javascript"
src=
"/html/js/tinymce/tinymce.min.js"
></script>
</head>
<body>
<h1>
...
...
@@ -28,6 +27,8 @@
</a>
</form>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
src=
"/html/js/tinymce/tinymce.min.js"
></script>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
tinyMCE
.
init
({
...
...
@@ -40,6 +41,6 @@
});
});
</script>
</content>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/country/map.jsp
View file @
d6c20b24
...
...
@@ -23,7 +23,7 @@
</div>
</div>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
GoogleMaps
.
map
(
"
${pageContext.response.locale.language}
"
,
$
(
"
#map
"
),
{
...
...
@@ -54,6 +54,7 @@
});
});
</script>
</content>
</c:if>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/crop/index.jsp
View file @
d6c20b24
...
...
@@ -53,6 +53,7 @@
</c:if>
</ul>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
$
(
"
body
"
).
on
(
"
click
"
,
"
#loadMoreTaxonomies
"
,
function
(
event
)
{
...
...
@@ -76,5 +77,6 @@
});
});
</script>
</content>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/filter/index.jsp
View file @
d6c20b24
...
...
@@ -38,6 +38,8 @@
<div
id=
"filtersJson"
>
${jsonObject}
</div>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
// alert('${jsonString}');
...
...
@@ -154,6 +156,6 @@ jQuery(document).ready(function() {
FF
.
refreshJson
(
filters
);
});
</script>
</content>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/index.jsp
View file @
d6c20b24
...
...
@@ -8,56 +8,94 @@
<title><spring:message
code=
"page.home.title"
/></title>
</head>
<body>
<div
id=
"crops-menu"
class=
"content-block"
>
<c:if
test=
"
${
cropList
ne
null
and
cropList
.
size
()
gt
0
}
"
>
<h1>
<spring:message
code=
"crop.croplist"
/>
</h1>
<div
class=
"left-col clearfix"
>
<div
class=
"content-block"
id=
"crop-list-dropdown"
>
<h2><spring:message
code=
"crop.croplist"
/></h2>
<sec:authorize
access=
"hasRole('ADMINISTRATOR')"
>
<form
method=
"post"
action=
"
<c:url
value=
"/c/rebuild"
/>
"
>
<input
type=
"submit"
class=
"btn form-control"
value=
"Rebuild"
/>
</form>
</sec:authorize>
<ul
class=
"funny-list"
>
<c:forEach
items=
"
${
cropList
}
"
var=
"crop"
varStatus=
"status"
>
<div
class=
"dropdown"
>
<button
class=
"btn dropdown-toggle"
type=
"button"
data-toggle=
"dropdown"
>
Search Genus
<span
class=
"caret"
></span>
</button>
<ul
class=
"dropdown-menu"
>
</ul>
</div>
</div>
<c:if
test=
"
${
cropList
ne
null
and
cropList
.
size
()
gt
0
}
"
>
<div
class=
"content-block"
id=
"crop-list"
>
<ul
class=
"nav"
>
<c:forEach
items=
"
${
cropList
}
"
var=
"crop"
varStatus=
"status"
>
<li><a
class=
"show"
href=
"/c/${crop.shortName}/data"
><c:out
value=
"
${
crop
.
getName
(
pageContext
.
response
.
locale
)
}
"
/></a></li>
</c:forEach>
</ul>
</c:if>
</div>
</c:if>
</div>
<c:if
test=
"
${
lastNews
ne
null
}
"
>
<div
class=
"content-block"
style=
"overflow: auto;"
>
<h1>
<spring:message
code=
"activity.recent-activity"
/>
<security:authorize
access=
"hasRole('ADMINISTRATOR')"
>
<a
href=
"
<c:url
value=
"/content/activitypost/new"
/>
"
class=
"pull-right close"
style=
""
>
<spring:message
code=
"activitypost.add-new-post"
/>
</a>
</security:authorize>
</h1>
<c:forEach
items=
"
${
lastNews
}
"
var=
"activityPost"
varStatus=
"status"
>
<!-- left column end / middle columns start -->
<div
class=
"middle-col clearfix"
>
<h2><spring:message
code=
"activity.recent-activity"
/></h2>
<security:authorize
access=
"hasRole('ADMINISTRATOR')"
>
<a
href=
"
<c:url
value=
"/content/activitypost/new"
/>
"
class=
"pull-right close"
style=
""
>
<spring:message
code=
"activitypost.add-new-post"
/>
</a>
</security:authorize>
<ul
class=
"nav nav-tabs"
id=
"news"
>
<li
class=
"active"
><a
href=
"#news-feed"
>
News Feed
</a></li>
<li><a
href=
"#by-country"
>
By Country
</a></li>
<li><a
href=
"#by-crop"
>
By Crop
</a></li>
</ul>
<div
class=
"tab-content"
>
<div
class=
"tab-pane active"
id=
"news-feed"
>
<h1>
Recent Activity
</h1>
<div
class=
"all-posts"
>
<c:forEach
items=
"
${
lastNews
}
"
var=
"activityPost"
varStatus=
"status"
>
<%@include
file=
"/WEB-INF/jsp/content/include/activitypost.jsp"
%>
</c:forEach>
</div>
</c:if>
</div>
</div>
</div>
</div>
<!-- middle column end / right columns start -->
<div
class=
"right-col clearfix"
>
<div
class=
"content-block"
id=
"stats"
>
<h2>
Stats
</h2>
<div
class=
"stats-map"
>
<div
class=
"all-stats"
>
<div
class=
"one-stat"
>
326 Countries
</div>
<div
class=
"one-stat"
>
13.432 Institutes
</div>
<div
class=
"one-stat"
>
2.544.876 Accessions
</div>
</div>
</div>
</div>
</div>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
// Code to toggle the crops menu in small devices
$
(
"
body
"
).
on
(
"
click
"
,
"
#crops-menu > h1
"
,
function
(
event
)
{
event
.
preventDefault
();
var
menu
=
$
(
"
#crops-menu .funny-list
"
);
if
(
menu
.
attr
(
'
washidden
'
)
||
!
menu
.
is
(
"
:visible
"
))
{
menu
.
attr
(
'
washidden
'
,
true
);
$
(
"
#crops-menu .funny-list
"
).
toggle
();
}
});
});
</script>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
'
#news a
'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
$
(
this
).
tab
(
'
show
'
);
});
});
</script>
</content>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/metadata/view.jsp
View file @
d6c20b24
...
...
@@ -123,8 +123,10 @@
</table>
</div>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
>
<%@include
file=
"/WEB-INF/jsp/wiews/ga.jsp"
%>
</script>
</content>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/organization/details.jsp
View file @
d6c20b24
...
...
@@ -61,6 +61,7 @@
</ul>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
$
(
"
#countryNavigation
"
).
on
(
"
change
"
,
function
()
{
...
...
@@ -68,5 +69,6 @@
});
});
</script>
</content>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/organization/edit.jsp
View file @
d6c20b24
...
...
@@ -5,7 +5,6 @@
<html>
<head>
<title><spring:message
code=
"organization.page.profile.title"
arguments=
"
${
organization
.
slug
}
"
argumentSeparator=
"|"
/></title>
<script
type=
"text/javascript"
src=
"/html/js/tinymce/tinymce.min.js"
></script>
</head>
<body>
<h1>
...
...
@@ -42,6 +41,8 @@
</a>
</form>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
src=
"/html/js/tinymce/tinymce.min.js"
></script>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
tinyMCE
.
init
({
...
...
@@ -54,6 +55,7 @@
});
});
</script>
</content>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/organization/map.jsp
View file @
d6c20b24
...
...
@@ -25,7 +25,7 @@
</div>
</div>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
GoogleMaps
.
map
(
"
${pageContext.response.locale.language}
"
,
$
(
"
#map
"
),
{
...
...
@@ -56,6 +56,7 @@
});
});
</script>
</content>
</c:if>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/registration.jsp
View file @
d6c20b24
...
...
@@ -5,9 +5,6 @@
<html>
<head>
<title><spring:message
code=
"registration.page.title"
/></title>
<%@include
file=
"head-init.jsp"
%>
<script
type=
"text/javascript"
src=
"/html/js/login.js"
></script>
</head>
<body>
<h1>
...
...
@@ -80,5 +77,8 @@
</div>
</form>
<content
tag=
"javascript"
>
<script
type=
"text/javascript"
src=
"/html/js/login.js"
></script>
</content>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/request/index.jsp
View file @
d6c20b24
...
...
@@ -65,13 +65,5 @@
</c:if>
</c:if>
<script
type=
"text/javascript"
>
/* jQuery(document).ready(function(){
if(document.location.hash != '') {
setTimeout(function() { document.location.hash=''; }, 2000);
}
}); */
</script>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/selection/index.jsp
View file @
d6c20b24
...
...
@@ -82,14 +82,5 @@
</div>
</form>
</c:if>
<script
type=
"text/javascript"
>
/* jQuery(document).ready(function(){
if(document.location.hash != '') {
setTimeout(function() { document.location.hash=''; }, 2000);
}
}); */
</script>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/user/profile.jsp
View file @
d6c20b24
...
...
@@ -75,7 +75,8 @@
</div>
</form>
</security:authorize>
<content
tag=
"javascript"
>
<security:authorize
access=
"isAuthenticated()"
>
<script
src=
"
<c:url
value=
"/html/js/main.js"
/>
"
></script>
<script
src=
"
<c:url
value=
"/html/js/jsonclient.js"
/>
"
></script>
...
...
@@ -128,6 +129,6 @@
});
</script>
</security:authorize>
</content>
</body>
</html>
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/wiews/details.jsp
View file @
d6c20b24
...
...
@@ -137,6 +137,7 @@
</div>
</div>
<content
tag=
"javascript"
>
<c:if
test=
"
${
faoInstitute
.
latitude
ne
null
}
"
>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
...
...
@@ -152,5 +153,6 @@
<%@include
file=
"/WEB-INF/jsp/wiews/ga.jsp"
%>
_pageDim
=
{
institute
:
'
${faoInstitute.code}
'
};
</script>
</content>
</body>
</html>
\ No newline at end of file
Prev
1
2
Next
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