Skip to content

Commit

Permalink
Used a class instead of a data to select values with batch process.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-KM committed Apr 14, 2019
1 parent 6661580 commit eac2e70
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion application/asset/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ var Omeka = {
},

manageSelectedActions: function() {
var selectedOptions = $('#batch-form .batch-inputs [data-select=selected]');
var selectedOptions = $('#batch-form .batch-inputs .batch-selected');
if ($('.batch-edit td input[type="checkbox"]:checked').length > 0) {
selectedOptions.removeAttr('disabled');
} else {
Expand Down
8 changes: 4 additions & 4 deletions application/view/omeka/admin/item-set/browse.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ $userIsAllowedBatchDelete = $this->userIsAllowed('Omeka\Api\Adapter\ItemSetAdapt
<select class="batch-actions-select" name="batch_action" aria-label="<?php echo $translate('Batch actions'); ?>">
<option value="default"><?php echo $translate('Batch actions'); ?></option>
<?php if ($userIsAllowedBatchUpdate): ?>
<option value="update-selected" data-select="selected" disabled><?php echo $translate('Edit selected'); ?></option>
<option value="update-all" data-select="all"><?php echo $translate('Edit all'); ?></option>
<option value="update-selected" class="batch-selected" disabled><?php echo $translate('Edit selected'); ?></option>
<option value="update-all"><?php echo $translate('Edit all'); ?></option>
<?php endif; ?>
<?php if ($userIsAllowedBatchDelete): ?>
<option value="delete-selected" data-select="selected" disabled><?php echo $translate('Delete selected'); ?></option>
<option value="delete-all" data-select="all"><?php echo $translate('Delete all'); ?></option>
<option value="delete-selected" class="batch-selected" disabled><?php echo $translate('Delete selected'); ?></option>
<option value="delete-all"><?php echo $translate('Delete all'); ?></option>
<?php endif; ?>
</select>
<div class="batch-actions">
Expand Down
8 changes: 4 additions & 4 deletions application/view/omeka/admin/item/browse.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ $userIsAllowedBatchDelete = $this->userIsAllowed('Omeka\Api\Adapter\ItemAdapter'
<select class="batch-actions-select" name="batch_action" aria-label="<?php echo $translate('Batch actions'); ?>">
<option value="default"><?php echo $translate('Batch actions'); ?></option>
<?php if ($userIsAllowedBatchUpdate): ?>
<option value="update-selected" data-select="selected" disabled><?php echo $translate('Edit selected'); ?></option>
<option value="update-all" data-select="all"><?php echo $translate('Edit all'); ?></option>
<option value="update-selected" class="batch-selected" disabled><?php echo $translate('Edit selected'); ?></option>
<option value="update-all"><?php echo $translate('Edit all'); ?></option>
<?php endif; ?>
<?php if ($userIsAllowedBatchDelete): ?>
<option value="delete-selected" data-select="selected" disabled><?php echo $translate('Delete selected'); ?></option>
<option value="delete-all" data-select="all"><?php echo $translate('Delete all'); ?></option>
<option value="delete-selected" class="batch-selected" disabled><?php echo $translate('Delete selected'); ?></option>
<option value="delete-all"><?php echo $translate('Delete all'); ?></option>
<?php endif; ?>
</select>
<div class="batch-actions">
Expand Down
8 changes: 4 additions & 4 deletions application/view/omeka/admin/media/browse.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ $userIsAllowedBatchDelete = $this->userIsAllowed('Omeka\Api\Adapter\MediaAdapter
<select class="batch-actions-select" name="batch_action" aria-label="<?php echo $translate('Batch actions'); ?>">
<option value="default"><?php echo $translate('Batch actions'); ?></option>
<?php if ($userIsAllowedBatchUpdate): ?>
<option value="update-selected" data-select="selected" disabled><?php echo $translate('Edit selected'); ?></option>
<option value="update-all" data-select="all"><?php echo $translate('Edit all'); ?></option>
<option value="update-selected" class="batch-selected" disabled><?php echo $translate('Edit selected'); ?></option>
<option value="update-all"><?php echo $translate('Edit all'); ?></option>
<?php endif; ?>
<?php if ($userIsAllowedBatchDelete): ?>
<option value="delete-selected" data-select="selected" disabled><?php echo $translate('Delete selected'); ?></option>
<option value="delete-all" data-select="all"><?php echo $translate('Delete all'); ?></option>
<option value="delete-selected" class="batch-selected" disabled><?php echo $translate('Delete selected'); ?></option>
<option value="delete-all"><?php echo $translate('Delete all'); ?></option>
<?php endif; ?>
</select>
<div class="batch-actions">
Expand Down

0 comments on commit eac2e70

Please sign in to comment.