Skip to content

Commit

Permalink
Implement multiple slice deletions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jan 18, 2014
1 parent 8ba0774 commit 34063a9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
19 changes: 18 additions & 1 deletion hermes/js/hermes.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,21 @@ HermesCore = {
e.stop();
return;

case 'hermesTimeListDelete':
if (this.view == 'time') {
$('hermesLoadingTime').show();
elt = $('hermesTimeListInternal');
} else if (this.view == 'search') {
$('hermesLoadingSearch').show();
elt = $('hermesSearchListInternal');
}
elt.select('.hermesSelectedSlice').each(function(s) {
this.pendingDeletes.push(s.up());
}.bind(this));
RedBox.showHtml($('hermesDeleteDiv').show());
e.stop();
return;

case 'hermesSearchListHeader':
var el = e.element().identify();
if (el == 'sSortDate' ||
Expand Down Expand Up @@ -483,9 +498,11 @@ HermesCore = {
throw $break;
}.bind(this));
if (haveSelected) {
$('hermesTimeListSubmit').enable()
$('hermesTimeListSubmit').enable();
$('hermesTimeListDelete').enable();
} else {
$('hermesTimeListSubmit').disable();
$('hermesTimeListDelete').disable();
}
} else if (this.view == 'search') {
$('hermesSearchListInternal').select('.hermesSelectedSlice').each(function(s) {
Expand Down
1 change: 1 addition & 0 deletions hermes/templates/dynamic/slices.inc
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
</div>
<div id="hermesTimeListControls" class="horde-form-buttons">
<input id="hermesTimeListSubmit" disabled="disabled" class="horde-button" type="button" value="<?php echo _("Submit Time")?>" />
<input id="hermesTimeListDelete" disabled="disabled" class="horde-delete" type="button" value="<?php echo _("Delete Time")?>" />
</div>
</div>
<!-- End of Time Slice Grid -->
Expand Down

0 comments on commit 34063a9

Please sign in to comment.