/[drupal]/contributions/modules/skeleton/skeleton-admin.js
ViewVC logotype

Diff of /contributions/modules/skeleton/skeleton-admin.js

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

revision 1.2, Tue Jan 27 20:06:14 2009 UTC revision 1.3, Thu Jul 16 18:12:35 2009 UTC
# Line 9  $(document).ready(function() { Line 9  $(document).ready(function() {
9      }      }
10      return false;      return false;
11    });    });
 });  
12    });
13    
14    /**
15     * Add a checkbox to lists of nodes on the Syncronize page to select or clear
16     * all checkboxes at once.
17     */
18    Drupal.behaviors.skeletonAutoCheckbox = function(context) {
19      var strings = { 'selectAll': Drupal.t('Select all rows in this table'), 'selectNone': Drupal.t('Deselect all rows in this table') };
20      $('#skeleton-sync-content-form .form-item .form-checkboxes:not(.skeletonAutoCheckbox-processed)').prepend(
21        $('<label></label>').html(Drupal.t('Select all nodes')).prepend($('<input type="checkbox" class="form-checkbox"/>').attr('title', strings.selectAll).click(function() {
22          if (this.checked) {
23            $('#skeleton-sync-content-form .skeletonAutoCheckbox-processed input[type=checkbox]').attr('checked', true);
24          }
25          else {
26            $('#skeleton-sync-content-form .skeletonAutoCheckbox-processed input[type=checkbox]').attr('checked', false);
27          }
28        }))
29      );
30    
31      $('#skeleton-sync-content-form .form-item .form-checkboxes').addClass('skeletonAutoCheckbox-processed');
32    
33      $('#skeleton-sync-add-template-form .form-item .form-checkboxes:not(.skeletonAutoCheckbox-processed)').prepend(
34        $('<label></label>').html(Drupal.t('Select all nodes')).prepend($('<input type="checkbox" class="form-checkbox"/>').attr('title', strings.selectAll).click(function() {
35          if (this.checked) {
36            $('#skeleton-sync-add-template-form .skeletonAutoCheckbox-processed input[type=checkbox]').attr('checked', true);
37          }
38          else {
39            $('#skeleton-sync-add-template-form .skeletonAutoCheckbox-processed input[type=checkbox]').attr('checked', false);
40          }
41        }))
42      );
43      $('#skeleton-sync-add-template-form .form-item .form-checkboxes').addClass('skeletonAutoCheckbox-processed');
44    
45      $('#skeleton-sync-delete-template-form .form-item .form-checkboxes:not(.skeletonAutoCheckbox-processed)').prepend(
46        $('<label></label>').html(Drupal.t('Select all nodes')).prepend($('<input type="checkbox" class="form-checkbox"/>').attr('title', strings.selectAll).click(function() {
47          if (this.checked) {
48            $('#skeleton-sync-delete-template-form .skeletonAutoCheckbox-processed input[type=checkbox]').attr('checked', true);
49          }
50          else {
51            $('#skeleton-sync-delete-template-form .skeletonAutoCheckbox-processed input[type=checkbox]').attr('checked', false);
52          }
53        }))
54      );
55      $('#skeleton-sync-delete-template-form .form-item .form-checkboxes').addClass('skeletonAutoCheckbox-processed');
56    }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.2