Merge remote-tracking branch 'origin/developer' into developer
This commit is contained in:
commit
d66be879cd
5
mong.js
5
mong.js
@ -82,3 +82,8 @@ db.messages.insert(
|
||||
}
|
||||
]
|
||||
)
|
||||
|
||||
db.tags.insert([{"name":"Lorem"},{"name":"fugiat"},{"name":"aliqua"},{"name":"consequat"},{"name":"mollit"},{"name":"a
|
||||
et"},{"name":"consectetur"},{"name":"dolore"},{"name":"nulla"},{"name":"tempor"},{"name":"veniam"},{"name":"ipsum"},{"n
|
||||
me":"adipisicing"},{"name":"qui"},{"name":"sint"},{"name":"ullamco"},{"name":"incididunt"},{"name":"nisi"},{"name":"sit
|
||||
},{"name":"minim"},{"name":"labore"},{"name":"sunt"},{"name":"in"}])
|
||||
|
@ -120,6 +120,7 @@
|
||||
@typing="getFilteredTags"
|
||||
@input="saveTagsToArray">
|
||||
</b-taginput>-->
|
||||
<button @click="clear">x</button>
|
||||
</b-field>
|
||||
</form>
|
||||
</div>
|
||||
@ -163,6 +164,7 @@
|
||||
data: function() {
|
||||
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, ''),
|
||||
@ -196,6 +199,22 @@
|
||||
}).fail(function(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) {
|
||||
this.taglist = dat.filter((option) => {
|
||||
@ -225,11 +244,19 @@
|
||||
}).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();
|
||||
},
|
||||
});
|
||||
|
@ -5,7 +5,8 @@ Vue.component('MsgCard', {
|
||||
<img src="favicon.ico" width=20px height=20px>
|
||||
</h6>
|
||||
{{ msg.message }}<br><br>
|
||||
<a v-for="tag in msg.tag" href="#">#{{ tag }} </a>
|
||||
<!--<a v-for="tag in msg.tag" href="#">#{{ tag }} </a>-->
|
||||
<b-button class="tags" type="is-text" v-for="tag in msg.tag>#{{ tag }} </b-button>
|
||||
</p>
|
||||
<div class="om-card-footer"> <div class="om-user-line">
|
||||
<i class="material-icons">account_circle</i>
|
||||
|
Loading…
x
Reference in New Issue
Block a user