update HtmlSvgOutput to ignore browser invocation when running in headless mode
[jalview.git] / examples-jbake / templates / jvl_linkedapplets_ng.ftl
1 <script src="javascript/deployJava.js"></script>
2 <script src="javascript/jshashtable-2.1.js" language="javascript"></script>
3 <script src="javascript/jalview.js" language="javascript"></script>
4 <script>  //deployJava.debug="true";
5   
6   function lJvApp() {
7     var jvapp = document.getElementById("jvapp");
8     var jvfollower = document.getElementById("jvfollower");
9     setConsole(document.getElementById("stdout"));
10     //jvapp.setSeparator(""+jvapp.getSeparator());
11     linkJvJmol(jvapp);
12   };
13
14   function lJvFollow() {
15     var jvapp = document.getElementById("jvapp");
16     var jvfollower = document.getElementById("jvfollower");
17     //jvfollower.setSeparator(""+jvfollower.getSeparator());
18     linkJvJmol(jvfollower);
19   };
20 </script>
21     <h2>JalviewLite Linked Applets Demo</h2>
22     <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.
23     </p>
24         <script> 
25   var attributes = {
26     code : 'jalview.bin.JalviewLite',
27     archive : '${content.jvl}',
28     width : 800,
29     height : 300,
30     mayscript : 'True', scriptable: 'True',
31     id : 'jvapp'
32   };
33   var parameters = {
34     oninit : "lJvApp",
35     automaticScrolling : "true",
36     file : "plantfdx.fa",
37     annotations : "plantfdx.annotations",
38     debug : "true",
39     wrap : "false",
40     // separator : "^",
41     showAnnotation : "true",
42     embedded : "true",
43     showFullId : "false",
44     RGB : "F2F2FF",
45     linkLabel_1 : "EMBL-EBI Search",
46     linkUrl_1 : "http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"
47     ,
48     linkLabel_2 : "Uniprot"
49     ,
50     linkUrl_2 : "http://www.uniprot.org/uniprot/$SEQUENCE_ID$",
51     permissions : 'sandbox',
52     APPLICATION_URL : "http://www.jalview.org/services/launchApp"
53   };
54  
55   deployJava.runApplet(attributes, parameters, '1.6');
56 </script>
57 <script> 
58   var attributes = {
59     code : 'jalview.bin.JalviewLite',
60     archive : '${content.jvl}',
61     width : 800,
62     height : 300,
63     mayscript : 'True', scriptable: 'True',
64     id : "jvfollower"
65   };
66   var parameters = {
67     oninit : "lJvFollow",
68     file : "plantfdx.fa",
69     annotations : "plantfdx.annotations",
70     automaticScrolling : "true",
71     debug : "true",
72     wrap : "false",
73     // separator : "^",
74     showAnnotation : "true",
75     embedded : "true",
76     showFullId : "false",
77     RGB : "F2F2FF",
78     linkLabel_1 : "EMBL-EBI Search",
79     linkUrl_1 : "http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"
80     ,
81     linkLabel_2 : "Uniprot"
82     ,
83     linkUrl_2 : "http://www.uniprot.org/uniprot/$SEQUENCE_ID$",
84     permissions : 'sandbox',
85    APPLICATION_URL : "http://www.jalview.org/services/launchApp"
86   };
87   deployJava.runApplet(attributes, parameters, '1.6');
88 </script>
89     <p>
90 <!--      <a href="javascript:linkJvJmol()">Click Me If you don't see any messages below</a>
91       <br>
92        -->
93 <form name="console" id="console">
94 <textarea name="output"
95         id="stdout" rows="20" cols="80">Messages  will appear here.</textarea></form>
96       <br>
97 </p>