123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- const HomeRouter = {
- template: `
- <div>
- <div id="om-msg-cards" class="column pull-right-sm is-four-fifths-desktop">
- <a v-if="isSearchActiv" @click="goBackToDashboard">< zurück zu allen Einträgen</a>
- <b-button class="subscribe-btn" v-if="isSubscripeButtonActiv" type="is-primary" @click="">#IPSUM ABONNIEREN</b-button>
- <MsgCard
- v-for="id in messagelist.slice().reverse()"
- :key="id"
- :msg="messages[id] || {}"
- ></MsgCard>
- </div>
- </div>`,
- data: function () {
- return {
- messagelist: _messagelist,
- messages: _messages,
- isSearchActiv: _isSearchActiv,
- isSubscripeButtonActiv: _isSubscripeButtonActiv
- };
- },
- methods: {
- list_messages: function() {
- messages();
- },
- goBackToDashboard: function() {
- //Home neu rendern ...
- //windows.history.go();
-
- _isSearchActiv = false;
- }
- },
- mounted: function () {
- this.list_messages();
- //this.refresh_messages();
- }
- };
-
- function get_insert_message(id) {
- $.ajax({ url: "api/msg/id/"+id, method: "GET" }).done(function (msg) {
- Vue.set(_messages, id, msg);
- }).fail(function (e, f, g) {
- console.log("cannot load " + id + ".json: " + e + f + g);
- })
- }
|