/[drupal]/contributions/modules/input_format_permissions/input_format_permissions.js
ViewVC logotype

Contents of /contributions/modules/input_format_permissions/input_format_permissions.js

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


Revision 1.1 - (show annotations) (download) (as text)
Mon Jan 5 22:33:49 2009 UTC (10 months, 3 weeks ago) by mannkind
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, DRUPAL-6--1-1-BETA1, HEAD
Branch point for: DRUPAL-6--1
File MIME type: text/javascript
Initial commit of input_format_permissions. The module allows for the control of Input Format Permissions via the standard Drupal Permissions screen
1 $(function() {
2 // Find the default format setting, and encode_form_id the name
3 var format = Drupal.settings.input_format_permissions_default_filter;
4 format = format.replace(/\]\[|\_|\s/g, '-');
5
6 // Find the checkboxes that represent the format
7 var checkboxes = $('input[id*="' + format + '"]');
8
9 // Disable them by default
10 checkboxes.attr('disabled', true);
11
12 // When the submit button is clicked, enable the checkboxes
13 $('#edit-submit').click(function() { checkboxes.attr('disabled', false); });
14 });

  ViewVC Help
Powered by ViewVC 1.1.2