Compare commits
No commits in common. "bac8786ab49c17c1ccc570fb818a3a342e41a8c1" and "2d4850520daf95cfe8001f670989ad33fb07cd29" have entirely different histories.
bac8786ab4
...
2d4850520d
@ -1,17 +1,17 @@
|
|||||||
const HomeRouter = {
|
const HomeRouter = {
|
||||||
template: `
|
template: `
|
||||||
<div>
|
<div>
|
||||||
<div id="om-msg-cards" class="column pull-right-sm is-four-fifths-desktop">
|
<div id="om-msg-cards" class="column pull-right-sm is-four-fifths-desktop">
|
||||||
<a id="escape-search-link" @click="goBackToDashboard">< zurück zu allen Einträgen</a>
|
<a v-if="isSearchActiv" @click="goBackToDashboard">< zurück zu allen Einträgen</a>
|
||||||
<b-button id="subscribe-btn" type="is-primary" @click="changeSubscribtion"><div id="btn-text"></div></b-button>
|
<b-button class="subscribe-btn" v-if="isSubscripeButtonActiv" type="is-primary" @click="">#IPSUM ABONNIEREN</b-button>
|
||||||
<MsgCard
|
<MsgCard
|
||||||
v-for="id in messagelist.slice().reverse()"
|
v-for="id in messagelist.slice().reverse()"
|
||||||
:key="id"
|
:key="id"
|
||||||
:msg="messages[id] || {}"
|
:msg="messages[id] || {}"
|
||||||
:isBookmark="bookmarkArray[id]"
|
:isBookmark="bookmarkArray[id]">
|
||||||
></MsgCard>
|
</MsgCard>
|
||||||
</div>
|
</div>
|
||||||
</div>`,
|
</div>`,
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
messagelist: _messagelist,
|
messagelist: _messagelist,
|
||||||
@ -28,27 +28,8 @@ const HomeRouter = {
|
|||||||
goBackToDashboard: function() {
|
goBackToDashboard: function() {
|
||||||
//Home neu rendern ...
|
//Home neu rendern ...
|
||||||
//windows.history.go();
|
//windows.history.go();
|
||||||
router.push('/files')
|
|
||||||
router.push('/home')
|
|
||||||
$("#escape-search-link").css("visibility", "hidden");
|
|
||||||
$("#subscribe-btn").css("visibility", "hidden");
|
|
||||||
},
|
|
||||||
changeSubscribtion: function(){
|
|
||||||
var btnString = $("#btn-text").text();
|
|
||||||
//console.log(btnString);
|
|
||||||
|
|
||||||
if($("#btn-text").hasClass("subscribed")){
|
_isSearchActiv = false;
|
||||||
$("#btn-text").removeClass("subscribed");
|
|
||||||
var newBtnString = "#" + $("#btn-text").text(/deabonnieren/g, '') + "abonnieren";
|
|
||||||
//console.log(btnString);
|
|
||||||
$("#btn-text").text(newBtnString);
|
|
||||||
}else{
|
|
||||||
$("#btn-text").addClass("subscribed");
|
|
||||||
var newBtnString = "#" + $("#btn-text").text(/abonnieren/g, '') + "deabonnieren";
|
|
||||||
//console.log(newBtnString);
|
|
||||||
$("#btn-text").text(newBtnString);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@ -14,7 +14,7 @@ var auth = {},
|
|||||||
|
|
||||||
// Search
|
// Search
|
||||||
_isSearchActiv = false,
|
_isSearchActiv = false,
|
||||||
_isSubscripeButtonActiv = true,
|
_isSubscripeButtonActiv = false,
|
||||||
data = [],
|
data = [],
|
||||||
search_data = [],
|
search_data = [],
|
||||||
|
|
||||||
|
|||||||
@ -69,15 +69,9 @@ Vue.component('search',{
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
clear: function() {
|
clear: function() {
|
||||||
//_isSearchActiv = false;
|
_isSearchActiv = false;
|
||||||
this.searchtext = "";
|
this.searchtext = "";
|
||||||
this.list_messages();
|
this.list_messages();
|
||||||
//router.push('/files')
|
|
||||||
//router.push('/home')
|
|
||||||
$("#escape-search-link").css("visibility", "hidden");
|
|
||||||
$("#subscribe-btn").css("visibility", "hidden");
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
@ -100,16 +94,7 @@ function get_insert_tag(id) {
|
|||||||
|
|
||||||
function searching(searchtext) {
|
function searching(searchtext) {
|
||||||
_isSearchActiv = true;
|
_isSearchActiv = true;
|
||||||
$("#escape-search-link").css("visibility", "visible");
|
console.log("Searchtext: " + searchtext.replace(/#/g, ''));
|
||||||
if(_taglist.indexOf(searchtext.replace(/#/g, '')) > -1){
|
|
||||||
var btnString = "#" + searchtext.replace(/#/g, '') + " abonnieren";
|
|
||||||
$("#btn-text").text(btnString);
|
|
||||||
$("#subscribe-btn").css("visibility", "visible");
|
|
||||||
}else{
|
|
||||||
$("#subscribe-btn").css("visibility", "hidden");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "api/msg/search/" + searchtext.replace(/#/g, ''),
|
url: "api/msg/search/" + searchtext.replace(/#/g, ''),
|
||||||
method: "GET"
|
method: "GET"
|
||||||
@ -127,6 +112,8 @@ function searching(searchtext) {
|
|||||||
console.log("searching: err: " + e + f + g);
|
console.log("searching: err: " + e + f + g);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
_isSubscripeButtonActiv = (_taglist.indexOf(searchtext.replace(/#/g, '')) > -1);
|
||||||
|
console.log("isSubscripeButtonActiv: " + _isSubscripeButtonActiv);
|
||||||
}
|
}
|
||||||
|
|
||||||
function messages() {
|
function messages() {
|
||||||
|
|||||||
@ -241,15 +241,6 @@ button.clearButton {
|
|||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
#subscribe-btn {
|
|
||||||
float: right;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
#escape-search-link {
|
|
||||||
visibility: hidden;
|
|
||||||
=======
|
|
||||||
#bockmark-not-active {
|
#bockmark-not-active {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
>>>>>>> origin/developer
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -285,13 +285,6 @@ button.clearButton{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#subscribe-btn{
|
|
||||||
float: right;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
#escape-search-link{
|
|
||||||
visibility: hidden;
|
|
||||||
|
|
||||||
#bockmark-not-active{
|
#bockmark-not-active{
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user