Browse Source

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

master
Edwina Barbalan 4 years ago
parent
commit
d66be879cd
3 changed files with 39 additions and 6 deletions
  1. 5
    0
      mong.js
  2. 31
    4
      public/index.html
  3. 3
    2
      public/routes/msgCard.js

+ 5
- 0
mong.js View File

} }
] ]
) )

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"}])

+ 31
- 4
public/index.html View File

@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();
}, },
}); });

+ 3
- 2
public/routes/msgCard.js View File

<img src="favicon.ico" width=20px height=20px> <img src="favicon.ico" width=20px height=20px>
</h6> </h6>
{{ msg.message }}<br><br> {{ 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> </p>
<div class="om-card-footer"> <div class="om-user-line"> <div class="om-card-footer"> <div class="om-user-line">
<i class="material-icons">account_circle</i> <i class="material-icons">account_circle</i>
}, },


methods: { methods: {
myFilter: function() {
myFilter: function() {
this.isActive = !this.isActive; this.isActive = !this.isActive;
}, },
} }

Loading…
Cancel
Save