|
|
|
|
|
|
|
|
@typing="getFilteredTags" |
|
|
@typing="getFilteredTags" |
|
|
@input="saveTagsToArray"> |
|
|
@input="saveTagsToArray"> |
|
|
</b-taginput>--> |
|
|
</b-taginput>--> |
|
|
|
|
|
<button @click="clear">x</button> |
|
|
</b-field> |
|
|
</b-field> |
|
|
</form> |
|
|
</form> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
router, |
|
|
router, |
|
|
el: '#api', |
|
|
el: '#api', |
|
|
data: function() { |
|
|
data: function() { |
|
|
return{ |
|
|
|
|
|
|
|
|
return { |
|
|
searchtext: "", |
|
|
searchtext: "", |
|
|
|
|
|
isSearchActiv: false, |
|
|
selected: [], |
|
|
selected: [], |
|
|
taglist: dat, |
|
|
taglist: dat, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
search: function() { |
|
|
search: function() { |
|
|
|
|
|
this.isSearchActiv = true; |
|
|
console.log("Searchtext: " +this.searchtext.replace(/#/g,'')); |
|
|
console.log("Searchtext: " +this.searchtext.replace(/#/g,'')); |
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
url: "api/msg/search/" + this.searchtext.replace(/#/g, ''), |
|
|
url: "api/msg/search/" + this.searchtext.replace(/#/g, ''), |
|
|
|
|
|
|
|
|
console.log("searching: err: " + e + f + g); |
|
|
console.log("searching: err: " + e + f + g); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
list_messages: function () { |
|
|
|
|
|
$.ajax({url: "api/msg/ids", method: "GET"}) |
|
|
|
|
|
.done(jd => { |
|
|
|
|
|
// NICHT SO wg. Vue: _messagelist = jd; |
|
|
|
|
|
_messagelist.splice(0, _messagelist.length); |
|
|
|
|
|
_messagelist.push.apply(_messagelist, jd); |
|
|
|
|
|
//console.log("jd: "+jd); |
|
|
|
|
|
for (var e in jd) { |
|
|
|
|
|
if (!_messages[jd[e]]) { |
|
|
|
|
|
get_insert_message(jd[e]); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}).fail(function (e, f, g) { |
|
|
|
|
|
console.log("list_msg: err: " + e + f + g); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
getFilteredTags(text) { |
|
|
getFilteredTags(text) { |
|
|
this.taglist = dat.filter((option) => { |
|
|
this.taglist = dat.filter((option) => { |
|
|
return option |
|
|
return option |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}).fail(function (e, f, g) { |
|
|
}).fail(function (e, f, g) { |
|
|
console.log("err: " + e + f + g); |
|
|
console.log("err: " + e + f + g); |
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
clear: function() { |
|
|
|
|
|
console.log("clear"); |
|
|
|
|
|
|
|
|
|
|
|
this.isSearchActiv = false; |
|
|
|
|
|
this.searchtext = ""; |
|
|
|
|
|
this.list_messages(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
mounted: function () { |
|
|
mounted: function () { |
|
|
this.search(); |
|
|
|
|
|
|
|
|
//this.search(); |
|
|
this.list_tags(); |
|
|
this.list_tags(); |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |