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 May 24, 2018
1 parent 1ffb0ec commit 74d1dc7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 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
10 changes: 5 additions & 5 deletions application/view/omeka/admin/item-set/browse.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ $sortHeadings = [
<div class="batch-inputs">
<select class="batch-actions-select" name="batch_action" aria-label="<?php echo $this->translate('Batch actions'); ?>">
<option value="default"><?php echo $this->translate('Batch actions'); ?></option>
<option value="update-selected" data-select="selected" disabled="disabled"><?php echo $this->translate('Edit selected'); ?></option>
<option value="update-all" data-select="all"><?php echo $this->translate('Edit all'); ?></option>
<option value="delete-selected" data-select="selected" disabled="disabled"><?php echo $this->translate('Delete selected'); ?></option>
<option value="delete-all" data-select="all"><?php echo $this->translate('Delete all'); ?></option>
<option value="update-selected" class="batch-selected" disabled><?php echo $this->translate('Edit selected'); ?></option>
<option value="update-all"><?php echo $this->translate('Edit all'); ?></option>
<option value="delete-selected" class="batch-selected" disabled><?php echo $this->translate('Delete selected'); ?></option>
<option value="delete-all"><?php echo $this->translate('Delete all'); ?></option>
</select>
<div class="batch-actions">
<button type="button" class="default active" disabled="disabled"><?php echo $this->translate('Go'); ?></button>
<button type="button" class="default active" disabled><?php echo $this->translate('Go'); ?></button>
<input type="submit" class="update-selected" value="<?php echo $this->translate('Go'); ?>" formaction="<?php echo $escape($this->url(null, ['action' => 'batch-edit'], true)); ?>">
<input type="submit" class="update-all" value="<?php echo $this->translate('Go'); ?>" formaction="<?php echo $escape($this->url(null, ['action' => 'batch-edit-all'], true)); ?>">
<input type="hidden" name="query" class="batch-query" value="<?php echo $escape(json_encode($this->params()->fromQuery())); ?>">
Expand Down
10 changes: 5 additions & 5 deletions application/view/omeka/admin/item/browse.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ $sortHeadings = [
<div class="batch-inputs">
<select class="batch-actions-select" name="batch_action" aria-label="<?php echo $this->translate('Batch actions'); ?>">
<option value="default"><?php echo $this->translate('Batch actions'); ?></option>
<option value="update-selected" data-select="selected" disabled="disabled"><?php echo $this->translate('Edit selected'); ?></option>
<option value="update-all" data-select="all"><?php echo $this->translate('Edit all'); ?></option>
<option value="delete-selected" data-select="selected" disabled="disabled"><?php echo $this->translate('Delete selected'); ?></option>
<option value="delete-all" data-select="all"><?php echo $this->translate('Delete all'); ?></option>
<option value="update-selected" class="batch-selected" disabled><?php echo $this->translate('Edit selected'); ?></option>
<option value="update-all"><?php echo $this->translate('Edit all'); ?></option>
<option value="delete-selected" class="batch-selected" disabled><?php echo $this->translate('Delete selected'); ?></option>
<option value="delete-all"><?php echo $this->translate('Delete all'); ?></option>
</select>
<div class="batch-actions">
<button type="button" class="default active" disabled="disabled"><?php echo $this->translate('Go'); ?></button>
<button type="button" class="default active" disabled><?php echo $this->translate('Go'); ?></button>
<input type="submit" class="update-selected" value="<?php echo $this->translate('Go'); ?>" formaction="<?php echo $escape($this->url(null, ['action' => 'batch-edit'], true)); ?>">
<input type="submit" class="update-all" value="<?php echo $this->translate('Go'); ?>" formaction="<?php echo $escape($this->url(null, ['action' => 'batch-edit-all'], true)); ?>">
<input type="hidden" name="query" class="batch-query" value="<?php echo $escape(json_encode($this->params()->fromQuery())); ?>">
Expand Down
10 changes: 5 additions & 5 deletions application/view/omeka/admin/media/browse.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ $sortHeadings = [
<select class="batch-actions-select" name="batch_action" aria-label="<?php echo $this->translate('Batch actions'); ?>">
<option value="default"><?php echo $this->translate('Batch actions'); ?></option>
<?php if ($userIsAllowedBatchUpdate): ?>
<option value="update-selected" data-select="selected" disabled="disabled"><?php echo $this->translate('Edit selected'); ?></option>
<option value="update-all" data-select="all"><?php echo $this->translate('Edit all'); ?></option>
<option value="update-selected" class="batch-selected" disabled><?php echo $this->translate('Edit selected'); ?></option>
<option value="update-all"><?php echo $this->translate('Edit all'); ?></option>
<?php endif; ?>
<?php if ($userIsAllowedBatchDelete): ?>
<option value="delete-selected" data-select="selected" disabled="disabled"><?php echo $this->translate('Delete selected'); ?></option>
<option value="delete-all" data-select="all"><?php echo $this->translate('Delete all'); ?></option>
<option value="delete-selected" class="batch-selected" disabled><?php echo $this->translate('Delete selected'); ?></option>
<option value="delete-all"><?php echo $this->translate('Delete all'); ?></option>
<?php endif; ?>
</select>
<div class="batch-actions">
<button type="button" class="default active" disabled="disabled"><?php echo $this->translate('Go'); ?></button>
<button type="button" class="default active" disabled><?php echo $this->translate('Go'); ?></button>
<?php if ($userIsAllowedBatchUpdate): ?>
<input type="submit" class="update-selected" value="<?php echo $this->translate('Go'); ?>" formaction="<?php echo $escape($this->url(null, ['action' => 'batch-edit'], true)); ?>">
<input type="submit" class="update-all" value="<?php echo $this->translate('Go'); ?>" formaction="<?php echo $escape($this->url(null, ['action' => 'batch-edit-all'], true)); ?>">
Expand Down

0 comments on commit 74d1dc7

Please sign in to comment.