Commit ef5b3a2f authored by Piotr Gawron's avatar Piotr Gawron
Browse files

new export functionality available by default

parent cd3482af
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<f:view contentType="text/html">
<h:head>
<script src="https://maps.google.com/maps/api/js?libraries=drawing&amp;v=3.26" type="text/javascript"/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"/>
<script src="https://twitter.github.io/typeahead.js/releases/latest/typeahead.bundle.min.js" type="text/javascript"/>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css"/>
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
<link rel="shortcut icon" href="./resources/images/favicon.png" type="image/png" />
<h:outputScript library="js" name="minerva.js" />
<script type="text/javascript">
//<![CDATA[
function initMap(){
var element = document.getElementById('minervaAppDiv');
return minerva.createExport({
element : element,
}).then(function(result){
customMap = result;
document.title = result.getProject().getName();
}).catch(function(rejectReason){
minerva.GuiConnector.alert(rejectReason);
});
}
//]]>
</script>
</h:head>
<h:body onload="initMap();" >
<h:outputStylesheet library="css" name="style.css"/>
<h:outputStylesheet library="css" name="minerva.css" />
<h:outputStylesheet library="css" name="pileup.css"/>
<h:outputStylesheet library="css" name="bootstrap.min.css"/>
<h:outputScript library="primefaces" name="jquery/jquery.js" target="head" />
<div id="minervaAppDiv" style="height: 100%;width: 100%;margin: 0;"/>
</h:body>
</f:view>
</html>
......@@ -7,97 +7,51 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<f:view contentType="text/html">
<h:head>
<title>#{mapMB.currentProject.name} - data export</title>
<link rel="shortcut icon" href="./resources/images/favicon.png" type="image/png" />
<h:outputStylesheet library="css" name="style.css"/>
<h:outputStylesheet library="css" name="export.css"/>
<script src="https://maps.google.com/maps/api/js?libraries=drawing&amp;v=3.26" type="text/javascript"/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"/>
<script src="https://twitter.github.io/typeahead.js/releases/latest/typeahead.bundle.min.js" type="text/javascript"/>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css"/>
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
<ui:include src="/WEB-INF/components/admin/statistics.xhtml" />
<link rel="shortcut icon" href="./resources/images/favicon.png" type="image/png" />
<h:outputScript library="js" name="minerva.js" />
<script type="text/javascript">
//<![CDATA[
function initMap(){
var element = document.getElementById('minervaAppDiv');
return minerva.createExport({
element : element,
}).then(function(result){
customMap = result;
document.title = result.getProject().getName();
}).catch(function(rejectReason){
minerva.GuiConnector.alert(rejectReason);
});
}
//]]>
</script>
</h:head>
<h:body>
<ui:include src="/WEB-INF/components/admin/header.xhtml" />
<h:form prependId="false">
<p:tabView id="tabView" dynamic="true">
<p:tab id="speciesTab" title="Elements export">
<h:panelGrid columns="2" style="margin-bottom:10px;" columnClasses="topAligned" cellpadding="5">
<h:outputLabel value="Type: " />
<p:selectManyCheckbox id="speciesTypeList" value="#{exportMB.selectedSpeciesType}" columns="5"
layout="grid" >
<f:selectItems value="#{exportMB.speciesTypeList}"/>
</p:selectManyCheckbox>
<h:outputLabel value="Columns: " />
<p:selectManyCheckbox id="speciesColumnList" value="#{exportMB.selectedSpeciesColumn}" columns="5"
layout="grid" >
<f:selectItems value="#{exportMB.speciesColumnList}"/>
</p:selectManyCheckbox>
<h:outputLabel value="Annotations: " />
<p:pickList value="#{exportMB.elementAvailableMiriam}" var="miriam" itemLabel="#{miriam.left.commonName} (#{miriam.right})" itemValue="#{miriam}" converter="miriamTypeConverter">
<f:facet name="sourceCaption">Available</f:facet>
<f:facet name="targetCaption">Used</f:facet>
<p:column>
<h:outputText value="#{miriam.left.commonName} (#{miriam.right})" style="background-color: #{miriam.right>0?'#00FF00':'#FFFFFF'}"/>
</p:column>
</p:pickList>
<h:outputLabel value="Included compartments/pathways: " />
<p:pickList value="#{exportMB.elementIncludedComponent}" var="comp" itemLabel="#{comp}" itemValue="#{comp}" >
<f:facet name="sourceCaption">Available</f:facet>
<f:facet name="targetCaption">Used</f:facet>
</p:pickList>
<h:outputLabel value="Excluded compartments/pathways: " />
<p:pickList value="#{exportMB.elementExcludedComponent}" var="comp" itemLabel="#{comp}" itemValue="#{comp}" >
<f:facet name="sourceCaption">Available</f:facet>
<f:facet name="targetCaption">Used</f:facet>
</p:pickList>
</h:panelGrid>
<h:commandButton action="#{exportMB.downloadElements}" value="DOWNLOAD" type="submit" styleClass="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" style="font-size:13px; font-weight:900; margin-top:5px; padding:5px 20px; margin-left:205px;"/>
</p:tab>
<p:tab id="networkTab" title="Network export">
<h:panelGrid columns="2" style="margin-bottom:10px;" columnClasses="topAligned" cellpadding="5">
<h:outputLabel value="Nodes: " />
<p:selectManyCheckbox id="networkTypeList" value="#{exportMB.selectedNetworkType}" columns="5"
layout="grid" >
<f:selectItems value="#{exportMB.speciesTypeList}"/>
</p:selectManyCheckbox>
<h:outputLabel value="Annotations: " />
<p:pickList value="#{exportMB.networkAvailableMiriam}" var="miriam" itemLabel="#{miriam.left.commonName} (#{miriam.right})" itemValue="#{miriam}" converter="miriamTypeConverter">
<f:facet name="sourceCaption">Available</f:facet>
<f:facet name="targetCaption">Used</f:facet>
<p:column>
<h:outputText value="#{miriam.left.commonName} (#{miriam.right})" style="background-color: #{miriam.right>0?'#00FF00':'#FFFFFF'}"/>
</p:column>
</p:pickList>
<h:outputLabel value="Included compartments/pathways: " />
<p:pickList value="#{exportMB.networkIncludedComponent}" var="comp" itemLabel="#{comp}" itemValue="#{comp}" >
<f:facet name="sourceCaption">Available</f:facet>
<f:facet name="targetCaption">Used</f:facet>
</p:pickList>
<h:outputLabel value="Excluded compartments/pathways: " />
<p:pickList value="#{exportMB.networkExcludedComponent}" var="comp" itemLabel="#{comp}" itemValue="#{comp}" >
<f:facet name="sourceCaption">Available</f:facet>
<f:facet name="targetCaption">Used</f:facet>
</p:pickList>
<h:outputLabel value="File type: " />
<p:selectOneRadio id="networkFileType" value="#{exportMB.selectedNetworkFileType}" columns="5"
layout="grid" >
<f:selectItems value="#{exportMB.networkFileTypeList}"/>
</p:selectOneRadio>
</h:panelGrid>
<h:commandButton action="#{exportMB.downloadNetwork}" value="DOWNLOAD" type="submit" styleClass="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" style="font-size:13px; font-weight:900; margin-top:5px; padding:5px 20px; margin-left:205px;"/>
</p:tab>
<p:tab id="graphicsTab" title="Graphics">
<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
<p:selectOneRadio id="svgSelectedModel" value="#{exportMB.selectedModelString}" columns="1"
layout="grid" >
<f:selectItems value="#{exportMB.models}"/>
</p:selectOneRadio>
<h:commandButton action="#{exportMB.downloadSvg}" value="DOWNLOAD SVG" type="submit" styleClass="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" style="font-size:13px; font-weight:900; margin-top:5px; padding:5px 20px;" />
</p:tab>
</p:tabView>
</h:form>
<h:body onload="initMap();" >
<h:outputStylesheet library="css" name="style.css"/>
<h:outputStylesheet library="css" name="minerva.css" />
<h:outputStylesheet library="css" name="pileup.css"/>
<h:outputStylesheet library="css" name="bootstrap.min.css"/>
<h:outputScript library="primefaces" name="jquery/jquery.js" target="head" />
<div id="minervaAppDiv" style="height: 100%;width: 100%;margin: 0;"/>
</h:body>
</f:view>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment