Browse Source

verschiedenes

master
Xenia Gruenzinger 5 years ago
parent
commit
6529b1d937
5 changed files with 55 additions and 12 deletions
  1. 22
    3
      public/routes/home.js
  2. 1
    1
      public/routes/initGlobals.js
  3. 18
    5
      public/search.js
  4. 6
    3
      public/style/style.css
  5. 8
    0
      public/style/style.less

+ 22
- 3
public/routes/home.js View File

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 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>
<a id="escape-search-link" @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>
<MsgCard <MsgCard
v-for="id in messagelist.slice().reverse()" v-for="id in messagelist.slice().reverse()"
:key="id" :key="id"
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);


_isSearchActiv = false;
if($("#btn-text").hasClass("subscribed")){
$("#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);

}
} }
}, },
mounted: function () { mounted: function () {

+ 1
- 1
public/routes/initGlobals.js View File



// Search // Search
_isSearchActiv = false, _isSearchActiv = false,
_isSubscripeButtonActiv = false,
_isSubscripeButtonActiv = true,
data = [], data = [],
search_data = [] search_data = []



+ 18
- 5
public/search.js View File

}); });
}, },
clear: function() { clear: function() {
_isSearchActiv = false;
this.searchtext = "";
//_isSearchActiv = false;
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() {


function searching(searchtext) { function searching(searchtext) {
_isSearchActiv = true; _isSearchActiv = true;
console.log("Searchtext: " + searchtext.replace(/#/g, ''));
$("#escape-search-link").css("visibility", "visible");
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"
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() {

+ 6
- 3
public/style/style.css View File

float: right; float: right;
} }
} }

.subscribe-btn{
float:right;
#subscribe-btn {
float: right;
visibility: hidden;
}
#escape-search-link {
visibility: hidden;
} }

+ 8
- 0
public/style/style.less View File

float: right; float: right;
} }
} }

#subscribe-btn{
float: right;
visibility: hidden;
}
#escape-search-link{
visibility: hidden;
}

Loading…
Cancel
Save