Browse Source

search repaired

master
Senta Mandutz 5 years ago
parent
commit
3478901450
1 changed files with 15 additions and 8 deletions
  1. 15
    8
      public/index.html

+ 15
- 8
public/index.html View File

<div class="om-header-container"> <div class="om-header-container">
<div class="om-header"> <div class="om-header">
<a class="logo-img" href="index.html"><img src="img/app_icon.png" width=45px height=45px></a> <a class="logo-img" href="index.html"><img src="img/app_icon.png" width=45px height=45px></a>
<form class="om-searchbar" @submit.prevent="search">
<form class="om-searchbar" @submit.prevent="search()">
<b-field> <b-field>
<b-taginput
<b-input
type="search"
v-model="searchtext"
icon="magnify"
placeholder="Suche...">
</b-input>
<!--<b-taginput
id="search-text" id="search-text"
type="search" type="search"
v-model="selected" v-model="selected"
autocomplete autocomplete
allow-new:true allow-new:true
icon="magnify" icon="magnify"
placeholder="suche.."
placeholder="Suche.."
@typing="getFilteredTags" @typing="getFilteredTags"
@input="saveTagsToArray"> @input="saveTagsToArray">
</b-taginput>
</b-taginput>-->
</b-field> </b-field>
</form> </form>
</div> </div>
</div> </div>


<script> <script>
var tagArray = [];
var tagArray = ["lorem"];
const dat=[ const dat=[
'th', 'th',
'efi', 'efi',
return{ return{
searchtext: "ipsum", searchtext: "ipsum",
selected: [], selected: [],
taglist: data,
taglist: dat,
}; };
}, },
methods: { methods: {
search: function() { search: function() {
console.log("Searchtext: " +this.searchtext);
console.log("Searchtext: " +this.searchtext + tagArray);
$.ajax({ $.ajax({
url: "api/msg/search/" + this.searchtext, url: "api/msg/search/" + this.searchtext,
method: "GET" method: "GET"
.toLowerCase() .toLowerCase()
.indexOf(text.toLowerCase()) >= 0 .indexOf(text.toLowerCase()) >= 0
}) })
this.search();
}, },
saveTagsToArray: function() { saveTagsToArray: function() {
tagArray = this.selected; tagArray = this.selected;


}, },
mounted: function () { mounted: function () {
//this.search();
this.search();
this.list_tags(); this.list_tags();
}, },
}); });

Loading…
Cancel
Save