Permalink
Browse files

Config menu for extra options added. Javascript added to force some s…

…ensible options. (Tom's work)
  • Loading branch information...
1 parent 2cc0d2a commit 750c6946044d4cd1680c4ce0c28ca1bbddee7c13 wildgirl committed Apr 10, 2006
Showing with 47 additions and 1 deletion.
  1. +47 −1 mod/resource/type/ims/ims.html
@@ -54,6 +54,23 @@
}
}
}
+
+ function optiondeselector () {
+ currentstate = document.getElementById('menuparam_navigationmenu').value;
+ if (currentstate == 1) {
+ document.getElementById('menuparam_tableofcontents').value = 0;
+ document.getElementById('menuparam_skipsubmenus').value = 1;
+ document.getElementById('menuparam_navigationupbutton').value = 0;
+ document.getElementById('menuparam_tableofcontents').disabled = true;
+ document.getElementById('menuparam_skipsubmenus').disabled = true;
+ document.getElementById('menuparam_navigationupbutton').disabled = true;
+ }
+ else {
+ document.getElementById('menuparam_tableofcontents').disabled = false;
+ document.getElementById('menuparam_skipsubmenus').disabled = false;
+ document.getElementById('menuparam_navigationupbutton').disabled = false;
+ }
+ }
</script>
@@ -168,7 +185,16 @@
$yesno = array();
$yesno[0] = get_string('no');
$yesno[1] = get_string('yes');
-
+
+ echo "<tr>\n";
+ echo "<td valign=\"top\" align=\"right\">\n";
+ echo 'Navigation Menu: ';
+ echo "</td>\n";
+ echo "<td valign=\"top\">\n";
+ choose_from_menu($yesno, "param_navigationmenu", $form->param_navigationmenu, "", "optiondeselector();");
+ echo "</td>\n";
+ echo "</tr>\n";
+
echo "<tr>\n";
echo "<td valign=\"top\" align=\"right\">\n";
echo get_string('tableofcontents','resource').': ';
@@ -186,6 +212,26 @@
choose_from_menu($yesno, "param_navigationbuttons", $form->param_navigationbuttons, "");
echo "</td>\n";
echo "</tr>\n";
+
+ echo "<tr>\n";
+ echo "<td valign=\"top\" align=\"right\">\n";
+ echo 'Skip Submenu Entries: ';
+ echo "</td>\n";
+ echo "<td valign=\"top\">\n";
+ choose_from_menu($yesno, "param_skipsubmenus", $form->param_skipsubmenus, "");
+ echo "</td>\n";
+ echo "</tr>\n";
+
+ echo "<tr>\n";
+ echo "<td valign=\"top\" align=\"right\">\n";
+ echo 'Navigation \'Up\' Button: ';
+ echo "</td>\n";
+ echo "<td valign=\"top\">\n";
+ choose_from_menu($yesno, "param_navigationupbutton", $form->param_navigationupbutton, "");
+ echo "</td>\n";
+ echo "</tr>\n";
+
+ echo "<script language=\"javascript\" type=\"text/javascript\"> optiondeselector(); </script>";
?>

0 comments on commit 750c694

Please sign in to comment.