diff --git a/mong.js b/mong.js
index 2cb9c0f..9efff90 100644
--- a/mong.js
+++ b/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"}])
diff --git a/public/index.html b/public/index.html
index 4790382..4bb6dea 100644
--- a/public/index.html
+++ b/public/index.html
@@ -120,6 +120,7 @@
@typing="getFilteredTags"
@input="saveTagsToArray">
-->
+
@@ -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();
},
});
diff --git a/public/routes/msgCard.js b/public/routes/msgCard.js
index ffd77a0..de5f075 100644
--- a/public/routes/msgCard.js
+++ b/public/routes/msgCard.js
@@ -5,7 +5,8 @@ Vue.component('MsgCard', {
{{ msg.message }}
- #{{ tag }}
+
+
account_circle
@@ -22,7 +23,7 @@ Vue.component('MsgCard', {
},
methods: {
- myFilter: function() {
+ myFilter: function() {
this.isActive = !this.isActive;
},
}