1. refactored code in preparation for adding code structure for map of science vis
This commit is contained in:
parent
1e0c2195e1
commit
1e82115d64
10 changed files with 481 additions and 49 deletions
|
@ -0,0 +1,26 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#assign standardVisualizationURLRoot ="/visualization">
|
||||
<#assign ajaxVisualizationURLRoot ="/visualizationAjax">
|
||||
<#assign dataVisualizationURLRoot ="/visualizationData">
|
||||
<#assign shortVisualizationURLRoot ="/vis">
|
||||
|
||||
<#assign organizationURI ="${organizationURI?url}">
|
||||
<#assign organizationVivoProfileURL = "${urls.base}/individual?uri=${organizationURI}">
|
||||
|
||||
<#assign subOrganizationVivoProfileURL = "${urls.base}/individual?">
|
||||
|
||||
<#assign subOrganizationMapOfScienceCommonURL = "${urls.base}${shortVisualizationURLRoot}/map-of-science/">
|
||||
|
||||
|
||||
<#if organizationLocalName?has_content >
|
||||
|
||||
<#assign organizationMapOfScienceURL = "${urls.base}${shortVisualizationURLRoot}/map-of-science/${organizationLocalName}">
|
||||
|
||||
<#else>
|
||||
|
||||
<#assign organizationMapOfScienceURL = '${urls.base}${shortVisualizationURLRoot}/map-of-science/?uri=${organizationURI}'>
|
||||
|
||||
</#if>
|
||||
|
||||
<#assign organizationMapOfScienceDataURL = "${urls.base}${dataVisualizationURLRoot}?vis=map-of-science&uri=${organizationURI}&vis_mode=json">
|
|
@ -0,0 +1,38 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- The Order of each element in this file is very important. Do not make any changes to it unless making
|
||||
corresponding changes in the included Templates. -->
|
||||
|
||||
|
||||
<#include "scienceMapSetup.ftl">
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
var scienceMapDataURL = "${organizationMapOfScienceDataURL}";
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: scienceMapDataURL
|
||||
dataType: "json",
|
||||
timeout: 5 * 60 * 1000,
|
||||
success: function (data) {
|
||||
|
||||
if (data.error) {
|
||||
|
||||
alert("error");
|
||||
alert(data);
|
||||
|
||||
} else {
|
||||
|
||||
alert("success");
|
||||
alert(data);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue