Skip to content

Commit

Permalink
Merge pull request #331 from impresso/develop
Browse files Browse the repository at this point in the history
v1.0.1
  • Loading branch information
tvanbeek authored May 21, 2019
2 parents 691ce39 + 78e088d commit 2fab250
Show file tree
Hide file tree
Showing 8 changed files with 349 additions and 351 deletions.
2 changes: 1 addition & 1 deletion src/components/Autocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default {
this.suggestion = false;
this.selected = false;
this.showSuggestions = false;
this.query = '';
this.q = '';
},
select(suggestion) {
this.selected = suggestion;
Expand Down
55 changes: 10 additions & 45 deletions src/components/IssuePage.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
<template lang='html'>
<i-layout id="IssuePage">
<i-layout-section width="300px" class="border-right">
<b-tabs v-model="tabIndex" slot="header" class="mt-2">
<b-tab v-bind:title="$t('tabs.table_of_contents')" active />
<b-tab v-bind:title="$t('tabs.table_of_images')" />
</b-tabs>
<table-of-images
v-show="tabIndex === 1"
v-bind:tableOfContents="tableOfImages"
v-bind:pageUid="pageUid"
v-bind:articleUid="imageUid"
v-on:click="loadArticlePage" />
<div slot="header" class="border-bottom border-tertiary bg-light">
<b-tabs pills class="border-bottom mx-2 pt-2">
<template slot="tabs">
<b-nav-item class="pl-2 active"
active-class='none'>{{$t('table_of_contents')}}</b-nav-item>
</template>
</b-tabs>
</div>
<table-of-contents
v-show="tabIndex === 0"
v-bind:tableOfContents="tableOfContents"
v-bind:pageUid="pageUid"
v-bind:articleUid="articleUid"
Expand Down Expand Up @@ -64,20 +61,16 @@ import IssueViewerText from './modules/IssueViewerText';
import OpenSeadragonViewer from './modules/OpenSeadragonViewer';
import BaseTabs from './base/BaseTabs';
import TableOfContents from './modules/TableOfContents';
import TableOfImages from './modules/TableOfImages';
import ThumbnailSlider from './modules/ThumbnailSlider';
export default {
data: () => ({
handler: new Vue(),
bounds: {},
tab: {},
issue: new Issue(),
tableOfContents: {},
tableOfImages: {},
isLoaded: false,
isDragging: false,
tabIndex: 0,
}),
computed: {
page() {
Expand All @@ -104,9 +97,6 @@ export default {
articleUid() {
return this.$route.params.article_uid || this.firstArticleFromCurrentPage.uid;
},
imageUid() {
return this.$route.params.article_uid || this.firstImageFromCurrentPage.uid;
},
firstArticleFromCurrentPage() {
if (this.tableOfContents.pages) {
for (let i = 0; i < this.tableOfContents.pages.length; i += 1) {
Expand All @@ -117,16 +107,6 @@ export default {
}
return false;
},
firstImageFromCurrentPage() {
if (this.tableOfImages.pages) {
for (let i = 0; i < this.tableOfImages.pages.length; i += 1) {
if (this.tableOfImages.pages[i].uid === this.pageUid) {
return this.tableOfImages.pages[i].articles[0];
}
}
}
return false;
},
},
methods: {
loadArticle(article) {
Expand Down Expand Up @@ -174,7 +154,6 @@ export default {
IssueViewerText,
ThumbnailSlider,
TableOfContents,
TableOfImages,
Icon,
},
watch: {
Expand Down Expand Up @@ -284,10 +263,6 @@ export default {
this.$store.dispatch('issue/LOAD_TABLE_OF_CONTENTS', issueUid).then((tableOfContents) => {
this.tableOfContents = tableOfContents;
});
this.$store.dispatch('issue/LOAD_TABLE_OF_IMAGES', issueUid).then((tableOfImages) => {
this.tableOfImages = tableOfImages;
});
},
},
'$route.params.page_uid': {
Expand Down Expand Up @@ -353,21 +328,11 @@ div.overlay-region{
{
"en": {
"label_display": "Display as",
"tabs": {
"overview": "Overview",
"table_of_contents": "Table of Contents",
"table_of_images": "Images",
"search": "Search"
}
"table_of_contents": "Table of Contents"
},
"nl": {
"label_display": "Toon als",
"tabs": {
"overview": "Overzicht",
"table_of_contents": "Inhoudsopgave",
"table_of_images": "Afbeeldingen",
"search": "Zoek"
}
"table_of_contents": "Inhoudsopgave"
}
}
</i18n>
33 changes: 29 additions & 4 deletions src/components/SearchPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,37 @@
<b-navbar-nav class="ml-auto p-3" v-if="isLoggedIn">
<b-dropdown v-bind:text="$t('query_actions')" size="sm" variant="outline-primary" class="bg-white">
<b-dropdown-item
v-if="selectedItems.length > 0"
class="p-2 small-caps"
v-b-modal.nameSelectionCollection>
<span class="dripicons-checklist pr-1"></span>
{{$tc('add_n_to_collection', selectedItems.length)}}
</b-dropdown-item>
<b-dropdown-item
class="p-2 small-caps"
v-b-modal.nameCollection>
<span class="dripicons-archive pr-3"></span>
<span class="dripicons-archive pr-1"></span>
{{$t("query_add_to_collection")}}
</b-dropdown-item>
<b-dropdown-item v-on:click="exportQueryCsv">
<span class="dripicons-export pr-3"></span>
<b-dropdown-item v-on:click="exportQueryCsv"
class="p-2 small-caps">
<span class="dripicons-export pr-1"></span>
{{$t("query_export_csv")}}
</b-dropdown-item>
</b-dropdown>
</b-navbar-nav>
</b-navbar>


<b-modal hide-footer scrollable
body-class="m-0 p-0"
id="nameSelectionCollection"
ref="nameSelectionCollection"
v-on:shown="nameSelectedCollectionOnShown()"
v-bind:title="$tc('add_n_to_collection', selectedItems.length)">
<collection-add-to-list :items="selectedItems" />
</b-modal>

<b-modal
id="nameCollection"
ref="nameCollection"
Expand Down Expand Up @@ -179,6 +199,7 @@ import SearchResultsListItem from './modules/SearchResultsListItem';
import SearchResultsTilesItem from './modules/SearchResultsTilesItem';
import SearchResultsSummary from './modules/SearchResultsSummary';
import CollectionAddTo from './modules/CollectionAddTo';
import CollectionAddToList from './modules/CollectionAddToList';
import Ellipsis from './modules/Ellipsis';
import SearchPills from './SearchPills';
// const uuid = require('uuid');
Expand Down Expand Up @@ -319,6 +340,9 @@ export default {
},
},
methods: {
nameSelectedCollectionOnShown() {
return this.$store.dispatch('collections/LOAD_COLLECTIONS');
},
getBooleanFilter(filter) {
return !!this.$store.state.search.search.getFilter(filter);
},
Expand Down Expand Up @@ -491,6 +515,7 @@ export default {
'search-facets': SearchFacets,
'search-result-summary': SearchResultsSummary,
CollectionAddTo,
CollectionAddToList,
Ellipsis,
SearchPills,
},
Expand Down Expand Up @@ -578,7 +603,7 @@ div.overlay-region{
"select_all": "Select all items on this page",
"items_selected": "One item selected | {count} items selected",
"Clear Selection": "Clear Selection",
"add_n_to_collection": "Add item to collection | Add {count} items to collection",
"add_n_to_collection": "Add selected item to my collection | Add {count} selected items to my collection",
"query_actions": "Save / Export",
"query_add_to_collection": "Create Collection from Search Results",
"Collection_Name" : "Collection Name",
Expand Down
4 changes: 4 additions & 0 deletions src/components/TheHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,10 @@ $clr-grey-800: #c6ccd2;
.pt-1px {
padding-top: 1px;
}
.custom-control-input {
width: 0;
height: 0;
}
.custom-radio > .custom-control-label::before {
border: inherit;
outline: inherit;
Expand Down
Loading

0 comments on commit 2fab250

Please sign in to comment.