X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=examples%2Fjavascript%2Fjvcontroller.js;h=73f6670e4183b20b4e15d7de94d96d1ffa7e2b8a;hb=d9a5e7ac4957e98089c082e629d6e79dd5d30199;hp=a604fcee40375f5bfb745ef8e3846016e2131ec1;hpb=0fac2de2be3358820e141165c5b6b020fe965193;p=jalview.git diff --git a/examples/javascript/jvcontroller.js b/examples/javascript/jvcontroller.js index a604fce..73f6670 100644 --- a/examples/javascript/jvcontroller.js +++ b/examples/javascript/jvcontroller.js @@ -18,15 +18,8 @@ */ - //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'); @@ -77,45 +70,43 @@ 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'); + + var e = document.getElementById("view_decorated"); + e.style.display = 'none'; + } }); - $(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); - $("