| 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 |
};
|