extended search

This commit is contained in:
2019-07-21 14:12:16 +02:00
parent 70befa7c4d
commit 5a4faca86f
4 changed files with 38 additions and 39 deletions
+14 -15
View File
@@ -182,11 +182,6 @@
<script>
var isSearchActive = false;
var tagArray = ["lorem"];
const dat = [
'th',
'efi',
'wichtig',
];
</script>
@@ -211,7 +206,7 @@
searchtext: "",
//isSearchActiv: false,
selected: [],
taglist: dat,
taglist: data,
};
},
computed: {
@@ -227,7 +222,7 @@
methods: {
getFilteredTags(text) {
this.taglist = dat.filter((option) => {
this.taglist = data.filter((option) => {
return option
.toString()
.toLowerCase()
@@ -240,7 +235,8 @@
console.info(tagArray);
},
search: function() {
searching(this.searchtext);
searching(this.searchtext);
},
list_messages: function() {
messages();
@@ -252,12 +248,14 @@
})
.done(jd => {
// NICHT SO wg. Vue: _messagelist = jd;
_taglist.splice(0, _taglist.length);
_taglist.push.apply(_taglist, jd);
console.log("tag: jd: " + jd);
for (var e in jd) {
if (!_tags[jd[e]]) {
get_insert_tag(jd[e]);
if(data == ""){
_taglist.splice(0, _taglist.length);
_taglist.push.apply(_taglist, jd);
console.log("tag: jd: " + jd);
for (var e in jd) {
if (!_tags[jd[e]]) {
get_insert_tag(jd[e]);
}
}
}
}).fail(function(e, f, g) {
@@ -285,7 +283,7 @@
url: "api/tag/" + id,
method: "GET"
}).done(function(tag) {
dat.push("#" + tag.name);
data.push("#" + tag.name);
console.log("it worked!");
}).fail(function(e, f, g) {
console.log("cannot load " + id + ".json: " + e + f + g);
@@ -300,6 +298,7 @@
method: "GET"
}).done(jd => {
// NICHT SO wg. Vue: _messagelist = jd;
router.push('/home');
_messagelist.splice(0, _messagelist.length);
_messagelist.push.apply(_messagelist, jd);
//console.log("jd: "+jd);