[Hw4mdl-svn] SF.net SVN: hw4mdl: [149] trunk/moodle/mod/liveclassroom/js
Brought to you by:
jhlinder,
trollinger
From: <sh...@us...> - 2006-12-29 12:06:30
|
Revision: 149 http://svn.sourceforge.net/hw4mdl/?rev=149&view=rev Author: shazan Date: 2006-12-29 04:06:29 -0800 (Fri, 29 Dec 2006) Log Message: ----------- add features of js files and fix bug 10533. Dialog while deleting Archive/room Modified Paths: -------------- 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 Removed Paths: ------------- trunk/moodle/mod/liveclassroom/js/verif.js Modified: trunk/moodle/mod/liveclassroom/js/constants.js =================================================================== --- trunk/moodle/mod/liveclassroom/js/constants.js 2006-12-29 11:05:36 UTC (rev 148) +++ trunk/moodle/mod/liveclassroom/js/constants.js 2006-12-29 12:06:29 UTC (rev 149) @@ -16,11 +16,12 @@ var currentId=""; var currentProduct=""; var currentTool="all"; + var currentIdtab="1"; var typeSelect=LC_MAINLECTURE; var longname=""; var description=""; var currentNid=""; - +var message=false; var currentDiv=0; var numberMainLectureRoom=0; var numberDiscussionRoom=0; @@ -28,6 +29,7 @@ var numberVoicePresentation=0; var studentView=false; var numberArchive=new Array(); +var isFilter=false; // xml var objDom; var objDomTree; Modified: trunk/moodle/mod/liveclassroom/js/hwCommons.js =================================================================== --- trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-29 11:05:36 UTC (rev 148) +++ trunk/moodle/mod/liveclassroom/js/hwCommons.js 2006-12-29 12:06:29 UTC (rev 149) @@ -59,10 +59,16 @@ } - function confirmDelete(delUrl, type){ - if (confirm("Are you really sure you want to delete this " + type + " ?" )) { - location.href = delUrl - } + function confirmDelete(){ + var type="" + if(currentProduct==LC_PRODUCT && (typeSelect==LC_MAINLECTURE || typeSelect==LC_DISCUSSION) ) type="room" + else type="archive" + /* else if(currentProduct==VT_PRODUCT && typeSelect==VB_PRODUCT) + type="voice board" + else if(currentProduct==VT_PRODUCT && typeSelect==VP_PRODUCT) + type="voice presentation" */ + return confirm("Are you sure you want to delete this " + type) + } Modified: trunk/moodle/mod/liveclassroom/js/manageXml.js =================================================================== --- trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-29 11:05:36 UTC (rev 148) +++ trunk/moodle/mod/liveclassroom/js/manageXml.js 2006-12-29 12:06:29 UTC (rev 149) @@ -149,8 +149,11 @@ document.getElementById(divToReload).innerHTML = display; - if(Navigateur()=="Explorer" && parseFloat(navigator.appVersion)<5.5) + if(navigator.appName.indexOf("Explorer") > -1 && parseFloat(navigator.appVersion)<5.5) + { + correctPNG(); + } if(divToReload=="all" || divToReload=="list"){ @@ -317,7 +320,7 @@ if(product=="all" || currentTool=="all"){ if(value=="Delete") { - actionDelete="onclick=\";return confirm('Are you sure you want to delete this room ?');\"" + actionDelete="onclick=\"javascript:return confirmDelete();\"" } display+="<td align='center' class='button_enabled' "+actionDelete+">" @@ -384,14 +387,14 @@ { var display=""; - if(Navigateur()=="Safari"){ - display+="<td align='right' width=115px>" - display+="<table border=0 class='search' cellspacing=0 cellpadding=0 >" + if(navigator.userAgent.indexOf("Safari") != -1 ){ + display+="<td align='right' width=120px>" + display+="<table border=0 class='search' cellspacing=0 cellpadding=0 style=border:none >" display+="<tr>" display+="<td align='right' >" - display+="<input name='search' id='search' type='search' style='border:0; width: 110px;' " - display+="onkeyup='javascript:manageXml(search.value,\"list\");' onClick='javascript:initSearch(search.value);' value='"+search+"' />" + display+="<input name='search' id='search' type='search' style='border:0; width: 105px;' " + display+="onkeyup='javascript:manageXml(search.value,\"list\",false);' onClick='javascript:initSearch(search.value);' value='"+search+"' />" display+="</td>" display+="</tr>" display+="</table>" @@ -405,7 +408,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\",false);' 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'> " @@ -420,7 +423,6 @@ return display; } - function displayToolBarSeparator() { var display=""; Deleted: trunk/moodle/mod/liveclassroom/js/verif.js =================================================================== --- trunk/moodle/mod/liveclassroom/js/verif.js 2006-12-29 11:05:36 UTC (rev 148) +++ trunk/moodle/mod/liveclassroom/js/verif.js 2006-12-29 12:06:29 UTC (rev 149) @@ -1,57 +0,0 @@ -// JScript File - - function verifyFormUpdate() { - var theForm = window.document.entry_info_form; - var validated = false; - var errorMessage = ""; - var roomIdPattern = /^[a-z|A-Z|0-9|_]{1,32}$/; - var longnamePattern = /^[a-z|A-Z|0-9|_| |\'|!|?|(|)|:|\-|\/|]{1,50}$/; - if (!longnamePattern.test(theForm.longname.value)){ - errorMessage += "Please fill in a Title that is 1-50 alphanumeric or space characters or - / : ' ? ! ( )\n"; - } - if (theForm.longname.length > 50) { - errorMessage += "The Title you have entered is too long. This field should not exceed 50 characters.\n"; - } - if (errorMessage.length > 0) { - alert(errorMessage); - } else { - - theForm.submit(); - } - } - - function verifyForm() { - - var theForm = window.document.entry_info_form; - var validated = false; - var errorMessage = ""; - var roomIdPattern = /^[a-z|A-Z|0-9|_]{1,32}$/; - var userlimitPattern = /^[0-9]+[0-9]*$/; - var longnamePattern = /^[a-z|A-Z|0-9|_| |\'|!|?|(|)|]{1,50}$/; - if (!longnamePattern.test(theForm.longname.value)){ - errorMessage += "Please fill in a Title that is 1-50 alphanumeric or space characters or ' ? ! ( ) \n"; - } - if (theForm.longname.length > 50) { - errorMessage += "The Title you have entered is too long. This field should not exceed 50 characters.\n"; - } - var radio = theForm.userlimit; - - for (i=0; i<radio.length; i++) { - if(radio[i].checked && radio[i].value == "true"){ - if (theForm.userlimitValue.value == null || theForm.userlimitValue == "") { - errorMessage += "Please fill in the user limit value\n"; - } - if (!userlimitPattern.test(theForm.userlimitValue.value)) { - errorMessage += "User Limit should be an integer\n"; - } else if (parseInt(theForm.userlimitValue.value) > 100) { - errorMessage += "User Limit should be less than 100\n"; - } - } - } - - if (errorMessage.length > 0) { - alert(errorMessage); - } else { - theForm.submit(); - } - } \ No newline at end of file Modified: trunk/moodle/mod/liveclassroom/js/verifForm.js =================================================================== --- trunk/moodle/mod/liveclassroom/js/verifForm.js 2006-12-29 11:05:36 UTC (rev 148) +++ trunk/moodle/mod/liveclassroom/js/verifForm.js 2006-12-29 12:06:29 UTC (rev 149) @@ -1,4 +1,4 @@ - function verifyFormLiveClassRoomUpdate(url) { + function verifyFormLiveClassRoomUpdate(url) { var theForm = window.document.myform; theForm.action=url; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |