[Hw4mdl-svn] SF.net SVN: hw4mdl: [110] trunk/moodle/mod/liveclassroom
Brought to you by:
jhlinder,
trollinger
From: <sh...@us...> - 2006-12-15 11:04:43
|
Revision: 110 http://svn.sourceforge.net/hw4mdl/?rev=110&view=rev Author: shazan Date: 2006-12-15 03:04:39 -0800 (Fri, 15 Dec 2006) Log Message: ----------- Module can be accessed if the "Activities" block is not displayed. php4 and php5 are now supported with the same code Modified Paths: -------------- trunk/moodle/mod/liveclassroom/api.php trunk/moodle/mod/liveclassroom/generateListRooms.php trunk/moodle/mod/liveclassroom/generateSettings.php trunk/moodle/mod/liveclassroom/js/Ajax.js trunk/moodle/mod/liveclassroom/js/constants.js trunk/moodle/mod/liveclassroom/js/hwCommons.js trunk/moodle/mod/liveclassroom/js/manageXml.js trunk/moodle/mod/liveclassroom/js/verifForm.js trunk/moodle/mod/liveclassroom/lib.php trunk/moodle/mod/liveclassroom/mod.html trunk/moodle/mod/liveclassroom/welcome.php Added Paths: ----------- trunk/moodle/mod/liveclassroom/pictures/items/more-link.png Modified: trunk/moodle/mod/liveclassroom/api.php =================================================================== --- trunk/moodle/mod/liveclassroom/api.php 2006-12-14 14:22:06 UTC (rev 109) +++ trunk/moodle/mod/liveclassroom/api.php 2006-12-15 11:04:39 UTC (rev 110) @@ -68,6 +68,7 @@ $LIVECLASSROOM_LOGS = "logs.php"; //file use to the logs + /* * Get the prefix to use for creating rooms and users. * @@ -250,11 +251,11 @@ if ( $respcode != 100 && $respcode != 301) { - add_to_log($COURSE->id, "liveclassroom", "Create User", "$LIVECLASSROOM_LOGS?type=errorCreateUser&time=".time()."&userId=$userId&respcode=$respcode&courseId=".$COURSE->id, "User Creation Failed"); + add_to_log($COURSE->id, "liveclassroom", "Create User", "$LIVECLASSROOM_LOGS?type=errorCreateUser&time=".time()."&userId=$userid&respcode=$respcode&courseId=".$COURSE->id, "User Creation Failed"); // error( "Response: Account ($userId) Creation Failed: $resp_code"); return false; } - add_to_log($COURSE->id, "liveclassroom", "Create User", "$LIVECLASSROOM_LOGS?type=createUser&time=".time()."&userId=$userId&courseId=".$COURSE->id, "User Creation succeeded"); + add_to_log($COURSE->id, "liveclassroom", "Create User", "$LIVECLASSROOM_LOGS?type=createUser&time=".time()."&userId=$userid&courseId=".$COURSE->id, "User Creation succeeded"); return true; } @@ -357,6 +358,8 @@ global $LIVECLASSROOM_LOGS; global $COURSE; + $list_attributes = ''; + unset($attributes['longname']); while (list($key, $val) = each($attributes)) { if(($key!='class_id')&&(isset($val))&&($val!="")){ @@ -1423,9 +1426,12 @@ if ( $respcode != 100) { return false; } +/* + if (version_compare(PHP_VERSION,'5','>=')) { + require_once($CFG->libdir.'/cas/domxml-php4-php5.php'); + } +*/ - - $listElements = $xmldoc->create_element('listElements'); //$orphanedArchivesForStudent = $xmldoc->createElement('orphanedArchivesForStudent'); Modified: trunk/moodle/mod/liveclassroom/generateListRooms.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-14 14:22:06 UTC (rev 109) +++ trunk/moodle/mod/liveclassroom/generateListRooms.php 2006-12-15 11:04:39 UTC (rev 110) @@ -30,7 +30,10 @@ /* $Id$ */ /// This page is to generate the list of rooms and archives - + error_reporting(E_ALL); + + + require_once("../../config.php"); require_once("lib.php"); require_once("api.php"); @@ -38,6 +41,11 @@ // Variables needed global $CFG; + + if (version_compare(PHP_VERSION,'5','>=')) { + require_once($CFG->libdir.'/cas/domxml-php4-php5.php'); + } + if(empty($_POST)){ $params = $_GET; } @@ -127,11 +135,11 @@ $products->append_child($listProducts); // PRODUCTS CONTENT - $productContent = $xmldoc->create_element('productsContent'); +// $productContent = $xmldoc->create_element('productsContent'); - $productContent->append_child(liveclassroom_list_xml_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher)); + $products->append_child(liveclassroom_list_xml_roomsarchiveslist($xmldoc,$userid,$courseid,$isteacher)); - $products->append_child($productContent); +// $products->append_child($productContent); $elementParameters->append_child($products); Modified: trunk/moodle/mod/liveclassroom/generateSettings.php =================================================================== --- trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-14 14:22:06 UTC (rev 109) +++ trunk/moodle/mod/liveclassroom/generateSettings.php 2006-12-15 11:04:39 UTC (rev 110) @@ -38,6 +38,10 @@ // Variables needed global $CFG; + if (version_compare(PHP_VERSION,'5','>=')) { + require_once($CFG->libdir.'/cas/domxml-php4-php5.php'); + } + $courseid = $_GET['enc_course_id']; $signature = $_GET['signature']; $action = $_GET['action']; @@ -135,6 +139,10 @@ $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); + $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("right")); $linepart->append_child($align); @@ -154,6 +162,10 @@ $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); + $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -176,6 +188,10 @@ $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); + $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("right")); $linepart->append_child($align); @@ -188,6 +204,10 @@ $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); + $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -209,6 +229,10 @@ $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); + $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("right")); $linepart->append_child($align); @@ -235,6 +259,10 @@ $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); + $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -271,6 +299,10 @@ $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); + $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -282,6 +314,10 @@ $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); + $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -345,6 +381,10 @@ $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); + $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -371,6 +411,10 @@ $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); + $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -411,6 +455,10 @@ $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); + $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -444,6 +492,10 @@ $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); + $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -479,6 +531,10 @@ $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); + $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -508,6 +564,10 @@ $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); + $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -548,7 +608,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -573,7 +635,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -599,7 +663,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -625,7 +691,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -651,7 +719,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -690,7 +760,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -715,7 +787,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -740,7 +814,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -764,7 +840,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -795,7 +873,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -820,7 +900,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -837,7 +919,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -848,7 +932,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -875,7 +961,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -886,7 +974,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -920,7 +1010,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); @@ -950,7 +1042,9 @@ $style = $xmldoc->create_element('style'); $style->append_child($xmldoc->create_text_node("")); $linepart->append_child($style); - + $colspan = $xmldoc->create_element('colspan'); + $colspan->append_child($xmldoc->create_text_node("0")); + $linepart->append_child($colspan); $align = $xmldoc->create_element('align'); $align->append_child($xmldoc->create_text_node("")); $linepart->append_child($align); Modified: trunk/moodle/mod/liveclassroom/js/Ajax.js =================================================================== --- trunk/moodle/mod/liveclassroom/js/Ajax.js 2006-12-14 14:22:06 UTC (rev 109) +++ trunk/moodle/mod/liveclassroom/js/Ajax.js 2006-12-15 11:04:39 UTC (rev 110) @@ -1,66 +1,61 @@ function getHTTPObject() { - var xmlhttp = false; - - /* Compilation conditionnelle d'IE */ - /*@cc_on - @if (@_jscript_version >= 5) - try - { - xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); - } - catch (e) - { - try - { - xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); - } - catch (E) - { - xmlhttp = false; - } - } - @else - xmlhttp = false; - @end @*/ - - /* on essaie de cr\xE9er l'objet si ce n'est pas d\xE9j\xE0 fait */ - if (!xmlhttp && typeof XMLHttpRequest != 'undefined') - { - try - { - xmlhttp = new XMLHttpRequest(); - } - catch (e) - { - xmlhttp = false; - } - } - - if (xmlhttp) - { - /* on d\xE9finit ce qui doit se passer quand la page r\xE9pondra */ - xmlhttp.onreadystatechange=function() - { - - if (xmlhttp.readyState == 4) /* 4 : \xE9tat "complete" */ - { - - /*alert(xmlhttp.responseText); - Traitement de la r\xE9ponse. - Ici on affiche la r\xE9ponse dans une bo\xEEte de dialogue. - */ - studentView=false; - objDom=new XMLDoc(xmlhttp.responseText, null); - manageXml(""); - - } - } - } - return xmlhttp; + var xmlhttp = false; + /* Compilation conditionnelle d'IE */ + /*@cc_on + @if (@_jscript_version >= 5) + try + { + xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + } + catch (e) + { + try + { + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } + catch (E) + { + xmlhttp = false; + } + } + @else + xmlhttp = false; + @end @*/ + /* on essaie de créer l'objet si ce n'est pas déj\xC3 fait */ + if (!xmlhttp && typeof XMLHttpRequest != 'undefined') + { + try + { + xmlhttp = new XMLHttpRequest(); + } + catch (e) + { + xmlhttp = false; + } + } + if (xmlhttp) + { + /* on définit ce qui doit se passer quand la page répondra */ + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4) + /* 4 : état "complete" */ + { + /*alert(xmlhttp.responseText); + Traitement de la réponse. + Ici on affiche la réponse dans une boîte de dialogue. + */ + + studentView = false; + objDom = new XMLDoc(xmlhttp.responseText, null); + manageXml(""); + } + } + } + return xmlhttp; } - function gestionDisplay(isfilter) { @@ -109,42 +104,42 @@ if(numberVoiceBoard>5 && isfilter==false) { - document.getElementById("div3").style.height=5*19+"px"; - document.getElementById("div3More").style.display="block"; - document.getElementById("div3More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div3\",\""+numberVoiceBoard+"\")'>"+(numberVoiceBoard-5)+" more...</label>"; + // document.getElementById("div3").style.height=5*19+"px"; + // document.getElementById("div3More").style.display="block"; + // document.getElementById("div3More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div3\",\""+numberVoiceBoard+"\")'>"+(numberVoiceBoard-5)+" more...</label>"; }else if(numberVoiceBoard==0){ - document.getElementById("div3").style.display="none"; - document.getElementById("div3Title").style.display="none"; - document.getElementById("div3More").style.display="none"; + // document.getElementById("div3").style.display="none"; + // document.getElementById("div3Title").style.display="none"; + // document.getElementById("div3More").style.display="none"; }else{ - document.getElementById("div3").style.height=numberVoiceBoard*19+"px"; - document.getElementById("div3More").style.display="none"; + // document.getElementById("div3").style.height=numberVoiceBoard*19+"px"; + // document.getElementById("div3More").style.display="none"; } if(numberVoicePresentation>5 && isfilter==false) { - document.getElementById("div4").style.height=5*19+"px"; - document.getElementById("div4More").style.display="block"; - document.getElementById("div4More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div4\",\""+numberVoicePresentation+"\")'>"+(numberVoicePresentation-5)+" more...</label>"; + // document.getElementById("div4").style.height=5*19+"px"; + // document.getElementById("div4More").style.display="block"; + // document.getElementById("div4More").innerHTML="<label class='moreRoom' onclick='displayAllDiv(\"div4\",\""+numberVoicePresentation+"\")'>"+(numberVoicePresentation-5)+" more...</label>"; }else if(numberVoicePresentation==0 && isfilter==false){ - document.getElementById("div4").style.display="none"; - document.getElementById("div4Title").style.display="none"; - document.getElementById("div4More").style.display="none"; + // document.getElementById("div4").style.display="none"; + // document.getElementById("div4Title").style.display="none"; + // document.getElementById("div4More").style.display="none"; } else{ - document.getElementById("div4").style.height=numberVoicePresentation*19+"px"; - document.getElementById("div4More").style.display="none"; + // document.getElementById("div4").style.height=numberVoicePresentation*19+"px"; + // document.getElementById("div4More").style.display="none"; } @@ -205,21 +200,16 @@ return params; } - function DisplayFirstPage(){ /* Cr\xE9ation de l'objet : */ -/* -var m= -if(t!=null) m=t; -else m=getURLParameters(); -*/ + /* Pr\xE9paration d'une requ\xEAte asynchrone de type GET : */ xmlhttp.open("POST", 'generateListRooms.php',true); /* Effectue la requ\xEAte : */ xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); - xmlhttp.onreadystatechange=Management; +xmlhttp.onreadystatechange=Management; xmlhttp.send(getURLParameters()) @@ -265,8 +255,9 @@ if (xmlhttp.readyState == 4) /* 4 : \xE9tat "complete" */ { + hidePopup() - + objDom=new XMLDoc(xmlhttp.responseText, null); objDomTree = objDom.docNode; Modified: trunk/moodle/mod/liveclassroom/js/constants.js =================================================================== --- trunk/moodle/mod/liveclassroom/js/constants.js 2006-12-14 14:22:06 UTC (rev 109) +++ trunk/moodle/mod/liveclassroom/js/constants.js 2006-12-15 11:04:39 UTC (rev 110) @@ -6,8 +6,12 @@ var numberOfProduct=4; var currentId=""; var currentProduct=""; +var currentTool="all"; var typeSelect="mainLecture" +var longname=""; +var description=""; + var currentDiv=0; var numberMainLectureRoom=0; var numberBreakoutRoom=0; Modified: trunk/moodle/mod/liveclassroom/js/hwCommons.js =================================================================== --- trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-14 14:22:06 UTC (rev 109) +++ trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-15 11:04:39 UTC (rev 110) @@ -27,8 +27,11 @@ { document.forms[0].student_simulcast.disabled = (mediatype=="video" || mediatype=="none") document.forms[0].two_way_enabled.disabled = (mediatype=="video" || mediatype=="none") - if (mediatype=="video"){document.getElementById('roomId_row').style.display="block"}else{ - document.getElementById('roomId_row').style.display="none"} + if (mediatype=="video"){ + document.getElementById('roomId_row').className="visibleAndShift" + }else{ + document.getElementById('roomId_row').className="hideAndShift" + } } function doChangeLink() { @@ -43,9 +46,15 @@ function toggleType(type) { + + longname=document.getElementById('longname').value; + description=document.getElementById('description').value; typeSelect=type; + manageXml('','all'); - + longname=""; + description=""; + @@ -102,7 +111,7 @@ document.getElementById(id).style.display="block"; document.getElementById(id+"More").style.display="block"; if(pictureId!="") - document.images[pictureId].src="pictures/items/category-expanded.png"; + changePicture(pictureId,"pictures/items/category-expanded.png"); } else if (document.getElementById(id).style.display=="block") @@ -111,7 +120,7 @@ document.getElementById(id).style.display="none"; document.getElementById(id+"More").style.display="none"; if(pictureId!="") - document.images[pictureId].src="pictures/items/category-collapsed.png"; + changePicture(pictureId,"pictures/items/category-collapsed.png"); } if (document.getElementById(id).className=="hide") { @@ -119,7 +128,7 @@ document.getElementById(id+"More").className="visible"; if(pictureId!="") - document.images[pictureId].src="pictures/items/category-expanded.png"; + changePicture(pictureId,"pictures/items/category-expanded.png"); } else if (document.getElementById(id).className=="visible") @@ -128,24 +137,28 @@ document.getElementById(id+"More").className="hide"; if(pictureId!="") - document.images[pictureId].src="pictures/items/category-collapsed.png"; + changePicture(pictureId,"pictures/items/category-collapsed.png"); } } - function hideArchive(type,id,pictureId,roomId) { - if (document.getElementById(id).style.display=="none") + if (document.getElementById(id).style.display=="none" || document.getElementById(id).className=="hide") { if(type=="MainLecture") numberMainLectureRoom+=numberArchive[roomId]; else numberBreakoutRoom+=numberArchive[roomId]; + if (document.getElementById(id).className=="hide") + { + document.getElementById(id).className="visible"; + }else{ document.getElementById(id).style.display="block"; - document.images[pictureId].src="pictures/minus.gif"; + } + changePicture(pictureId,"pictures/items/listitem-hide.png"); } @@ -155,9 +168,15 @@ numberMainLectureRoom-=numberArchive[roomId]; else numberBreakoutRoom-=numberArchive[roomId]; + if (document.getElementById(id).className=="visible") + { - document.getElementById(id).style.display="none"; - document.images[pictureId].src="pictures/plus.gif"; + document.getElementById(id).className="hide"; + + }else{ + document.getElementById(id).style.display="none"; + } + changePicture(pictureId,"pictures/items/listitem-show.png"); } @@ -246,17 +265,19 @@ if(currentId!="") { - var complete_url=url+'?roomId='+currentId+'&'+param; + var complete_url=url+'?product='+currentProduct+'&id='+currentId+'&'+param; - window.open(complete_url,"_self"); + window.open(complete_url,"_self"); } } + + function doOpenPopup(url,param) { if(currentId!="") { - var complete_url=url+'?roomId='+currentId+'&'+param; + var complete_url=url+'?id='+currentId+'&'+param; var w = window.open(complete_url,'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500'); w.focus(); } @@ -298,36 +319,45 @@ currentId=""; currentProduct=""; manageXml('',"all"); + + } function onFilter(id){ if(currentFilter!=id){ - document.getElementById(id+"_left").style.backgroundImage="url(pictures/items/filter-rollover-left.png)"; - document.getElementById(id+"_center").style.backgroundImage="url(pictures/items/filter-rollover-middle.png)"; - document.getElementById(id+"_right").style.backgroundImage="url(pictures/items/filter-rollover-right.png)"; + document.getElementById(id+"_left").className="filter_left_rollover"; + document.getElementById(id+"_center").className="filter_middle_rollover"; + document.getElementById(id+"_right").className="filter_right_rollover"; } } function outFilter(id){ if(currentFilter==id){ - document.getElementById(id+"_left").style.backgroundImage="url(pictures/items/filter-enabled-left.png)"; - document.getElementById(id+"_center").style.backgroundImage="url(pictures/items/filter-enabled-middle.png)"; - document.getElementById(id+"_right").style.backgroundImage="url(pictures/items/filter-enabled-right.png)"; - }else{ - document.getElementById(id+"_left").style.backgroundImage=""; - document.getElementById(id+"_center").style.backgroundImage=""; - document.getElementById(id+"_right").style.backgroundImage=""; + document.getElementById(id+"_left").className="filter_left_enabled"; + document.getElementById(id+"_center").className="filter_middle_enabled"; + document.getElementById(id+"_right").className="filter_right_enabled"; + }else{ + document.getElementById(id+"_left").className="noFilter"; + document.getElementById(id+"_center").className="noFilter"; + document.getElementById(id+"_right").className="noFilter"; } } -function startBoard() +function startBoard(type) { if(currentId!="") { - openPopup('<%=Setup.getInstance().getVtServerURL()%>/board?action=display_popup&nid='+currentId) + var type; + if(typeSelect=="voiceBoard"){ + type="board" } + else if(typeSelect=="voicePresentation"){ + type="presentation" + } + window.open(session["vtServerUrl"]+'/'+type+'?action=display_popup&nid='+currentId,"vt_popup",'scrollbars=yes,resizable=yes,width=800,height=500') + } } @@ -335,34 +365,91 @@ currentId="" currentProduct="" manageXml(search.value,"all"); - + gestionDisplay(); } function Launch(){ - - if(currentProduct="liveclassroom"){ + + if(currentProduct=="liveClassroom"){ Horizon(); - }else if(currentProduct="voiceboard"){ - startBoard(); + }else if(currentProduct=="voiceBoard"){ + + startBoard(typeSelect); } + currentId=""; + currentProduct=""; + } + function openContentWindows(){ if(currentId!="") - window.open('http://test13.horizonwimba.com/admin/class/carousels.epl?class_id='+currentId+'&hzA='+session["authToken"],'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500'); + window.open(session["lcServerUrl"]+'/admin/class/carousels.epl?class_id='+currentId+'&hzA='+session["authToken"],'lc_popup','scrollbars=yes,resizable=yes,width=800,height=500'); } -function submitForm(url,action){ - //alert(currentId) - document.myform.action=url+'?product='+currentProduct+'&id='+currentId+'&action='+action+'&time='+session["timeOfLoad"]+'&enc_course_id='+session["courseId"]+'&enc_email='+session["email"]+'&enc_firstname='+session["firstName"]+'&enc_lastname='+session["lastName"]+'&enc_role='+session["role"]+'&signature='+session["signature"]; - document.myform.submit(); - } +function openPopup(name,url,size,title) { + window.open(url,name,size); +} +function startHorizon( channel, useplugin, user, password, nickname, paramstring ) +{ + var windowname = "horizonWin"; + var horizonurl = session["lcServerUrl"]+"/main/horizon_ui.pl.epl"; + + // set the channel ( default to lobby ) + if ( channel != null) { + horizonurl += "?channel=" + channel; + } + else { + horizonurl += "?channel=lobby"; + } + + if ( useplugin != null ) { + horizonurl += "&useplugin=" + useplugin; + } + + if ( user != null ) { + horizonurl += "&AuthName=Horizon&credential_0=" + user; + } + if ( password != null ) { + horizonurl += "&credential_1=" + password; + } + + if ( nickname != null ) { + horizonurl += "&credential_2=" + nickname; + } + + if ( paramstring != null ) { + horizonurl += "&" + paramstring; + } + + // open a window with the horizon ui + var properties = "scrollbars=no,resizable=yes,width=700,height=500" ; + openPopup( windowname, horizonurl, properties, "Live Classroom"); + + return; +} + + +function doOpenPodcaster(url) +{ + + var w = window.open(url,'pc','scrollbars=yes,resizable=yes,width=1000,height=1000'); + w.focus(); + +} +function submitForm(url,action,id){ +alert(id); + if(currentProduct=="liveClassroom") + verifyFormLiveClassRoom(url+'?product='+currentProduct+'&id='+id+'&action='+action+'&time='+session["timeOfLoad"]+'&enc_course_id='+session["courseId"]+'&enc_email='+session["email"]+'&enc_firstname='+session["firstName"]+'&enc_lastname='+session["lastName"]+'&enc_role='+session["role"]+'&signature='+session["signature"]); + else + verifyFormVoiceBoard(url+'?product='+currentProduct+'&id='+id+'&action='+action+'&time='+session["timeOfLoad"]+'&enc_course_id='+session["courseId"]+'&enc_email='+session["email"]+'&enc_firstname='+session["firstName"]+'&enc_lastname='+session["lastName"]+'&enc_role='+session["role"]+'&signature='+session["signature"]); + } - function execAction(lcAction,VtAction){ + function execAction(lcAction,VtAction){ eval(lcAction); @@ -394,7 +481,131 @@ function initSearch(search){ - alert("rrr"); - manageXml(search,"toolBar"); - - } \ No newline at end of file + currentProduct=""; + currentId=""; + manageXml(search,"all"); + document.getElementById("search").focus(); + } + + + function getPosition(e) { + e = e || window.event; + var cursor = {x:0, y:0}; + if (e.pageX || e.pageY) { + cursor.x = e.pageX; + cursor.y = e.pageY; + } + else { + var de = document.documentElement; + var b = document.body; + cursor.x = e.clientX + + (de.scrollLeft || b.scrollLeft) - (de.clientLeft || 0); + cursor.y = e.clientY + + (de.scrollTop || b.scrollTop) - (de.clientTop || 0); + } + return cursor; +} +var timer=0; +var current; +function ShowToolTip(ev,lname,availibility) +{ +var Xdoc, Xfen, Ydoc, Yfen, htDiv, lgDiv, dX, dY; + var Ybulle; + var el=document.getElementById("Tip"); + + //on affiche la boite de dialogue pour evaluer ses dimensions. + + + + //height and width of the tooltip + htDiv = el.offsetHeight; + lgDiv = el.offsetWidth; + + //delta of the tooltip under the curser + dY=20; + dX=0; + + + ie = document.all; + var cursor = getPosition(ev); + + if(ie){ + Xfen = event.x; + Yfen = event.y; + Xdoc = cursor.x; + Ydoc = cursor.y; + //window.status = x; + }else{ + Xfen = ev.pageX; + Yfen = ev.pageY; + Xdoc = cursor.x; + Ydoc = cursor.y; + } + + //position of the curseur : +/* var cursor = getPosition(ev); + + Xfen = ev.clientX; + Xdoc = cursor.x; + + Yfen = ev.clientY; + Ydoc = cursor.y; +*/ + //position de la bulle dans la page : + if ((Xfen + lgDiv + dX) > document.body.clientWidth) + el.style.left = document.body.clientWidth + document.body.scrollLeft - lgDiv+"px"; + else + el.style.left = Xdoc + dX +"px"; + + if ((Yfen + htDiv + dY) > document.body.clientHeight) + { + Ybulle = document.body.clientHeight + document.body.scrollTop - htDiv-5; + if (parseInt(Ybulle)>parseInt(Ydoc)) + { + el.style.top = Ybulle+"px"; + } + else + { + el.style.top = Ydoc - htDiv-dY+"px"; + } + } + else + { + el.style.top = Ydoc + dY-5+"px"; + } + + //el.style.visibility = "visible"; + //el.style.display = "block"; + + //tooltip content : + el.innerHTML = "<strong>"+lname+"</strong><br>"; + if(availibility=="available") + el.innerHTML +="Available to the students.<br>"; + else + el.innerHTML +="Unavailable to the students.<br>"; + el.innerHTML+= "Click Settings to change."; + if(timer==0) + timer=setTimeout('ShowToolTipWait()', 1000) + if(current !=lname){ + clearTimeout(timer) + timer=setTimeout('ShowToolTipWait()', 0) + + } + current=lname; + +} + + function ShowToolTipWait(){ + var el=document.getElementById("Tip"); + if (el.style.display!="inline") + el.style.display="inline"; + + } +function HideToolTip() +{ + //hide the tooltip + + clearTimeout(timer) + timer=0; + document.getElementById("Tip").style.display = "none"; +} \ No newline at end of file Modified: trunk/moodle/mod/liveclassroom/js/manageXml.js =================================================================== --- trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-14 14:22:06 UTC (rev 109) +++ trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-15 11:04:39 UTC (rev 110) @@ -3,11 +3,11 @@ function manageXml(search,divToReload){ var display=""; - + if(divToReload=="all"){ - display+="<form method=post name=myform>" - display+=initDisplay(); - + display+="<form method=post name=myform>" + display+=initDisplay(); + } //session management var information= objDomTree.getElements("information"); @@ -19,10 +19,11 @@ var windows = objDomTree.getElements("windows"); //get the different part of the windows var windowsElements = windows[0].getElements("windowsElement"); + for(var i=0;i<windowsElements.length;i++){ // display+=openPart(); var type = windowsElements[i].getElements("type")[0].getText(); - + switch(type){ case "headerBar": if(divToReload=="all" ){ @@ -32,7 +33,7 @@ }else if(divToReload=="headerBar"){ display+=displayHeaderBar(windowsElements[i].getElements("windowsElementParameters")); - + } break; case "toolBar": @@ -45,6 +46,7 @@ display+=displayToolBar(windowsElements[i].getElements("windowsElementParameters"),search); } + break; case "filterBar": if(divToReload=="all"){ @@ -56,6 +58,7 @@ display+=displayFilterBar(windowsElements[i].getElements("windowsElementParameters")); } + break; case "messageBar": if(divToReload=="all"){ @@ -68,6 +71,17 @@ } break; + case "error": + if(divToReload=="all"){ + display+=openDiv("messageBar","messageBar") + display+=displayMessageBar(windowsElements[i].getElements("windowsElementParameters")); + display+=closeDiv(); + }else if(divToReload=="messageBar"){ + + display+=displayMessageBar(windowsElements[i].getElements("windowsElementParameters")); + + } + break; case "list": if(divToReload=="all"){ display+=openDiv("list","list") //style='height:245px;overflow-y:scroll'" @@ -134,15 +148,15 @@ document.getElementById(divToReload).innerHTML = display; - if(divToReload=="all"){ - gestionDisplay(false); - document.getElementById("search").focus(); - } + + if(Navigateur()=="Explorer" && parseFloat(navigator.appVersion)<5.5) + correctPNG(); - correctPNG(); + if(divToReload=="all" || divToReload=="list"){ + gestionDisplay(false); + document.getElementById("search").focus(); + } - - } @@ -154,24 +168,69 @@ switch(messageInformations[0].getElements("type")[0].getText()){ case "info": - pictureUrl=""; + pictureUrl="pictures/items/messagelabel-info.png"; break; - case "exception": - pictureUrl=""; + case "error": + +display+="<table width='100%' height='32' border='0' align='center' cellpadding='0' cellspacing='0' background='headerbar.png'>" +display+="<tr><td>" +display+="<div id='headerBar' class='headerBar'>" +display+=" <table cellpadding='0' cellspacing='0' id='TABLE1' style='padding-left:5px'>" +display+="<tbody>" +display+="<tr><td>" +display+="<img src='pictures/items/headerbar-logo.png'>" + + display+="</td> " + display+= "<td align='right' valign='middle'>" + + + display+= "<select id='view' onchange='ChangeView()'>" + display+= "<option value='normal'>Instructor View</option>" + + display+= "<option value='student'>Student View</option>" + + display+= "</select>" + + display+= "</td></table></div>" + display+="</tr><tr><td><div id='contextBar' class='contextBar'>" + + display+="<table cellspacing='0' cellpadding='0'>" + display+= "<tr>" + display+= "<td align=left><label class='roomNameForSettings'>Error</label></td>" + display+= "</tr>" + display+="</table></div>" + display+= "</td>" + display+="</tr>"; + display+="</tr><tr><td>" + + display+="<div id='error_frame' align='center'>" + display+="<table width='100%' border='0' cellpadding='0' height='254px'>" + + display+="<tr>" + display+="<td width='10%'></td>" + display+="<td valign='middle'><img src='pictures/items/warning.png' alt='' width='60' height='60' border='0'></td>" + display+="<td width='20'></td>" + display+="<td valign='middle' >" + display+="<div id='error_title'>Error" + display+="<div id='error_body'>" + display+="<p>"+messageInformations[0].getElements("value")[0].getText()+"</p>" + display+="</div>" + display+="</td>" + + display+="</tr>" + + display+="</table>" + display+="</div>" + display+= "</td>" + display+="</tr>"; + display+="</tbody>" + display+="</table>" break; } - - display="<table cellspacing=0 border=1 cellpadding=0 bgcolor='#ffffd0'>" - display+= "<tr >" - display+= "<td><img src='pictures/items/messagelabel-info.png' /></td>" - display+= "<td> " + messageInformations[0].getElements("value")[0].getText()+"</td>"; - display+= "<td colspan=5></td>" - display+= "</tr>" - display+="</table>" + return display; - +} -} function displayHeaderBar(elementParameters){ var display=""; var headerBarInformations=elementParameters[0].getElements("headerBarInformations") @@ -296,7 +355,7 @@ display+="</td>" display+="<td align='right' height=26px style='background-image: url(pictures/items/headerbar-searchfield-middle.png); '>" display+="<input name='search' id='search' type='search' style='border:0; width: 50px;' " - display+="onkeyup='javascript:manageXml(\"search.value\",\"list\");' onClick='javascript:initSearch(search.value);' value='"+search+"' />" + display+="onkeyup='javascript:manageXml(search.value,\"list\");' onClick='javascript:initSearch(search.value);' value='"+search+"' />" display+="</td>" display+="<td align=left width=26px style='background-image: url(pictures/items/headerbar-searchfield-right.png); background-repeat:no-repeat;'>" display+="<div id='croix' style='display:none'> " @@ -330,15 +389,15 @@ //get the different filters var filterElements = filterBar[0].getElements("filter"); - display +="<table cellspacing='0' cellpadding='0' width=100%>" + display +="<table cellspacing='0' cellpadding='0' width=100% >" display += "<tr>" for(var i=0;i<filterElements.length;i++){ - display += "<td>" + display += "<td class='filterSpace'>" display+=displayfilter(filterElements[i].getElements("value")[0].getText(),filterElements[i].getElements("name")[0].getText(),filterElements[i].getElements("action")[0].getText(),filterElements[i].getElements("availibility")[0].getText()); display += "</td>" - display+="<td width='15px'></td> " + } display+="</tr></table>"; @@ -347,23 +406,23 @@ function displayfilter(value,name,action,availibility){ var display=""; - display+="<table border='0' align='center' cellpadding='0' cellspacing='0' heigth='24px'>"; + display+="<table align='center' cellpadding='0' cellspacing='0' heigth='24px'>"; display+="<tr heigth='24px' class='filter'>"; if(currentFilter==name){ - display+="<td width='8px' class='filter_left_enabled' id='"+name+"_left'></td>"; - display+="<td class='filter_middle_enabled' id='"+name+"_center' class='filter_selected'>"; - display+="<div align='center' onclick="+action+" onmouseover=\"onFilter('"+name+"')\" onmouseout=\"outFilter('"+name+"')\"><label>"+value+"</label></strong></div>"; + display+="<td class='filter_left_enabled' width=8px id='"+name+"_left'></td>"; + display+="<td class='filter_middle_enabled' id='"+name+"_center' class='filter_selected' onclick="+action+" onmouseover=\"onFilter('"+name+"')\" onmouseout=\"outFilter('"+name+"')\">"; + display+=value; display+="</td>"; - display+="<td width='8px' class='filter_right_enabled' id='"+name+"_right'></td>"; + display+="<td class='filter_right_enabled' width=8px id='"+name+"_right'></td>"; } else{ - display+="<td width='8px' id='"+name+"_left'></td>"; - display+="<td id='"+name+"_center' class='filter_enabled'>"; - display+="<div align='center' onclick="+action+" onmouseover=\"onFilter('"+name+"')\" onmouseout=\"outFilter('"+name+"')\"><label>"+value+"</label></strong></div>"; + display+="<td width=8px id='"+name+"_left' ></td>"; + display+="<td id='"+name+"_center' class='filter_enabled' onclick="+action+" onmouseover=\"onFilter('"+name+"')\" onmouseout=\"outFilter('"+name+"')\">"; + display+=value; display+="</td>"; - display+="<td width='8px' id='"+name+"_right'></td>"; + display+="<td width=8px id='"+name+"_right'></td>"; } display+="</tr>"; display+="</table>"; @@ -414,8 +473,8 @@ start=parseInt(positionOfDiv); } - var productsContent = list[0].getElements("productsContent"); - var content = productsContent[0].getElements("listElements"); + + var content = list[0].getElements("listElements"); var listElements = content[0].getElements("listElement"); var positionDiscussionRoom=0; var positionMainLecture=0; @@ -479,9 +538,12 @@ } var display=""; - + display+="<table border='0' align='center' cellpadding='0' cellspacing='0' width=100% >"; + for(i=start; i< parts.length; i++) { + display+="<tr><td>"; + if(currentFilter=="all" || currentDiv== i){ if(positionMainLecture==i) parts[i]=parts[i].toString()+orphanedMainLecture; @@ -491,15 +553,16 @@ parts[i]+="<div id='div"+i+"More' class='hide'></div>" display+=parts[i]; } + display+="</td></tr>"; } - + display+="</table>"; return display; } function openDivProduct(name,cssStyle,value){ var display=""; - display+="<div id='div"+name+"Title'>"; + display+="<div id='div"+name+"Title' >"; display+="<table cellpadding='0' cellspacing='0' width='100%'>"; display+="<tr class='productTitle'>"; @@ -525,7 +588,7 @@ display += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-liveclassroomicon.png\" border=\"0\" /></td>"; display += "<td width=16px align=\"left\"><img src=\"pictures/items/space-16x16px.png\" border=\"0\" /></td>"; - display += "<td width='300px' >"+parameters[0].getElements("nameDisplay")[0].getText()+"</td>"; + display += "<td width='300px' <label onmousemove='javascript:ShowToolTip(event,\""+parameters[0].getElements("nameDisplay")[0].getText()+"\",\""+parameters[0].getElements("preview")[0].getText()+"\")' onmouseout='javascript:HideToolTip()'>"+parameters[0].getElements("nameDisplay")[0].getText()+"</label></td>"; display += "<td class='shiftAvailability' align=right><img src=\"pictures/items/listitem-"+parameters[0].getElements("preview")[0].getText()+".png\"/></td>"; display += "</tr>"; @@ -551,7 +614,7 @@ display += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-"+type+"icon.png\" border=\"0\" /></td>"; display += "<td width=16px align=\"left\" Ondblclick=''></td>"; - display += "<td width='300px' >"+title+"</td>"; + display += "<td width='300px' ><label onmousemove='javascript:ShowToolTip(event,\""+title+"\",\""+availibility+"\")' onmouseout='javascript:HideToolTip()'>"+title+"</label></td>"; display += "<td class='shiftAvailability' align=right><img src=\"pictures/items/listitem-"+availibility+".png\"/></td>"; display += "</tr>"; @@ -577,17 +640,17 @@ return display; } - function displayRoom(type,availibility,longname,roomId,archive,archives) { var display=""; - display += "<tr id="+roomId+" height=16px Onclick=\"OneClick('"+roomId+"','liveClassroom','"+type+"')\" class='room' >" - display += "<td Ondblclick=\"dclick('"+roomId+"')\" width=16px align=\"left\"><img src=\"pictures/items/listitem-liveclassroomicon.png\" border=\"0\" /></td>"; - display += "<td align=\"left\" Ondblclick='' width=16px><img src='"+archive+"' onclick=\"hideArchive('"+type+"','"+roomId+"hide','toggleimg"+roomId+"hide','"+roomId+"')\" id=\"toggleimg"+roomId+"hide\" border=\"0\" /></td>"; - display += "<td Ondblclick=\"dclick('"+roomId+"')\" width=300px ><label onmousemove=\"ShowToolTip(event,'"+longname+"','"+availibility+"')\" onmouseout=\"HideToolTip()\">"+longname+"</label></td>"; - display += "<td Ondblclick=\"dclick('"+roomId+"')\" class='shiftAvailability' align=right ><img src=\"pictures/items/listitem-"+availibility+".png\"/></td>"; + display += "<tr id="+roomId+" height=16px class='room'>" + + display += "<td Ondblclick=\"dclick('"+roomId+"')\" Onclick=\"OneClick('"+roomId+"','liveClassroom','"+type+"')\" width=16px align=\"left\"><img src=\"pictures/items/listitem-liveclassroomicon.png\" border=\"0\" /></td>"; + display += "<td align=\"left\" Onclick=\"javascript:hideArchive('"+type+"','"+roomId+"hide','toggleimg"+roomId+"hide','"+roomId+"')\" width=16px><img src='"+archive+"' id=\"toggleimg"+roomId+"hide\" border=\"0\" /></td>"; + display += "<td Ondblclick=\"dclick('"+roomId+"')\" Onclick=\"OneClick('"+roomId+"','liveClassroom','"+type+"')\" width=300px ><label onmousemove='javascript:ShowToolTip(event,\""+longname+"\",\""+availibility+"\")' onmouseout='javascript:HideToolTip()'>"+longname+"</label></td>"; + display += "<td Ondblclick=\"dclick('"+roomId+"')\" Onclick=\"OneClick('"+roomId+"','liveClassroom','"+type+"')\" class='shiftAvailability' align=right ><img src=\"pictures/items/listitem-"+availibility+".png\"/></td>"; display += "</tr>"; if(archives!=null){ @@ -613,10 +676,10 @@ display += "<tr id="+archive[i].getElements("id")[0].getText()+" height=16px Onclick=\"OneClick('"+archive[i].getElements("id")[0].getText()+"','liveclassroom')\" Ondblclick=\"javascript:startHorizon('"+archive[i].getElements("id")[0].getText()+"', null, null, null, null, 'hzA="+session["authToken"]+"')\" class='archive'>" - display += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-liveclassroomicon.png\" border=\"0\" /></td>"; - display += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-subitem.png\" border=\"0\" /></td>"; - display += "<td width='300px' class='archive' onmousemove=\"ShowToolTip(event,'"+archive[i].getElements("nameDisplay")[0].getText()+"')\" onmouseout=\"HideToolTip()\">"+archive[i].getElements("nameDisplay")[0].getText()+"</td>"; - display += "<td class='shiftAvailability' align=right><img src=\"pictures/items/listitem-"+archive[i].getElements("preview")[0].getText()+".png\"/></td>"; + display += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-liveclassroomicon.jpg\" border=\"0\" /></td>"; + display += "<td width=16px align=\"left\"><img src=\"pictures/items/listitem-subitem.jpg\" border=\"0\" /></td>"; + display += "<td width='300px' class='archive' ><label onmousemove='javascript:ShowToolTip(event,\""+archive[i].getElements("nameDisplay")[0].getText()+"\",\""+archive[i].getElements("preview")[0].getText()+"\")' onmouseout='javascript:HideToolTip()'>"+archive[i].getElements("nameDisplay")[0].getText()+"</label></td>"; + display += "<td class='shiftAvailability' align=right><img src=\"pictures/items/listitem-"+archive[i].getElements("preview")[0].getText()+".jpg\"/></td>"; display += "</tr>"; }else{ closeArchive++; @@ -739,7 +802,7 @@ for(var i=0;i<line.length; i++){ - if(line[i].getElements("style")[0].getText()!="" && line[i].getElements("style")[0].getText()=="hide"){ + if(line[i].getElements("style")[0].getText()!="" && (line[i].getElements("style")[0].getText()=="hide"|| line[i].getElements("style")[0].getText()=="hideAndShift")){ display +="<tr ><td>"; display +="<div id='"+line[i].getElements("id")[0].getText()+"' class='"+line[i].getElements("style")[0].getText()+"'><table cellspacing='0px' cellpadding='0'><tr>" @@ -780,10 +843,11 @@ var style=new String(linePart[j].getElements("style")[0].getText()); if(style != "") display+=" class="+style; - + var colspan=new String(linePart[j].getElements("colspan")[0].getText()); + if(colspan != "0") + display+=" colspan="+colspan; var align=new String(linePart[j].getElements("align")[0].getText()); if(align != "") - display+=" align="+align; display+=" >" for(var i=0;i<elements.length; i++){ var context=new String(elements[i].getElements("displayContext")[0].getText()); @@ -841,27 +905,54 @@ display +=listElement[i].getElements("name")[0].getText()+"='"+listElement[i].getElements("value")[0].getText()+"' "; else - value=listElement[i].getElements("value")[0].getText() + { + + value=listElement[i].getElements("value")[0].getText() + + + + } } display += ">"+ value +"</label>" break; case "input": display += "<input "; + var change=false; for(var i=0;i<listElement.length; i++){ - - display +=listElement[i].getElements("name")[0].getText()+"='"+listElement[i].getElements("value")[0].getText()+"' "; - + + if(listElement[i].getElements("name")[0].getText()=="id" && listElement[i].getElements("value")[0].getText()=="longname" && longname!=""){ + + value=longname; + change=true; + + } + + display +=listElement[i].getElements("name")[0].getText()+"='"+listElement[i].getElements("value")[0].getText()+"' "; } + if(change==true ){ + display +="value='"+value+"' "; + + } + display+="></input>"; break; case "textarea": display += "<textarea "; for(var i=0;i<listElement.length; i++){ + if(description!="" && listElement[i].getElements("name")[0].getText()=="id" && listElement[i].getElements("value")[0].getText()=="description") + change=true; + if(listElement[i].getElements("name")[0].getText()!="value") display +=listElement[i].getElements("name")[0].getText()+"='"+listElement[i].getElements("value")[0].getText()+"' "; else + { + if(change==true) + value=description + else value=listElement[i].getElements("value")[0].getText() + + } } display+=">"+value+"</textarea>"; break; @@ -985,6 +1076,7 @@ return display; } function openDiv(id,style){ + var display="<tr><td><div id='"+id+"' class="+style+">"; return display; } @@ -1014,9 +1106,14 @@ session["role"] = informations[0].getElements("role")[0].getText(); if(informations[0].getElements("authToken")!="") session["authToken"] = informations[0].getElements("authToken")[0].getText(); - if(informations[0].getElements("vtServerUrl")!="") + if(informations[0].getElements("vtServerUrl")!="") session["vtServerUrl"] = informations[0].getElements("vtServerUrl")[0].getText(); - if(informations[0].getElements("lcServerUrl")!="") + + ... [truncated message content] |