JAL-857 converted jalview applet launch scripts to applet tags to prevent whole page...
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Tue, 28 Jul 2015 15:54:24 +0000 (16:54 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Tue, 28 Jul 2015 15:54:24 +0000 (16:54 +0100)
examples/embeddedWJmol.html
examples/javascript/jalview.js
examples/javascript/jvcontroller.js
examples/linkedapplets_ng.html

index ca5b464..9b7389d 100644 (file)
-<!-- boiler plate link to alternate demopage -->
-<head>
-<script>
-    <!--//--><![CDATA[//><!--
-var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-9060947-1"]);_gaq.push(["_trackPageview"]);(function() {var ga = document.createElement("script");ga.type = "text/javascript";ga.async = true;ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga, s);})();
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML+RDFa 1.1//EN">
+<html lang="en" dir="ltr" version="HTML+RDFa 1.1"
+       xmlns:content="http://purl.org/rss/1.0/modules/content/"
+       xmlns:dc="http://purl.org/dc/terms/"
+       xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:og="http://ogp.me/ns#"
+       xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+       xmlns:sioc="http://rdfs.org/sioc/ns#"
+       xmlns:sioct="http://rdfs.org/sioc/types#"
+       xmlns:skos="http://www.w3.org/2004/02/skos/core#"
+       xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
+<head profile="http://www.w3.org/1999/xhtml/vocab">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="shortcut icon"
+       href="http://www.jalview.org/sites/all/themes/jalview/favicon.ico"
+       type="image/vnd.microsoft.icon" />
+<meta name="viewport"
+       content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
+<meta content="" about="/About" property="dc:title" />
+<link rel="shortlink" href="/node/18" />
+<meta name="Generator" content="Drupal 7 (http://drupal.org)" />
+<link rel="canonical" href="/About" />
+<title>Development | jalview.org</title>
+<link type="text/css" rel="stylesheet"
+       href="http://www.jalview.org/sites/jalview.aegir-prod-6.lifesci.dundee.ac.uk/files/css/css_pbm0lsQQJ7A7WCCIMgxLho6mI_kBNgznNUWmTWcnfoE.css"
+       media="all" />
+<link type="text/css" rel="stylesheet"
+       href="http://www.jalview.org/sites/jalview.aegir-prod-6.lifesci.dundee.ac.uk/files/css/css_gUtVu-PFpNy2iKRzspQnPE665qK-eDx99tAc6O2EKBs.css"
+       media="all" />
+<link type="text/css" rel="stylesheet"
+       href="http://www.jalview.org/sites/jalview.aegir-prod-6.lifesci.dundee.ac.uk/files/css/css_HByEx9XzXH_VOfr3lfyJmXRKhQdq8UyyslSu9odJFaw.css"
+       media="all" />
+<link type="text/css" rel="stylesheet"
+       href="http://www.jalview.org/sites/jalview.aegir-prod-6.lifesci.dundee.ac.uk/files/css/css_Rj_Ai4KdTE0qt75bSUOfQPNak90tBSJRVjZIjglGhlM.css"
+       media="all" />
+
+<!--[if lte IE 6]>
+<link type="text/css" rel="stylesheet" href="http://www.jalview.org/sites/all/themes/jalview/css/ie6.css?nqc8th" media="all" />
+<![endif]-->
+
+<!--[if lte IE 7]>
+<link type="text/css" rel="stylesheet" href="http://www.jalview.org/sites/all/themes/jalview/css/ie7.css?nqc8th" media="all" />
+<![endif]-->
+
+<!--[if lte IE 8]>
+<link type="text/css" rel="stylesheet" href="http://www.jalview.org/sites/all/themes/jalview/css/ie8.css?nqc8th" media="all" />
+<![endif]-->
+
+<!--[if (lt IE 9)&(!IEMobile)]>
+<link type="text/css" rel="stylesheet" href="http://www.jalview.org/sites/jalview.aegir-prod-6.lifesci.dundee.ac.uk/files/css/css_ybf1eloQwwauLFbDPh5-J2RvDVEM4Gsh1NsAC0ynfNs.css" media="all" />
+<![endif]-->
+
+<!--[if gte IE 9]><!-->
+<link type="text/css" rel="stylesheet"
+       href="http://www.jalview.org/sites/jalview.aegir-prod-6.lifesci.dundee.ac.uk/files/css/css_kD8qBi2CLfQkl16-SgdHuwlYq_NUjXsjCxmpeidlT0I.css"
+       media="all" />
+<!--<![endif]-->
+<script type="text/javascript">
+<!--//--><![CDATA[//><!--
+       document.cookie = 'adaptive_image=' + Math.max(screen.width, screen.height)
+                       + '; path=/';
+       //--><!]]>
+</script>
+<script type="text/javascript"
+       src="http://www.jalview.org/sites/jalview.aegir-prod-6.lifesci.dundee.ac.uk/files/js/js_0gj6QcpfRH2jzTbCQqf7kEkm4MXY0UA_sRhwPc8jC1o.js"></script>
+<script type="text/javascript"
+       src="http://www.jalview.org/sites/all/modules/lightbox2/js/lightbox.js?1434966756"></script>
+<script type="text/javascript"
+       src="http://www.jalview.org/sites/jalview.aegir-prod-6.lifesci.dundee.ac.uk/files/js/js_SoFDHsgxDY2cLYbZ6HeW4SLlU_sLxsgGT6tSFwfsHGY.js"></script>
+<script type="text/javascript"
+       src="http://www.jalview.org/sites/all/modules/mobile_navigation/js/mobile_menu.js?nqc8th"></script>
+<script type="text/javascript"
+       src="http://www.jalview.org/sites/all/modules/mobile_navigation/mobile_navigation.js?nqc8th"></script>
+<script type="text/javascript"
+       src="http://www.jalview.org/sites/jalview.aegir-prod-6.lifesci.dundee.ac.uk/files/js/js_IDBX5SzkJ9gGNq7x-qOE_2DZsexqguTJQGMKvi4w-Uw.js"></script>
+<script type="text/javascript">
+<!--//--><![CDATA[//><!--
+       var _gaq = _gaq || [];
+       _gaq.push([ "_setAccount", "UA-9060947-1" ]);
+       _gaq.push([ "_trackPageview" ]);
+       (function() {
+               var ga = document.createElement("script");
+               ga.type = "text/javascript";
+               ga.async = true;
+               ga.src = ("https:" == document.location.protocol ? "https://ssl"
+                               : "http://www")
+                               + ".google-analytics.com/ga.js";
+               var s = document.getElementsByTagName("script")[0];
+               s.parentNode.insertBefore(ga, s);
+       })();
+       //--><!]]>
+</script>
+<script type="text/javascript"
+       src="http://www.jalview.org/sites/jalview.aegir-prod-6.lifesci.dundee.ac.uk/files/js/js_tnUY-Xr0uSK3E1mkrZ6ON7OmxH4PiVjShebnFJ8E-9c.js"></script>
+<script type="text/javascript"
+       src="http://www.jalview.org/sites/jalview.aegir-prod-6.lifesci.dundee.ac.uk/files/js/js_43n5FBy8pZxQHxPXkf-sQF7ZiacVZke14b0VlvSA554.js"></script>
+
+<script type="text/javascript">
+<!--//--><![CDATA[//><!--
+jQuery.extend(Drupal.settings, {"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"jalview","theme_token":"wip-WGy4TPV1wdu4Sdq6IXFdriaYrLsrzHuYbaCEpD8","js":{"0":1,"sites\/all\/modules\/jquery_update\/replace\/jquery\/1.7\/jquery.min.js":1,"misc\/jquery.once.js":1,"misc\/drupal.js":1,"sites\/all\/modules\/lightbox2\/js\/lightbox.js":1,"sites\/all\/modules\/nice_menus\/superfish\/js\/superfish.js":1,"sites\/all\/modules\/nice_menus\/superfish\/js\/jquery.bgiframe.min.js":1,"sites\/all\/modules\/nice_menus\/superfish\/js\/jquery.hoverIntent.minified.js":1,"sites\/all\/modules\/nice_menus\/nice_menus.js":1,"sites\/all\/modules\/mobile_navigation\/js\/mobile_menu.js":1,"sites\/all\/modules\/mobile_navigation\/mobile_navigation.js":1,"sites\/all\/modules\/google_analytics\/googleanalytics.js":1,"1":1,"sites\/all\/themes\/jalview\/js\/jalview_ga_event_tracking.js":1,"sites\/all\/themes\/omega\/omega\/js\/jquery.formalize.js":1,"sites\/all\/themes\/omega\/omega\/js\/omega-mediaqueries.js":1},"css":{"modules\/system\/system.base.css":1,"modules\/system\/system.menus.css":1,"modules\/system\/system.messages.css":1,"modules\/system\/system.theme.css":1,"sites\/all\/modules\/adaptive_image\/css\/adaptive-image.css":1,"sites\/all\/modules\/date\/date_api\/date.css":1,"sites\/all\/modules\/date\/date_popup\/themes\/datepicker.1.7.css":1,"modules\/field\/theme\/field.css":1,"modules\/node\/node.css":1,"modules\/poll\/poll.css":1,"modules\/search\/search.css":1,"modules\/user\/user.css":1,"sites\/all\/modules\/views\/css\/views.css":1,"sites\/all\/modules\/ctools\/css\/ctools.css":1,"sites\/all\/modules\/lightbox2\/css\/lightbox.css":1,"sites\/all\/modules\/nice_menus\/nice_menus.css":1,"sites\/all\/modules\/nice_menus\/nice_menus_default.css":1,"sites\/all\/modules\/mobile_navigation\/mobile_navigation.css":1,"sites\/all\/themes\/omega\/alpha\/css\/alpha-reset.css":1,"sites\/all\/themes\/omega\/alpha\/css\/alpha-mobile.css":1,"sites\/all\/themes\/omega\/alpha\/css\/alpha-alpha.css":1,"sites\/all\/themes\/omega\/omega\/css\/formalize.css":1,"sites\/all\/themes\/omega\/omega\/css\/omega-text.css":1,"sites\/all\/themes\/omega\/omega\/css\/omega-branding.css":1,"sites\/all\/themes\/omega\/omega\/css\/omega-menu.css":1,"sites\/all\/themes\/omega\/omega\/css\/omega-forms.css":1,"sites\/all\/themes\/omega\/omega\/css\/omega-visuals.css":1,"sites\/all\/themes\/jalview\/css\/mobile.css":1,"sites\/all\/themes\/jalview\/css\/global.css":1,"sites\/all\/themes\/jalview\/css\/ie6.css":1,"sites\/all\/themes\/jalview\/css\/ie7.css":1,"sites\/all\/themes\/jalview\/css\/ie8.css":1,"ie::normal::sites\/all\/themes\/jalview\/css\/jalview-alpha-default.css":1,"ie::normal::sites\/all\/themes\/jalview\/css\/jalview-alpha-default-normal.css":1,"ie::normal::sites\/all\/themes\/omega\/alpha\/css\/grid\/alpha_default\/normal\/alpha-default-normal-12.css":1,"narrow::sites\/all\/themes\/jalview\/css\/jalview-alpha-default.css":1,"narrow::sites\/all\/themes\/jalview\/css\/jalview-alpha-default-narrow.css":1,"sites\/all\/themes\/omega\/alpha\/css\/grid\/alpha_default\/narrow\/alpha-default-narrow-12.css":1,"normal::sites\/all\/themes\/jalview\/css\/jalview-alpha-default.css":1,"normal::sites\/all\/themes\/jalview\/css\/jalview-alpha-default-normal.css":1,"sites\/all\/themes\/omega\/alpha\/css\/grid\/alpha_default\/normal\/alpha-default-normal-12.css":1,"wide::sites\/all\/themes\/jalview\/css\/jalview-alpha-default.css":1,"wide::sites\/all\/themes\/jalview\/css\/jalview-alpha-default-wide.css":1,"sites\/all\/themes\/omega\/alpha\/css\/grid\/alpha_default\/wide\/alpha-default-wide-12.css":1}},"lightbox2":{"rtl":0,"file_path":"\/(\\w\\w\/)public:\/","default_image":"\/sites\/all\/modules\/lightbox2\/images\/brokenimage.jpg","border_size":10,"font_color":"000","box_color":"fff","top_position":"","overlay_opacity":"0.8","overlay_color":"000","disable_close_click":1,"resize_sequence":0,"resize_speed":100,"fade_in_speed":100,"slide_down_speed":100,"use_alt_layout":0,"disable_resize":0,"disable_zoom":0,"force_show_nav":0,"show_caption":1,"loop_items":0,"node_link_text":"View Image Details","node_link_target":0,"image_count":"Image !current of !total","video_count":"Video !current of !total","page_count":"Page !current of !total","lite_press_x_close":"press \u003Ca href=\u0022#\u0022 onclick=\u0022hideLightbox(); return FALSE;\u0022\u003E\u003Ckbd\u003Ex\u003C\/kbd\u003E\u003C\/a\u003E to close","download_link_text":"","enable_login":false,"enable_contact":false,"keys_close":"c x 27","keys_previous":"p 37","keys_next":"n 39","keys_zoom":"z","keys_play_pause":"32","display_image_size":"original","image_node_sizes":"()","trigger_lightbox_classes":"","trigger_lightbox_group_classes":"","trigger_slideshow_classes":"","trigger_lightframe_classes":"","trigger_lightframe_group_classes":"","custom_class_handler":0,"custom_trigger_classes":"","disable_for_gallery_lists":true,"disable_for_acidfree_gallery_lists":true,"enable_acidfree_videos":true,"slideshow_interval":5000,"slideshow_automatic_start":true,"slideshow_automatic_exit":true,"show_play_pause":true,"pause_on_next_click":false,"pause_on_previous_click":true,"loop_slides":false,"iframe_width":600,"iframe_height":400,"iframe_border":1,"enable_video":0},"nice_menus_options":{"delay":"800","speed":"fast"},"mobile_navigation":{"breakpoint":"all and (min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape)","menuSelector":".primary-nav","menuPlugin":"accordion","showEffect":"expand_down","showItems":"all","tabHandler":1,"menuWidth":"100","specialClasses":0,"mainPageSelector":"#page","useMask":1,"menuLabel":"","expandActive":1},"googleanalytics":{"trackOutbound":1,"trackMailto":1,"trackDownload":1,"trackDownloadExtensions":"7z|aac|arc|arj|asf|asx|avi|bin|csv|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt|qtm?|ra(m|r)?|sea|sit|tar|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xml|z|zip"},"omega":{"layouts":{"primary":"normal","order":["narrow","normal","wide"],"queries":{"narrow":"all and (min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape)","normal":"all and (min-width: 980px) and (min-device-width: 980px), all and (max-device-width: 1024px) and (min-width: 1024px) and (orientation:landscape)","wide":"all and (min-width: 1220px)"}}}});
 //--><!]]>
-  </script>
+</script>
+<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
+
+
 <script src="javascript/deployJava.js"></script>
 <script src="jmol/Jmol.js"></script>
 <script src="javascript/jquery-1.4.4.min.js"></script>
 <script src="javascript/jquery.timer.js"></script>
 <script src="javascript/jquery.blockUI.js"></script>
 <script src="javascript/jshashtable-2.1.js" language="javascript"></script>
-
 <script src="javascript/jalview.js" language="javascript"></script>
+<script src="javascript/jvcontroller.js"> </script>
+
+       
+
+</head>
+
+
+
+<div id="header"></div>
+<section id="section-content" class="section section-content">
+       <div id="zone-content-wrapper"
+               class="zone-wrapper zone-content-wrapper clearfix">
+
+               <div id="zone-content" class="zone zone-content clearfix container-12">
+                       <!— — — — — — — — — — — side bar — — — — — — — — — — —>
+                       <aside class="grid-3 region region-sidebar-first"
+                               id="region-sidebar-first">
+                               <div class="region-inner region-sidebar-first-inner">
+                                       <section
+                                               class="block block-menu-block block-1 block-menu-block-1 odd"
+                                               id="block-menu-block-1">
+                                               <div class="block-inner clearfix">
+                                                       <h2 class="block-title">                                                                
+                                                               <a href="/development" class="development active-trail">Development</a>
+                                                       </h2>
+                                                       <div class="content clearfix">
+                                                               <div class="menu-block-wrapper menu-block-1 menu-name-main-menu parent-mlid-0 menu-level-2">
+                                                                   <div id="nav" class="nav">nav</div>
+                                                               </div>
+                                                       </div>
+                                               </div>
+                                       </section>
+                                       <section
+                                               class="block block-menu-block block-2 block-menu-block-2 even"
+                                               id="block-menu-block-2">
+                                               <div class="block-inner clearfix">
+                                                       <h2 class="block-title">
+                                                               <a href="/About" class="active-trail active">About</a>
+                                                       </h2>
+
+                                                       <div class="content clearfix">
+                                                               <div
+                                                                       class="menu-block-wrapper menu-block-2 menu-name-main-menu parent-mlid-0 menu-level-2">
+                                                                       <div id="nav" class="nav">nav</div>
+                                                               </div>
+                                                       </div>
+                                               </div>
+                                       </section>
+                               </div>
+                       </aside>
+                       <!- — - - - - - - - - - - - - end of sidebar — — — — —>
+
+                       <div class="grid-9 region region-content" id="region-content">
+                               <div class="region-inner region-content-inner">
+                                       <a id="main-content"></a>
+                                       <div
+                                               class="block block-system block-main block-system-main odd block-without-title"
+                                               id="block-system-main">
+                                               <div class="block-inner clearfix">
+                                                       <div class="content clearfix">
+                                                               <article about="/About" typeof="sioc:Item foaf:Document"
+                                                                       class="node node-basic-page node-published node-not-promoted node-not-sticky author-admin odd clearfix"
+                                                                       id="node-basic-page-18">
+                                                                       <div class="content clearfix">
+                                                                               <div
+                                                                                       class="field field-name-body field-type-text-with-summary field-label-hidden">
+                                                                                       <div class="field-items">
+                                                                                               <div class="field-item even" property="content:encoded">
+                                                                                               <div id="content">
+
+
+
+
+
+
+
+<div>
+  
+
 <script language="JavaScript">
-// instead of this, we use a custom JmolApplet spec
-// jmolInitialize('jmol');
 jmolInitialize("","JmolApplet-12.2.4.jar");
 function genHref()
 {
@@ -46,14 +218,14 @@ function genHref()
  var jvstructassoc;
  var modeltofiles = new Array();
 
- function lJvA() {
-  jvfollower = document.getElementById("jvA");
-  setConsole(document.getElementById("stdout"));
+ //function lJvA() {
+  //jvfollower = document.getElementById("jvA");
+  //setConsole(document.getElementById("stdout"));
   
-  sep = jvfollower.getSeparator();
+  //sep = jvfollower.getSeparator();
   //jvapp.setSeparator(""+jvapp.getSeparator());
-  linkJvJmol(jvfollower, "jmolView", modeltofiles);
- };
+//  linkJvJmol(jvfollower, "jmolView", modeltofiles);
+// };
 
  var _jvA=new Object();
  _jvA.attributes = {
@@ -95,8 +267,6 @@ function genHref()
   jmolSetCallback("pickCallback","_jmolpick");
   modeltofiles+="1gaq.txt";
 </script> 
-</head>
-
 <div style="width: 100%">
 <div style="width:35%; align:left; float:right;">
 <div style="margin:8px; padding:10px; border: 2px solid black; align: left;">
@@ -108,12 +278,71 @@ function genHref()
 <!-- content template start -->
 <h2>Structure and Alignment</h2>
 <p>This demo shows how JalviewLite and Jmol can be integrated with the JalviewLite javascript library.</p>
-<center>
+
+
+<div>
  <script>
   jmolApplet("500x500","zap; load FILE '1gaq.txt'; frame 0; select all; wireframe off; spacefill off; cartoons; restrict; center *; set selectionhalos true;select 0","jmolView");
  </script>
- <script>
-  deployJava.runApplet(_jvA.attributes, _jvA.parameters, '1.4');
- </script>
-</center>
-<!-- content template end -->
\ No newline at end of file
+</div>
+<div>
+<applet
+   code="jalview.bin.JalviewLite" width="500" height="350" id="jvA" mayscript="True" scriptable="True" archive="jalviewApplet.jar,JmolApplet-12.2.4.jar">
+<param name="permissions" value="sandbox"/>
+<param name="java_arguments" value="-Xmx256m"/>
+<param name="externalstructureviewer" value="true"/>
+<param name="oninit" value="lJvA"/>
+<param name="automaticScrolling" value="true"/>
+<param name="file" value="uniref50_mz.fa"/>
+<param name="relaxedidmatch" value="true"/>
+<param name="debug" value="true"/>
+<param name="wrap" value="false"/>
+<param name="showAnnotation" value="false"/>
+<param name="embedded" value="true"/>
+<param name="showFullId" value="false"/>
+<param name="RGB" value="F2F2FF"/>
+<param name="linkLabel_1" value="EMBL-EBI Search"/>
+<param name="linkUrl_1" value="http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"/>
+<param name="linkLabel_2" value="Uniprot"/>
+<param name="linkUrl_2" value="http://www.uniprot.org/uniprot/$SEQUENCE_ID$"/>
+<param name="APPLICATION_URL" value="http://www.jalview.org/services/launchApp"/>
+<param name="PDBfile" value="1gaq.txt FER1_MAIZE"/>
+</applet>
+
+</div>
+
+<!-- content template end -->
+
+</div>
+
+
+
+
+
+
+
+
+
+
+</div>
+                                                                                               </div>
+                                                                                       </div>
+                                                                               </div>
+                                                                       </div>
+                                                                       <div class="clearfix">
+                                                                               <nav class="links node-links clearfix"></nav>
+                                                                       </div>
+                                                               </article>
+                                                       </div>
+                                               </div>
+                                       </div>
+                               </div>
+                       </div>
+               </div>
+       </div>
+</section>
+
+<div id="footer"></div>
+
+
index a3ff56b..31698b6 100644 (file)
@@ -346,3 +346,37 @@ function _jmolMessagecallback(jmid, statmess) {
 
        }
 }
+
+
+  function lJvApp() {
+    setTimeout(function() {
+       //alert("in lJvApp");
+       var jvapp = document.getElementById("jvapp");
+       var jvfollower = document.getElementById("jvfollower");
+       //console.log(">>>>>>>> lJvApp" + jvapp);
+       linkJvJmol(jvapp);
+    }, 100);
+    setConsole(document.getElementById("stdout"));
+  };
+
+  function lJvFollow() {
+    setTimeout(function() {
+       //alert("in lJvFollow");
+       var jvapp = document.getElementById("jvapp");
+       var jvfollower = document.getElementById("jvfollower");
+       console.log(">>>>>>> lJvFollow" + jvfollower);
+       linkJvJmol(jvfollower);
+    }, 100);
+  };
+
+  function lJvA() {
+    setTimeout(function() {
+      //alert("lJvA");
+      jvfollower = document.getElementById("jvA");
+      setConsole(document.getElementById("stdout"));  
+      //sep = jvfollower.getSeparator();
+      //jvapp.setSeparator(""+jvapp.getSeparator());
+      linkJvJmol(jvfollower, "jmolView", modeltofiles);
+    }, 100);
+  };
+
index a604fce..885b2fa 100644 (file)
  */
 
  
-    //var currentPage = (readCookie("current_page")) ? readCookie("current_page") : "applets";
+    
     var currentPage = "applets";
-    var signedJars = "jalviewApplet.jar,JmolApplet-12.2.4.jar,java-json.jar,json_simple-1.1.jar";
-    var unsignedJars = "u_jalviewApplet.jar,u_JmolApplet-12.2.4.jar,u_java-json.jar,u_json_simple-1.1.jar";
-    setOrUpdateCookie('jv_applet_mode', 'false', '1');
-    //var isSignedAppletMode = readCookie("jv_applet_mode");
-    //var appletJars = (isSignedAppletMode === 'true') ? signedJars : unsignedJars;
-    //alert(unsigned);
-
 
     function createAppletTag(code, name, archive, width, height, params){
         var app = document.createElement('applet');
        var newPage = url.substring(start + 1, end);
        var page = ((start === -1) ? currentPage : newPage);
        //alert("page:" + page); 
-       $('#header').load("includes/header_jv.html");
-       $('#content').load(page+".html");
-       $('#nav').load("includes/nav_jv.html");
-       $('#footer').load("includes/footer_jv.html"); 
-       $('#'+ currentPage).addClass('active-trail active');       
+       if(page === "embeddedWJmol"){
+         // do nothing embeddedWJmol page already include
+
+            $('#header').load("includes/header_jv.html");
+            //$('#content').load(page + ".html");
+            $('#nav').load("includes/nav_jv.html");
+            $('#footer').load("includes/footer_jv.html"); 
+            $('#'+ currentPage).addClass('active-trail active'); 
+        }else{
+            $('#header').load("includes/header_jv.html");
+            $('#content').load(page + ".html");
+            $('#nav').load("includes/nav_jv.html");
+            $('#footer').load("includes/footer_jv.html"); 
+            $('#'+ currentPage).addClass('active-trail active');  
+       }     
    });
    
-  $(document).ready(function(){
-    //var currentPage = (readCookie("current_page")) ? readCookie("current_page") : "applets.html";
-    //updateLinks(currentPage);
-    var params = [["file","uniref50.fa"],
-                 ["treeFile","ferredoxin.nw"],
-                 ["userDefinedColour","C=yellow; R,K,H=FF5555; D,E=5555F"],
-                 ["sortByTree","True"],
-                 ["showSequenceLogo","true"],
-                 ["showGroupConsensus","true"],
-                 ["showFullId","false"],
-                 ["linkLabel_1","Uniprot"],
-                 ["linkUrl_1","http://www.uniprot.org/uniprot/$SEQUENCE_ID$"],
-                 ["linkLabel_2","EMBL-EBI Search"],
-                 ["linkUrl_2","http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"],
-                 ["APPLICATION_URL","http://www.jalview.org/services/launchApp"]];
-    var app = createAppletTag('jalview.bin.JalviewLite','',appletJars,'140','35', params);
-    console.log('—————————> app ———————>  ' + app);
-    //var appDiv = document.getElementById("applet_div");
-    //var appDiv = document.getElementById("applet_div");
-    //appDiv.appendChild(app);
-    $("<div class='newbox'>I'm new box by appendTo</div>").appendTo('.applet_div');
-    //$(‘.applet_div').append(app);
-  });
 
 function doSubmit(target){
-   //setOrUpdateCookie('current_page', target, '1');
-   //alert('current page : ' + readCookie("current_page"));
    var currentPage = target+'.html';
-   $('#content').load(currentPage);
+   //alert("page:" + target); 
+   if(target == "embeddedWJmol"){
+      //loadJMolPage();
+      window.location.href = 'embeddedWJmol.html#' + target;
+      $('#content').load(currentPage);
+   }else{
+      window.location.href = 'index.html#' + target;
+      $('#content').load(currentPage);
+   }
    updateLinks(target);
 }
 
+
+
 function updateLinks(target) {
     var ul = document.getElementById("menu");
     var items = ul.getElementsByTagName("li");
@@ -139,3 +127,4 @@ function removeClass(ele,cls) {
     ele.className=ele.className.replace(reg,' ');
   }
 }
+
index 5786961..5da9e59 100644 (file)
 </div>
 </div>
 
+
+
+
+
 <!-- content template start -->
-<script src="javascript/deployJava.js"></script>
-<script src="javascript/jshashtable-2.1.js" language="javascript"></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="javascript:doSubmit('jalviewLiteJs')">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 : 'jalviewApplet.jar,JmolApplet-12.2.4.jar',
-    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 : 'jalviewApplet.jar,JmolApplet-12.2.4.jar',
-    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>
+
+
+<applet
+   code="jalview.bin.JalviewLite" width="800" height="300" id="jvapp" mayscript="True" scriptable="True" archive="jalviewApplet.jar,JmolApplet-12.2.4.jar">
+<param name="oninit" value="lJvApp"/>
+<param name="automaticScrolling" value="true"/>
+<param name="file" value="plantfdx.fa"/>
+<param name="annotations" value="plantfdx.annotations"/>
+<param name="debug" value="true"/>
+<param name="wrap" value="false"/>
+<param name="showAnnotation" value="true"/>
+<param name="embedded" value="true"/>
+<param name="showFullId" value="false"/>
+<param name="RGB" value="F2F2FF"/>
+<param name="linkLabel_1" value="EMBL-EBI Search"/>
+<param name="linkUrl_1" value="http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"/>
+<param name="linkLabel_2" value="Uniprot"/>
+<param name="linkUrl_2" value="http://www.uniprot.org/uniprot/$SEQUENCE_ID$"/>
+<param name="permissions" value="sandbox"/>
+<param name="APPLICATION_URL" value="http://www.jalview.org/services/launchApp"/>
+</applet>
+
+
+
+
+<applet
+   code="jalview.bin.JalviewLite" width="800" height="300" id="jvfollower" mayscript="True" scriptable="True" archive="jalviewApplet.jar,JmolApplet-12.2.4.jar">
+<param name="oninit" value="lJvFollow"/>
+<param name="file" value="plantfdx.fa"/>
+<param name="annotations" value="plantfdx.annotations"/>
+<param name="automaticScrolling" value="true"/>
+<param name="debug" value="true"/>
+<param name="wrap" value="false"/>
+<param name="showAnnotation" value="true"/>
+<param name="embedded" value="true"/>
+<param name="showFullId" value="false"/>
+<param name="RGB" value="F2F2FF"/>
+<param name="linkLabel_1" value="EMBL-EBI Search"/>
+<param name="linkUrl_1" value="http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$"/>
+<param name="linkLabel_2" value="Uniprot"/>
+<param name="linkUrl_2" value="http://www.uniprot.org/uniprot/$SEQUENCE_ID$"/>
+<param name="permissions" value="sandbox"/>
+<param name="APPLICATION_URL" value="http://www.jalview.org/services/launchApp"/>
+</applet>
+
+
     <p>
 <!--      <a href="javascript:linkJvJmol()">Click Me If you don't see any messages below</a>
       <br>