From: Chris S. <san...@us...> - 2005-07-03 15:56:43
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27920/scripts Modified Files: stackDatabase.php Log Message: Index: stackDatabase.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackDatabase.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** stackDatabase.php 3 Jul 2005 15:49:04 -0000 1.24 --- stackDatabase.php 3 Jul 2005 15:56:32 -0000 1.25 *************** *** 266,270 **** echo '<input type="hidden" name="action" value="quiz_edit" />'; ! echo "<input type=\"submit\" value=\"Add\" />\n<input type='checkbox' name='checkall' onclick=\"checkUncheckAll(this);\"/></form>\n"; } else { --- 266,273 ---- echo '<input type="hidden" name="action" value="quiz_edit" />'; ! echo '<input type="radio" name="selectall" onclick="selectAll(this.form,0);" />Select All<br />'; ! echo '<input type="radio" name="selectall" onclick="selectAll(this.form,1);" />Inverse All<br />'; ! echo '<input type="submit" value="Add" /></form>'; ! } else { *************** *** 314,317 **** --- 317,333 ---- function stack_db_question_filter_tablehead($action,$filter,$quizid=0) { + // The following is JAVA script to select all the questions in a quiz. + // Note the fix to prevent all check boxes being selected. + echo "<script> + function selectAll(formObj, isInverse) { + for (var i=0;i < formObj.length;i++) { + fldObj = formObj.elements[i]; + if (fldObj.type == 'checkbox' && fldObj.name != 'bank_filter[case_sense]' && fldObj.name != 'bank_filter[show_descript]') { + if(isInverse) + fldObj.checked = (fldObj.checked) ? false : true; + else fldObj.checked = true; + } } } + </script>"; + echo "<thead>\n"; |