Changeset 4774
- Timestamp:
- 03/19/14 13:43:38 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/loginDialog.xul
r4751 r4774 3 3 <!DOCTYPE overlay SYSTEM "chrome://markingcollection/locale/markingcollection.dtd"> 4 4 <dialog 5 id="tagoutputDialog" 6 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 7 xmlns:html="http://www.w3.org/1999/xhtml" 8 title="Login"> 9 10 11 <iframe height="500" width="650" type="content" src="https://lux17.mpi.nl/ds/webannotator/api/authentication/login" flex="2" id="browserTable" name="table_frame"/> 5 id="tagoutputDialog" 6 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 7 xmlns:html="http://www.w3.org/1999/xhtml" 8 title="Login" 9 onload="loginLoad()"> 10 <script type="application/x-javascript"> 11 <![CDATA[ 12 function loginLoad() { 13 //navigate to login page from the params 14 document.getElementById("loginIframe").setAttribute("src", window.arguments[0].backend+"/api/authentication/login"); 15 } 16 17 window.addEventListener("load",Listen,false); 18 19 function Listen(){ 20 var frame = document.getElementById("loginIframe"); 21 frame.addEventListener("DOMContentLoaded", DomLoadedEventHandler, true); 22 } 23 24 function DomLoadedEventHandler() { 25 var frame = document.getElementById("loginIframe"); 26 alert("Current url: "+frame.contentDocument.location.href); 27 alert("target url: "+window.arguments[0].backend+'/api'); 28 if(frame.contentDocument.location.href == window.arguments[0].backend+'/api'){ 29 alert("login done"); 30 } 31 } 32 ]]> 33 </script> 34 <iframe id="loginIframe" height="500" width="650" type="content" src="" flex="2" /> 12 35 </dialog>
Note: See TracChangeset
for help on using the changeset viewer.