summaryrefslogtreecommitdiff
path: root/lib/scripts/subscriptions.js
diff options
context:
space:
mode:
authorAdrian Lang <mail@adrianlang.de>2011-07-07 16:08:05 +0200
committerAdrian Lang <mail@adrianlang.de>2011-07-10 12:15:25 +0200
commitd10c9a7424d1ef0aace2fd34e1008196d111a88c (patch)
tree93f439df14ef3b0712f0eb9b3d83e82b6a18d121 /lib/scripts/subscriptions.js
parent881f2ee268e95e0cdd02bf593d89ca9b42d03060 (diff)
downloadrpg-d10c9a7424d1ef0aace2fd34e1008196d111a88c.tar.gz
rpg-d10c9a7424d1ef0aace2fd34e1008196d111a88c.tar.bz2
Rewrite mediamanager JavaScript
Make it faster, prettier, less wrong, add UI effects, use jQuery UI Dialog, Abstract tree view stuff away into jQuery.dw_tree
Diffstat (limited to 'lib/scripts/subscriptions.js')
-rw-r--r--lib/scripts/subscriptions.js15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/scripts/subscriptions.js b/lib/scripts/subscriptions.js
index 565ea33eb..b7bffb158 100644
--- a/lib/scripts/subscriptions.js
+++ b/lib/scripts/subscriptions.js
@@ -21,18 +21,15 @@ jQuery(function () {
$form.find("input[name='sub_target']")
.click(
function () {
- var $input = jQuery(this);
- if (!$input.prop('checked')) {
+ var $this = jQuery(this), show_list;
+ if (!$this.prop('checked')) {
return;
}
- if ($input.val().match(/:$/)) {
- $list.parent().slideDown('fast');
- } else {
- $list.parent().slideUp('fast');
- if ($list.prop('checked')) {
- $digest.prop('checked', 'checked');
- }
+ show_list = $this.val().match(/:$/);
+ $list.parent().dw_toggle(show_list);
+ if (!show_list && $list.prop('checked')) {
+ $digest.prop('checked', 'checked');
}
}
)