Skip to content

Instantly share code, notes, and snippets.

Created April 4, 2013 19:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5313335 to your computer and use it in GitHub Desktop.
Save anonymous/5313335 to your computer and use it in GitHub Desktop.
quick tweak to the 'jumpto' Moodle plugin found at https://moodle.org/plugins/view.php?plugin=block_jumpto_menu. It fixes the rendering of the list if there are quotes in the item name and fades the jump list a bit until you hover over it.
diff -rupN jumpto_menu/block_jumpto_menu.php /var/www/html/lms/learn/blocks/jumpto_menu/block_jumpto_menu.php
--- jumpto_menu/block_jumpto_menu.php 2013-02-21 09:40:32.000000000 -0600
+++ /var/www/html/lms/learn/blocks/jumpto_menu/block_jumpto_menu.php 2013-04-04 11:58:21.582358432 -0500
@@ -424,7 +424,7 @@ class block_jumpto_menu extends block_ba
}
if ($label) {
- $optstr .= '>'. $label .'</option>';
+ $optstr .= '>'. addslashes($label) .'</option>';
} else {
$optstr .= '>'. $value .'</option>';
}
@@ -465,4 +465,4 @@ class block_jumpto_menu extends block_ba }
-?>
\ No newline at end of file
+?>
diff -rupN jumpto_menu/styles.css /var/www/html/lms/learn/blocks/jumpto_menu/styles.css
--- jumpto_menu/styles.css 2013-02-21 08:41:26.000000000 -0600
+++ /var/www/html/lms/learn/blocks/jumpto_menu/styles.css 2013-04-04 12:08:32.846327566 -0500
@@ -6,8 +6,16 @@
display: inline;
}
+
.jumpto_menu {
margin-bottom: 4px;
+ opacity:.4;
+ filter:alpha(opacity=40);
+}
+
+.jumpto_menu:hover {
+ opacity:1;
+ filter:alpha(opacity=100);
}
.jumpto_menu ul {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment