From 02782d1287173f3981a008755958543c178de296 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 18 Aug 2011 12:24:43 +0200 Subject: moved subscription javascript into behaviour --- lib/scripts/subscriptions.js | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 lib/scripts/subscriptions.js (limited to 'lib/scripts/subscriptions.js') diff --git a/lib/scripts/subscriptions.js b/lib/scripts/subscriptions.js deleted file mode 100644 index b7bffb158..000000000 --- a/lib/scripts/subscriptions.js +++ /dev/null @@ -1,38 +0,0 @@ -/*jslint sloppy: true */ -/*global jQuery */ -/** - * Hide list subscription style if target is a page - * - * @author Adrian Lang - * @author Pierre Spring - */ -jQuery(function () { - var $form, $list, $digest; - - $form = jQuery('#subscribe__form'); - - if (0 === $form.length) { - return; - } - - $list = $form.find("input[name='sub_style'][value='list']"); - $digest = $form.find("input[name='sub_style'][value='digest']"); - - $form.find("input[name='sub_target']") - .click( - function () { - var $this = jQuery(this), show_list; - if (!$this.prop('checked')) { - return; - } - - show_list = $this.val().match(/:$/); - $list.parent().dw_toggle(show_list); - if (!show_list && $list.prop('checked')) { - $digest.prop('checked', 'checked'); - } - } - ) - .filter(':checked') - .click(); -}); -- cgit v1.2.3