Merge remote-tracking branch 'origin/developer' into developer

This commit is contained in:
Edwina Barbalan
2019-07-19 11:54:26 +02:00
3 changed files with 39 additions and 6 deletions
+31 -4
View File
@@ -120,6 +120,7 @@
@typing="getFilteredTags"
@input="saveTagsToArray">
</b-taginput>-->
<button @click="clear">x</button>
</b-field>
</form>
</div>
@@ -161,8 +162,9 @@
router,
el: '#api',
data: function() {
return{
return {
searchtext: "",
isSearchActiv: false,
selected: [],
taglist: dat,
};
@@ -179,6 +181,7 @@
},
methods: {
search: function() {
this.isSearchActiv = true;
console.log("Searchtext: " +this.searchtext.replace(/#/g,''));
$.ajax({
url: "api/msg/search/" + this.searchtext.replace(/#/g, ''),
@@ -197,6 +200,22 @@
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) {
this.taglist = dat.filter((option) => {
return option
@@ -224,12 +243,20 @@
}
}).fail(function (e, f, g) {
console.log("err: " + e + f + g);
});
}
});
},
clear: function() {
console.log("clear");
this.isSearchActiv = false;
this.searchtext = "";
this.list_messages();
},
},
mounted: function () {
this.search();
//this.search();
this.list_tags();
},
});