Skip to content
Snippets Groups Projects
Commit 6d601f76 authored by Henrik Askjer's avatar Henrik Askjer
Browse files

remove old code

parent 01b9cc0e
No related branches found
No related tags found
No related merge requests found
...@@ -42,17 +42,7 @@ ...@@ -42,17 +42,7 @@
</v-list> </v-list>
</v-menu> </v-menu>
<v-divider vertical v-if="$store.state.showSearchToolbar"/> <v-divider vertical/>
<v-menu allowOverflow: true v-if="$store.state.showSearchToolbar">
<template v-slot:activator="{ on, attrs }">
<v-btn min-width="0px" plain depressed v-bind="attrs" v-on="on" color = "primary" text><span v-if="$vuetify.breakpoint.mdAndUp">{{$parent.pos_selected.label}}</span><v-icon>expand_more</v-icon></v-btn>
</template>
<v-list>
<v-list-item active-class="v-list-item--active" :class="$parent.pos_selected.tag == item.tag ? 'v-list-item--active' : ''" v-for="item in $parent.pos" :key="item.tag" @click="$parent.update_pos(item)">
<v-list-item-title >{{ item.label }}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu><v-divider vertical/>
<v-dialog max-width="1200" width="1200" v-model="menuDialog" hide-overlay :fullscreen="$vuetify.breakpoint.mobile" <v-dialog max-width="1200" width="1200" v-model="menuDialog" hide-overlay :fullscreen="$vuetify.breakpoint.mobile"
:close-on-content-click="false" transition="dialog-top-transition"> :close-on-content-click="false" transition="dialog-top-transition">
<template v-slot:activator="{ on, attrs }"> <template v-slot:activator="{ on, attrs }">
......
...@@ -2,34 +2,6 @@ ...@@ -2,34 +2,6 @@
<main> <main>
<div class="search_container"> <div class="search_container">
<div class="top_bar" fluid > <div class="top_bar" fluid >
<div class="lang_select_container">
<v-radio-group row v-model="lang" @change="update_lang_form" v-if="settings.show_radio_buttons">
<template v-slot:label tabindex="1">
<span aria-label="Vis resultat i begge ordbøkene eller bruk radioknapp for bokmålsordboka eller radioknapp for nynorskordboka">VIS</span>
</template>
<v-radio value="bm,nn" color="primary">
<template v-slot:label>
<span>
begge{{$vuetify.breakpoint.smAndDown ? '' : ' ordbøkene'}}
</span>
</template>
</v-radio>
<v-radio value="bm" color="primary">
<template v-slot:label>
<span>
{{$vuetify.breakpoint.xs ? 'bm' : 'bokmål (bm)'}}
</span>
</template>
</v-radio>
<v-radio value="nn" color="primary">
<template v-slot:label>
<span>
{{$vuetify.breakpoint.xs ? 'nn' : 'nynorsk (nn)'}}
</span>
</template>
</v-radio>
</v-radio-group>
</div>
</div> </div>
<Autocomplete v-on:submit="select_result" :api="get_search_endpoint"> <Autocomplete v-on:submit="select_result" :api="get_search_endpoint">
</Autocomplete> </Autocomplete>
...@@ -133,34 +105,6 @@ function navigate_to_article(self, source) { ...@@ -133,34 +105,6 @@ function navigate_to_article(self, source) {
}) })
} }
/*
function navigate_to_search(self, query) {
axios.get(self.api_pref + 'search?q=' + query, { headers: {"x-api-key":"ZkYiyRVXxH86ijsvhx3cH4SY5Iik2ijI3BKVJGMm"}}) // API-key to be removed or reimplemented with a ci-variable with the new API
.then(function(response){
self.search_results = response.data
if (! self.search_results.length) {
self.error = `Søk på «${query}» gir ingen treff i ${dicts[self.lang]}. Søk med * inne i ordet dersom du er usikker på skrivemåten. Bruk knappen «begge ordbøkene» om du har søkt i feil ordbok.`
} else {
self.error = null
}
})
.catch(function(error){
self.articles = null
if (error.response && error.response.status == 400) {
self.error = "Søkeuttrykket inneholder feil"
} else if (error.response) {
self.error = "Noe gikk galt på serversiden"
} else {
self.error = "Nettverksproblemer, prøv igjen"
}
})
.then(function(_){
self.waiting_for_articles = false
history.replaceState({article: self.article, search_results: self.search_results, lang: self.lang, error: self.error}, '')
})
}
*/
function navigate_to_query(self, word) { function navigate_to_query(self, word) {
self.waiting_for_articles = true self.waiting_for_articles = true
let query = self.event ? self.event : {q: word} let query = self.event ? self.event : {q: word}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment