Skip to content
Snippets Groups Projects
Commit 2d8deba9 authored by Alexander Purr's avatar Alexander Purr Committed by Dorian Merz
Browse files

refs #16833 [fid_adlr] remove save search icon by disabled one if save request succeeded

parent 01a1dc00
No related merge requests found
...@@ -189,6 +189,13 @@ VuFind.register('lightbox', function Lightbox() { ...@@ -189,6 +189,13 @@ VuFind.register('lightbox', function Lightbox() {
VuFind.refreshPage(); VuFind.refreshPage();
return; return;
} }
/* remove save search icon by disabled one if save request succeeded */
if (_originalUrl.match(/SaveSearch\?save=/)) {
$("#save-search").toggleClass("hidden");
$("#saved-search").toggleClass("hidden");
}
render(content); render(content);
}) })
.fail(function lbAjaxFail(deferred, errorType, msg) { .fail(function lbAjaxFail(deferred, errorType, msg) {
......
...@@ -90,4 +90,6 @@ email_search_information = "Sie können hier die aktuelle Suche per E-Mail verse ...@@ -90,4 +90,6 @@ email_search_information = "Sie können hier die aktuelle Suche per E-Mail verse
#16750 SwitchTab recommendation #16750 SwitchTab recommendation
nohit_change_tab = Sie haben nur in der Kategorie <b>%%activeTab%%</b> gesucht. Wählen Sie bei Bedarf eine andere Kategorie oder nutzen Sie die Facettierung: nohit_change_tab = Sie haben nur in der Kategorie <b>%%activeTab%%</b> gesucht. Wählen Sie bei Bedarf eine andere Kategorie oder nutzen Sie die Facettierung:
switchtab_headline = "Kategorie" switchtab_headline = "Kategorie"
\ No newline at end of file
save_search_saved_in_account = Diese Suchanfrage ist bereits in Ihrem Konto gespeichert.
\ No newline at end of file
...@@ -92,4 +92,6 @@ email_search_information = "Here you can send the current search by e-mail. Opti ...@@ -92,4 +92,6 @@ email_search_information = "Here you can send the current search by e-mail. Opti
#16750 SwitchTab recommendation #16750 SwitchTab recommendation
nohit_change_tab = You have searched only in the category <b>%%activeTab%%</b>. If necessary, choose another category or use the faceting: nohit_change_tab = You have searched only in the category <b>%%activeTab%%</b>. If necessary, choose another category or use the faceting:
switchtab_headline = "Category" switchtab_headline = "Category"
\ No newline at end of file
save_search_saved_in_account = This search request is already saved in your account.
\ No newline at end of file
...@@ -427,6 +427,10 @@ a { ...@@ -427,6 +427,10 @@ a {
float: right; float: right;
font-size: calc(#{$font-size-base} * 1.5); font-size: calc(#{$font-size-base} * 1.5);
} }
&.disabled {
color: $asphalt-dark;
}
} }
// ICONS - END // ICONS - END
......
...@@ -98,13 +98,18 @@ $this->headScript()->appendFile("check_save_statuses_adlr.js"); ...@@ -98,13 +98,18 @@ $this->headScript()->appendFile("check_save_statuses_adlr.js");
</span> </span>
<span> <span>
<?php if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?> <?php if ($this->accountCapabilities()->getSavedSearchSetting() === 'enabled'): ?>
<?php if (is_numeric($this->results->getSearchId())): ?> <?php if (is_numeric($this->results->getSearchId())): ?>
<?php if ($this->results->isSavedSearch()): ?> <?php if($this->auth()->isLoggedIn()): ?>
<a data-lightbox href="<?=$this->url('myresearch-savesearch')?>?delete=<?=urlencode($this->results->getSearchId())?>"><i class="fa fa-remove" aria-hidden="true"></i></a> <?php if ($this->results->isSavedSearch()): ?>
<?php else: ?> <i class="icon icon-download icon-1.5x disabled" title="<?=$this->transEsc('save_search_saved_in_account')?>" aria-hidden="true"></i>
<?php else: ?>
<a id="save-search" data-lightbox href="<?=$this->url('myresearch-savesearch')?>?save=<?=urlencode($this->results->getSearchId())?>"><i class="icon icon-download icon-1.5x" aria-hidden="true"></i></a>
<i id="saved-search" class="icon icon-download icon-1.5x disabled hidden" title="<?=$this->transEsc('save_search_saved_in_account')?>" aria-hidden="true"></i>
<?php endif; ?>
<?php else: ?>
<a data-lightbox href="<?=$this->url('myresearch-savesearch')?>?save=<?=urlencode($this->results->getSearchId())?>"><i class="icon icon-download icon-1.5x" aria-hidden="true"></i></a> <a data-lightbox href="<?=$this->url('myresearch-savesearch')?>?save=<?=urlencode($this->results->getSearchId())?>"><i class="icon icon-download icon-1.5x" aria-hidden="true"></i></a>
<?php endif; ?>
<?php endif; ?> <?php endif; ?>
<?php endif; ?>
<?php endif; ?> <?php endif; ?>
</span> </span>
<span> <span>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment