%@ taglib uri="tags-lams" prefix="lams" %> <%@ taglib uri="tags-core" prefix="c" %> <%@ page import="org.lamsfoundation.lams.util.Configuration" import="org.lamsfoundation.lams.util.ConfigurationKeys" %> <%@ page import="org.lamsfoundation.lams.themes.dto.CSSThemeBriefDTO" %>
<% String protocol = request.getProtocol(); if(protocol.startsWith("HTTPS")){ protocol = "https://"; }else{ protocol = "http://"; } String pathToRoot = protocol+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/"; String pathToShare = protocol+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/../.."; String authoringClientVersion = Configuration.get(ConfigurationKeys.AUTHORING_CLIENT_VERSION); String serverLanguage = Configuration.get(ConfigurationKeys.SERVER_LANGUAGE); String languageDate = Configuration.getDictionaryDateForLanguage(serverLanguage); %> \n'); } function doAlert(arg){ alert(arg); } function doConfirm(arg){ var answer = confirm (arg) if (answer) alert ("Oh yeah?") else alert ("Why not?") } function openPopUp(args, title, h, w, resize, status, scrollbar, menubar){ if(thePopUp && thePopUp.open && !thePopUp.closed){ thePopUp.focus(); }else{ //mozilla seems to want a full url //var args = getHostURL()+args; alert('Opening Preview url') thePopUp = window.open(args,title,"HEIGHT="+h+",WIDTH="+w+",resizable="+resize+",scrollbars="+scrollbar+",status="+status+",menubar="+menubar+""); //thePopUp = window.open(args,"learnerPop","HEIGHT=450,WIDTH=550,resizable,scrollbars"); } } function closeWindow(win){ if(win == 'previewWin'){ previewWin.close(); } } function openPreview(args, title){ var thePopup = null; //alert('Opening Preview url') thePopup = window.open(args,title,"height=600, width=800, resizable, scrollbar=yes, menubar=no, status=yes, toolbar=no"); } var learnWin = null; /*function openPreview(sessionId) { //debug: To check we are gettin a session Id to open var welcomeLearnerOpen = false; previewSessionId = sessionId; var url = getHostURL() + '/lams/home.do?method=learner&sessionId='+sessionId; //var url = 'home.do?method=learner&sessionId='+sessionId; //alert('Opening Preview, url='+url); learnWin = window.open(url,'lWindow','width=796,height=570,resizable,status=yes'); learnWin.focus(); }*/ function openFilePopUp(args){ //mozilla seems to want a full url //alert('args:'+args); args = location.protocol+'//'+location.host+args; //alert('openFilePopUp url:'+args); var POP_UP_WIDTH = 372; var POP_UP_HEIGHT = 125; var size = getWindowSize(); theFilePopUp = window.open(args,"filePop","HEIGHT="+POP_UP_HEIGHT+",WIDTH="+POP_UP_WIDTH+""); var xPos =((size.w - POP_UP_WIDTH) / 2) + theFilePopUp.opener.screenLeft; var yPos =((size.h - POP_UP_HEIGHT) / 2) + theFilePopUp.opener.screenTop; //alert("xPos:"+xPos+"yPos:"+yPos); theFilePopUp.moveTo(xPos, yPos); } function closeUI(){ window.close(); } function getHostURL(){ // http: uklams.net:8080 var p = location.protocol+'//'+location.host; //alert('pathname:'+location.pathname); //debug: //alert('getPathToRoot:'+p); return p; } function setSaved(args){ //convert the strings returned from flash to proper boolean values if(args=="true"){ saved = true; }else{ saved = false; } } function myOnBeforeUnload(){ if(!saved && !mac){ window.event.returnValue = "Your design is not saved, any changes you have made since you last saved will be lost."; } } function endPreviewSession(){ if(previewSessionId != null){ //debug: alert('Opening URL:'+"staff/staff.do?method=removeSession&sid="+previewSessionId+"&session=preview"); document.location = "staff/staff.do?method=removeSession&sid="+previewSessionId+"&session=preview"; } } window.onbeforeunload = myOnBeforeUnload; /* function checkSaved(){ if(saved){ alert("closing"); return true; }else{ var answer = confirm ("Your design is not saved, any changes you have made since you last saved will be lost.\nare you sure you want to close?") if (answer) //alert ("Oh yeah?") return true; else return false; } } */ //-->