Commit d52140aa authored by Tibor Katelbach's avatar Tibor Katelbach
Browse files

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

parents 5ed18554 4fa83aa8
......@@ -1080,7 +1080,6 @@ var directory = {
if(typeof params.url != "undefined" && params.url != null && params.url != "")
str += "<br><a href='"+params.url+"' class='lbh text-light url bold elipsis'>"+params.url+"</a>";
// if(typeof params.startDate != "undefined")
// str += "<br><small class='letter-light'>"+params.startDate+"</small>";
......@@ -1141,10 +1140,15 @@ var directory = {
" data-ownerlink='share' data-id='"+params.id+"' data-type='"+params.type+"'>"+
"<small><i class='fa fa-share'></i> "+trad["share"]+"</small></button> ";
str += "</div>";
str += "<div class='col-lg-4 col-md-3 col-sm-2 col-xs-12 gallery'>";
if(typeof params.gallery != "undefined"){
$.each(params.gallery, function(key, img){
str += "<a href='"+params.url+"' class='lbh'><img src='"+img.path+"' class='margin-5' height='70'></a>";
});
}
str += "</div>";
str += "</div>";
return str;
......
......@@ -123,18 +123,22 @@ function getFloopItem(id, type, value){
var elementClass = oldElement ? "oldFloopDrawer"+type.name : "";
var elementStyle = oldElement ? "display:none" : "";
var HTML = '<li style="'+elementStyle+'" class="'+elementClass+'" id="floopItem-'+type.name+'-'+id+'">' +
'<a href="'+path+'" class="btn btn-default btn-scroll-type btn-select-contact lbh" id="contact'+id+'">' +
'<div class="btn-chk-contact" idcontact="'+id+'">' +
var HTML = '<li style="'+elementStyle+'" class="'+elementClass+'" id="floopItem-'+type.name+'-'+id+'" idcontact="'+id+'">' +
'<a href="'+path+'" class="btn btn-default btn-scroll-type btn-select-contact lbh elipsis contact'+id+'">' +
'<div class="btn-chk-contact">' +
'<img src="'+ profilThumbImageUrl+'" class="thumb-send-to bg-'+type.color+'" height="35" width="35">'+
'<span class="info-contact">' +
'<span class="name-contact text-dark text-bold" idcontact="'+id+'">' + value.name + '</span>'+
'<br/>'+
'<span class="cp-contact text-light" idcontact="'+id+'">' + cp + ' </span>'+
'<span class="city-contact text-light" idcontact="'+id+'">' + city + '</span>'+
'<span class="cp-contact text-light pull-left" idcontact="'+id+'">' + cp + ' </span>'+
'<span class="city-contact text-light pull-left" idcontact="'+id+'">' + city + '</span>'+
'</span>' +
'</div>' +
'</a>' +
'<button class="btn btn-xs btn-default pull-right btn-open-chat contact'+id+'" '+
'data-name-el="'+value.name+'" data-type-el="'+type.name+'" idcontact="'+id+'">'+
'<i class="fa fa-comments"></i>'+
'</button>'+
'</li>';
return HTML;
}
......@@ -174,7 +178,6 @@ function getFloopContactTypes(type){
return goodType;
}
function bindEventFloopDrawer(){
$(".floopDrawer #search-contact").keyup(function(){
......@@ -208,6 +211,13 @@ function bindEventFloopDrawer(){
showFloopDrawer(false);
});
/*TODO TIB*/
$(".btn-open-chat").click(function(){
var nameElement = $(this).data("name-el");
var typeElement = $(this).data("type-el");
rcObj.loadChat(nameElement, typeElement,true,true );
});
}
function initFloopScrollByType(){
......@@ -219,12 +229,12 @@ function initFloopScrollByType(){
$("#floopScrollByType").html(HTML);
}
//recherche text par nom, cp et city
function filterFloopDrawer(searchVal){
console.log("filterFloopDrawer(searchVal)", searchVal);
//masque/affiche tous les contacts présents dans la liste
if(searchVal != "") $(".floopDrawer .btn-select-contact").hide();
else $(".floopDrawer .btn-select-contact").show();
if(searchVal != "") $(".floopDrawer .btn-select-contact, .floopDrawer .btn-open-chat").hide();
else $(".floopDrawer .btn-select-contact, .floopDrawer .btn-open-chat").show();
//recherche la valeur recherché dans les 3 champs "name", "cp", et "city"
$.each($(".floopDrawer .name-contact"), function() { checkFloopSearch($(this), searchVal); });
$.each($(".floopDrawer .cp-contact"), function() { checkFloopSearch($(this), searchVal); });
......@@ -237,7 +247,8 @@ function checkFloopSearch(thisElement, searchVal, type){
var found = content.search(new RegExp(searchVal, "i"));
if(found >= 0){
var id = thisElement.attr("idcontact");
$(".floopDrawer #contact"+id).show();
console.log("$('.floopDrawer .contact"+id+"').show()");
$(".floopDrawer .contact"+id).show();
}
}
......
......@@ -503,7 +503,7 @@ function bindEventScopeModal(){
//parcourt tous les types de contacts
$.each(contactTypes, function(key, type){ //mylog.log("BINDEVENT CONTACTTYPES : " + type.name);
//initialise le scoll automatique de la liste de contact
$("#btn-scroll-type-"+type.name).click(function(){
$("#modalDirectoryForm #btn-scroll-type-"+type.name).click(function(){
//console.log("click btn scroll type : "+type.name+ " " + $("#scroll-type-"+type.name).position().top);
if($("#select-type-search-contacts").prop("checked")==false){
......@@ -522,19 +522,19 @@ function bindEventScopeModal(){
});
});
$("#search-contact").keyup(function(){
$("#modalDirectoryForm #search-contact").keyup(function(){
filterContact($(this).val());
});
$("#btn-cancel").click(function(){
$("#modalDirectoryForm #btn-cancel").click(function(){
if(newMemberInCommunity && (currentView=="detail" || currentView=="directory")) {
urlCtrl.loadByHash(location.hash);
}
});
$("#btn-save").click(function(){
$("#modalDirectoryForm #btn-save").click(function(){
sendInvitation();
});
$("#btn-reset-scope").click(function(){
$("#modalDirectoryForm #btn-reset-scope").click(function(){
$.each($('.modal input:checkbox'), function(){
$(this).prop("checked", false);
});
......
......@@ -242,7 +242,9 @@
<button type="button" class="btn btn-default bold hidden-xs btn-start-notifications hidden">
<i class="fa fa-bell"></i>
<span class="hidden-xs hidden-sm">
<?php if (@Yii::app()->session["userId"] == $element["_id"]) echo Yii::t("common","My notif<span class='hidden-md'>ication</span>s"); else echo Yii::t("common","Notif<span class='hidden-md'>ication</span>s"); ?>
<?php if (@Yii::app()->session["userId"] == $element["_id"])
echo Yii::t("common","My notif<span class='hidden-md'>ication</span>s");
else echo Yii::t("common","Notif<span class='hidden-md'>ication</span>s"); ?>
</span>
<span class="badge notifications-countElement <?php if(!@$countNotifElement || (@$countNotifElement && $countNotifElement=="0")) echo 'badge-transparent hide'; else echo 'badge-success'; ?>">
<?php echo @$countNotifElement ?>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment