This commit is contained in:
@@ -45,53 +45,25 @@
|
||||
|
||||
<template v-for="(item, i) in results">
|
||||
<v-subheader :key="i" v-if="item.subheader"
|
||||
><v-icon x-large>{{ item.icon }}</v-icon
|
||||
>{{ item.subheader }}</v-subheader
|
||||
><v-icon large class="mr-1">{{ item.icon }}</v-icon
|
||||
><span class="title">{{ item.subheader }}</span></v-subheader
|
||||
>
|
||||
<template>
|
||||
<v-list-item link :key="i">
|
||||
<!-- <v-list-item-avatar>
|
||||
|
||||
</v-list-item-avatar> -->
|
||||
|
||||
<v-list-item-content>
|
||||
<v-list-item-title
|
||||
@click="openItem"
|
||||
v-text="item.name"
|
||||
></v-list-item-title>
|
||||
</v-list-item-content>
|
||||
|
||||
<v-list-item-action>
|
||||
<v-btn icon @click="getExcerpt">
|
||||
<v-icon color="grey lighten-1" large
|
||||
>fa-info-circle</v-icon
|
||||
>
|
||||
</v-btn>
|
||||
</v-list-item-action>
|
||||
</v-list-item>
|
||||
</template>
|
||||
<!-- <template v-else> v-if="$vuetify.breakpoint.smAndUp"
|
||||
<v-list-item link :key="i">
|
||||
<v-list-item-avatar>
|
||||
<v-icon>{{ item.icon }}</v-icon>
|
||||
</v-list-item-avatar>
|
||||
|
||||
<v-list-item-content>
|
||||
<v-list-item-title
|
||||
@click="openItem"
|
||||
v-text="item.name"
|
||||
></v-list-item-title>
|
||||
</v-list-item-content>
|
||||
|
||||
<v-list-item-action>
|
||||
<v-btn icon @click="getExcerpt">
|
||||
<v-icon color="grey lighten-1" large
|
||||
>fa-info-circle</v-icon
|
||||
>
|
||||
</v-btn>
|
||||
</v-list-item-action>
|
||||
</v-list-item>
|
||||
</template> -->
|
||||
<v-list-item link :key="i">
|
||||
<v-list-item-content>
|
||||
<v-list-item-title
|
||||
@click="openItem"
|
||||
v-text="item.name"
|
||||
></v-list-item-title>
|
||||
</v-list-item-content>
|
||||
<v-list-item-action>
|
||||
<v-btn icon @click="getExcerpt">
|
||||
<v-icon color="grey lighten-1" large
|
||||
>fa-info-circle</v-icon
|
||||
>
|
||||
</v-btn>
|
||||
</v-list-item-action>
|
||||
</v-list-item>
|
||||
</template>
|
||||
</v-list>
|
||||
</v-card>
|
||||
@@ -229,15 +201,27 @@ export default {
|
||||
let lastType = -1;
|
||||
for (let i = 0; i < res.data.searchResults.length; i++) {
|
||||
let item = res.data.searchResults[i];
|
||||
|
||||
if (item.type != lastType) {
|
||||
//change of type, set subheader props
|
||||
item["subheader"] = item.type;
|
||||
let tsub = window.$gz._.find(vm.selectLists.objectTypes, [
|
||||
"id",
|
||||
item.type
|
||||
]);
|
||||
|
||||
if (tsub != null) {
|
||||
item["subheader"] = tsub.name;
|
||||
} else {
|
||||
item["subheader"] = "TYPE " + item.type;
|
||||
}
|
||||
|
||||
item["icon"] = window.$gz.util.iconForCoreType(item.type);
|
||||
lastType = item.type;
|
||||
}
|
||||
|
||||
newResults.push(item);
|
||||
}
|
||||
console.log(newResults);
|
||||
vm.results = newResults;
|
||||
|
||||
//Update the form status
|
||||
|
||||
Reference in New Issue
Block a user