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

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

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


Revision 1.6 - (show annotations) (download) (as text)
Sat Jan 24 08:52:40 2009 UTC (10 months ago) by dww
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +2 -2 lines
File MIME type: text/javascript
#361446 by dww: Restored the ability to have the signup user list
embedded directly on each node, instead of forcing it into a subtab at
node/N/signups/list (#349292).  There are now extra options for the
"How to display the list of signed-up users" advanced setting, and the
list is now a separate entry in each node's content[] array so it can
be ordered independently of the signup form.  This commit includes a
work-around for a bug in CCK's content_extra_field_weight() (#363456).
1 /* $Id: admin.settings.js,v 1.5 2009/01/14 17:36:12 dww Exp $ */
2
3 /**
4 * Conditionally show/hide settings based on the signup form location.
5 *
6 * If the signup form is being show on the node itself, it's wrapped
7 * in a fieldset and there's a setting to control if that fieldset
8 * should be collapsed. Only show this setting if the form is going
9 * to be displayed on the node itself.
10 */
11 Drupal.behaviors.signupShowFormLocationSetting = function () {
12 $('div.signup-form-location-radios input.form-radio').click(function () {
13 // Simple part: Depending on the form location, hide/show the
14 // collapsible fieldset setting.
15 if (this.value == 'node') {
16 $('div.signup-fieldset_collapsed-setting').show();
17 }
18 else {
19 $('div.signup-fieldset_collapsed-setting').hide();
20 }
21 });
22 };
23
24 /**
25 * Conditionally show/hide settings based on the signup user list setting.
26 *
27 * If the signup user list is going to be an embedded view, show the
28 * view-related settings, otherwise, hide them.
29 */
30 Drupal.behaviors.signupShowUserListViewSetting = function () {
31 $('div.signup-display-signup-user-list-setting input.form-radio').click(function () {
32 if (this.value == 'embed-view' || this.value == 'embed-view-tab') {
33 $('div.signup-user-list-view-settings').show();
34 }
35 else {
36 $('div.signup-user-list-view-settings').hide();
37 }
38 });
39 };
40
41 /**
42 * Conditionally show/hide settings based on the signup admin list setting.
43 *
44 * If the administer signup user list is going to be an embedded view,
45 * show the view-related settings, otherwise, hide them.
46 */
47 Drupal.behaviors.signupShowAdminListViewSetting = function () {
48 $('div.signup-display-signup-admin-list-setting input.form-radio').click(function () {
49 if (this.value == 'embed-view') {
50 $('div.signup-admin-list-view-settings').show();
51 }
52 else {
53 $('div.signup-admin-list-view-settings').hide();
54 }
55 });
56 };

  ViewVC Help
Powered by ViewVC 1.1.2