Merge branch 'JAL-957_jbake' into Release_2_8_Branch
[jalview.git] / examples-jbake / templates / jvl_linkedapplets_ng.ftl
diff --git a/examples-jbake/templates/jvl_linkedapplets_ng.ftl b/examples-jbake/templates/jvl_linkedapplets_ng.ftl
new file mode 100644 (file)
index 0000000..3bb3749
--- /dev/null
@@ -0,0 +1,96 @@
+<script src="http://www.java.com/js/deployJava.js"></script>
+<script src="javascript/jalview.js" language="javascript"></script>
+<script>  //deployJava.debug="true";
+  
+  function lJvApp() {
+    var jvapp = document.getElementById("jvapp");
+    var jvfollower = document.getElementById("jvfollower");
+    setConsole(document.getElementById("stdout"));
+    //jvapp.setSeparator(""+jvapp.getSeparator());
+    linkJvJmol(jvapp);
+  };
+
+  function lJvFollow() {
+    var jvapp = document.getElementById("jvapp");
+    var jvfollower = document.getElementById("jvfollower");
+    //jvfollower.setSeparator(""+jvfollower.getSeparator());
+    linkJvJmol(jvfollower);
+  };
+</script>
+    <h2>JalviewLite Linked Applets Demo</h2>
+    <p>The two applets below use <a href="jalviewLiteJs.html">JalviewLite's javascript API</a> to exchange events about the currently selected region and mouse position in the alignment.
+    </p>
+       <script> 
+  var attributes = {
+    code : 'jalview.bin.JalviewLite',
+    archive : '${content.jvl}',
+    width : 800,
+    height : 300,
+    mayscript : 'True', scriptable: 'True',
+    id : 'jvapp'
+  };
+  var parameters = {
+    oninit : "lJvApp",
+    automaticScrolling : "true",
+    file : "plantfdx.fa",
+    annotations : "plantfdx.annotations",
+    debug : "true",
+    wrap : "false",
+    // separator : "^",
+    showAnnotation : "true",
+    embedded : "true",
+    showFullId : "false",
+    RGB : "F2F2FF",
+    linkLabel_1 : "EMBL-EBI Search",
+    linkUrl_1 : "http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"
+    ,
+    linkLabel_2 : "Uniprot"
+    ,
+    linkUrl_2 : "http://www.uniprot.org/uniprot/$SEQUENCE_ID$",
+    permissions : 'sandbox',
+    APPLICATION_URL : "http://www.jalview.org/services/launchApp"
+  };
+  deployJava.runApplet(attributes, parameters, '1.6');
+</script>
+<script> 
+  var attributes = {
+    code : 'jalview.bin.JalviewLite',
+    archive : '${content.jvl}',
+    width : 800,
+    height : 300,
+    mayscript : 'True', scriptable: 'True',
+    id : "jvfollower"
+  };
+  var parameters = {
+    oninit : "lJvFollow",
+    file : "plantfdx.fa",
+    annotations : "plantfdx.annotations",
+    automaticScrolling : "true",
+    debug : "true",
+    wrap : "false",
+    // separator : "^",
+    showAnnotation : "true",
+    embedded : "true",
+    showFullId : "false",
+    RGB : "F2F2FF",
+    linkLabel_1 : "EMBL-EBI Search",
+    linkUrl_1 : "http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"
+    ,
+    linkLabel_2 : "Uniprot"
+    ,
+    linkUrl_2 : "http://www.uniprot.org/uniprot/$SEQUENCE_ID$",
+    permissions : 'sandbox',
+   APPLICATION_URL : "http://www.jalview.org/services/launchApp"
+  };
+  deployJava.runApplet(attributes, parameters, '1.6');
+</script>
+    <p>
+<!--      <a href="javascript:linkJvJmol()">Click Me If you don't see any messages below</a>
+      <br>
+       -->
+<form name="console" id="console">
+<textarea name="output"
+        id="stdout" rows="20" cols="80">Messages  will appear here.</textarea></form>
+      <br>
+</p>