/[drupal]/contributions/modules/signup/js/admin.content_types.js
ViewVC logotype

Contents of /contributions/modules/signup/js/admin.content_types.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Wed Apr 15 22:25:38 2009 UTC (7 months, 1 week ago) by dww
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
File MIME type: text/javascript
#434644 by jcmarco: Removed deprecated '@' signs from jQuery selectors.
1 /* $Id: admin.content_types.js,v 1.3 2008/11/06 10:20:48 dww Exp $ */
2
3 /**
4 * Conditionally show or hide the signup date field setting.
5 *
6 * On a node type settings form, if the "Allow signups" radios set
7 * set to 0 ('Disabled'), or the node type is event-enabled, then
8 * hide the date field setting. Otherwise, show it.
9 */
10 Drupal.behaviors.signupShowDateField = function () {
11 $('div.signup-node-default-state-radios input[type=radio], div.event-nodeapi-radios input[type=radio]').click(function () {
12 var eventEnabled = false;
13 var signupDisabled = true;
14 $('div.event-nodeapi-radios input.form-radio').each(function() {
15 if (this.checked && this.value != 'never') {
16 eventEnabled = true;
17 }
18 });
19 $('div.signup-node-default-state-radios input.form-radio').each(function() {
20 if (this.checked && this.value != 'disabled') {
21 signupDisabled = false;
22 }
23 });
24 if (signupDisabled || eventEnabled) {
25 $('div.signup-date-field-setting').hide();
26 }
27 else {
28 $('div.signup-date-field-setting').show();
29 }
30 });
31 };

  ViewVC Help
Powered by ViewVC 1.1.2