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