diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js index 0f017f299753082df2ec810bac8c0a7661b7bd9b..e6a653f7515f13fd71679fb2d563e19790b72ab2 100644 --- a/themes/bootstrap3/js/lightbox.js +++ b/themes/bootstrap3/js/lightbox.js @@ -55,6 +55,9 @@ VuFind.register('lightbox', function Lightbox() { _modalBody.find('h2:first-of-type') .after('<div class="flash-message alert alert-' + type + '">' + message + '</div>'); } + function close() { + _modal.modal('hide'); + } /** * Update content @@ -80,7 +83,7 @@ VuFind.register('lightbox', function Lightbox() { var href = alerts.find('.download').attr('href'); if (typeof href !== 'undefined') { location.href = href; - _modal.modal('hide'); + close(); } else { showAlert(msgs, 'success'); } @@ -386,6 +389,7 @@ VuFind.register('lightbox', function Lightbox() { ajax: ajax, alert: showAlert, bind: bind, + close: close, flashMessage: flashMessage, reload: reload, render: render, diff --git a/themes/bootstrap3/templates/confirm/confirm.phtml b/themes/bootstrap3/templates/confirm/confirm.phtml index 497c90fe81af5c870682051fba0dfeb64921ff0c..9967bfbd1654ace49b979cf464a40c87188d430f 100644 --- a/themes/bootstrap3/templates/confirm/confirm.phtml +++ b/themes/bootstrap3/templates/confirm/confirm.phtml @@ -5,7 +5,7 @@ <?=$this->flashmessages();?> <div id="popupDetails" class="confirmDialog"> - <form class="pull-left flip" action="<?=$this->escapeHtmlAttr($this->confirm)?>" method="post"> + <form action="<?=$this->escapeHtmlAttr($this->confirm)?>" method="post"> <?php if (isset($this->extras)): ?> <?php foreach ($this->extras as $extra => $value): ?> <?php if (is_array($value)): ?> @@ -18,10 +18,7 @@ <?php endforeach; ?> <?php endif;?> <input class="btn btn-primary" type="submit" name="confirm" value="<?=$this->transEsc('confirm_dialog_yes') ?>" /> + <input class="btn btn-default" type="button" name="cancel" value="<?=$this->transEsc('confirm_dialog_no') ?>" onClick="VuFind.lightbox.close()" /> </form> - <form action="<?=$this->escapeHtmlAttr($this->cancel) ?>" method="post"> - <input class="btn btn-default" type="submit" name="cancel" value="<?=$this->transEsc('confirm_dialog_no') ?>" /> - </form> - <div class="clearer"></div> </div> </div> diff --git a/themes/bootstrap3/templates/myresearch/edit.phtml b/themes/bootstrap3/templates/myresearch/edit.phtml index a1ff334e21c7695be5d7d5441e62abad1a59ecd3..dd5fb3e8e4a2197ef185951152dd3842a4da1a8c 100644 --- a/themes/bootstrap3/templates/myresearch/edit.phtml +++ b/themes/bootstrap3/templates/myresearch/edit.phtml @@ -35,7 +35,7 @@ <textarea class="form-control" id="edit_notes<?=$current['listId'] ?>" name="notes<?=$current['listId'] ?>" rows="3"><?=$this->escapeHtml($current['notes'])?></textarea> </div> <a href="<?=$this->url('userList', ['id' => $current['listId']]) ?>?delete=<?=urlencode($this->driver->getUniqueId())?>&source=<?=urlencode($this->driver->getSourceIdentifier())?>" id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>delete<?=$current['listId'] ?>" data-lightbox> - <i class="fa fa-trash"></i> <?=$this->transEsc('delete') /* TODO: replace with better string */ ?> + <i class="fa fa-trash"></i> <?=$this->transEsc('Delete') ?> </a> </fieldset> <?php endforeach; ?>