Commit e91d8ba4 authored by Raph El's avatar Raph El
Browse files

Merge branch 'development' of https://gitlab.adullact.net/pixelhumain/co2 into development

parents 5f10c3c4 a7df3702
......@@ -458,18 +458,18 @@ function initPageTable(number){
$(".disconnectConnection").click(function(){
var $this=$(this);
disconnectTo( contextData.type,
links.disconnect( contextData.type,
contextData.id,
$this.data("id"),
$this.data("type"),
$this.data("connection"),
function() {
function() {
$this.parents().eq($this.data("parent-hide")).fadeOut();
});
});
$(".acceptAsBtn").off().on("click",function () {
validateConnection(contextData.type, contextData.id, $(this).data("id"), $(this).data("type"), $(this).data("connect-validation"),
links.validate(contextData.type, contextData.id, $(this).data("id"), $(this).data("type"), $(this).data("connect-validation"),
function() {
toastr.success(trad["validationwellregistred"]);
urlCtrl.loadByHash(location.hash);
......@@ -492,7 +492,6 @@ function initPageTable(number){
if(type=="vote") type="entry";
dyFObj.openForm(type);
});
$('.tooltips').tooltip();
// $(".dirStar").each(function(i,el){
// collection.applyColor($(el).data('type'),$(el).data('id'));
//});
......@@ -534,7 +533,7 @@ function initPageTable(number){
});*/
//on click sur les boutons link
$(".followBtn").off().on("click", function(){
/*$(".followBtn").off().on("click", function(){
mylog.log(".followBtn");
formData = new Object();
formData.parentId = $(this).attr("data-id");
......@@ -599,8 +598,49 @@ function initPageTable(number){
}
});
}
});
});*/
$(".followBtn").off().on("click", function(){
mylog.log(".followBtn");
var parentId = $(this).attr("data-id");
var parentType=$(this).attr("data-type");
var childId = userId;
var childType = "citoyens";
var name = $(this).attr("data-name");
var id = $(this).attr("data-id");
//traduction du type pour le floopDrawer
var thiselement = $(this);
$(this).html("<i class='fa fa-spin fa-circle-o-notch text-azure'></i>");
var connectType = (type == "events") ? "connect" : "follow";
if ($(this).attr("data-ownerlink")=="follow"){
callback=function(){
//toastr.success(data.msg);
labelLink=(parentType == "events") ? trad.alreadyAttendee : trad.alreadyFollow;
if(thiselement.hasClass("btn-add-to-directory"))
labelLink="";
thiselement.html("<small><i class='fa fa-unlink'></i> "+labelLink+"</small>");
thiselement.addClass("text-green");
thiselement.attr("data-ownerlink","unfollow");
thiselement.attr("data-original-title", labelLink);
};
if(parentType=="events")
links.connectAjax(parentType, parentId, childId, childType, connectType, null, callback);
else
links.follow(parentType, parentId, childId, childType, callback);
}
else if($(this).attr("data-ownerlink")=="unfollow"){
connectType = (parentType == "events") ? "attendees" : "followers";
callback=function(){
labelLink=(parentType == "events") ? trad.participate : trad.Follow;
if(thiselement.hasClass("btn-add-to-directory"))
labelLink="";
$(thiselement).html("<small><i class='fa fa-chain'></i> "+labelLink+"</small>");
$(thiselement).attr("data-ownerlink","follow");
$(thiselement).attr("data-original-title", labelLink);
$(thiselement).removeClass("text-green");
};
links.disconnectAjax(parentType, parentId, childId,childType,connectType, null, callback);
}
});
$(".btn-update-contact").click(function(){ console.log("editContact");
updateContact($(this).data("contact-key"),$(this).data("contact-name"), $(this).data("contact-email"),
......@@ -645,9 +685,8 @@ function initPageTable(number){
});
});
$('.tooltips').tooltip();
initUiCoopDirectory();
initBtnShare();
}
......@@ -2116,20 +2155,20 @@ var directory = {
" data-isShared='"+isShared+"'>"+
"<i class='fa fa-retweet'></i> "+trad["share"]+"</button>";
}
if(typeof params.edit != "undefined"){
params.attendees += "<button class='text-dark btn btn-link no-padding margin-left-10 disconnectConnection'"+
" data-id='"+params.id+"' data-type='"+params.type+"' data-connection='"+params.edit+"' data-parent-hide='4'>"+
"<i class='fa fa-unlink'></i> "+trad["notparticipateanymore"]+"</button>";
}
//if(typeof params.edit != "undefined"){
//params.attendees += "<button class='text-dark btn btn-link no-padding margin-left-10 disconnectConnection'"+
// " data-id='"+params.id+"' data-type='"+params.type+"' data-connection='"+params.edit+"' data-parent-hide='4'>"+
// "<i class='fa fa-unlink'></i> "+trad["notparticipateanymore"]+"</button>";
//}
params.attendees += "<small class='light margin-left-10 tooltips pull-right' "+
"data-toggle='tooltip' data-placement='bottom' data-original-title='"+trad["attendee-s"]+"'>" +
cntP + " <i class='fa fa-street-view'></i>"+
"</small>";
params.attendees += "<small class='light margin-left-10 tooltips pull-right' "+
"data-toggle='tooltip' data-placement='bottom' data-original-title='"+trad["concerned"]+"'>" +
cntIt + " <i class='fa fa-thumbs-up'></i>"+
"</small>";
// params.attendees += "<small class='light margin-left-10 tooltips pull-right' "+
// "data-toggle='tooltip' data-placement='bottom' data-original-title='"+trad["concerned"]+"'>" +
// cntIt + " <i class='fa fa-thumbs-up'></i>"+
// "</small>";
params.attendees += "<small class='light margin-left-10 tooltips pull-right' "+
"data-toggle='tooltip' data-placement='bottom' data-original-title='"+trad["guest-s"]+"'>" +
......@@ -2145,12 +2184,19 @@ var directory = {
if(userId != null && userId != "" && params.id != userId /*&& !inMyContacts(params.typeSig, params.id)*/){
var tip = trad["interested"];
actionConnect=(isFollowed) ? "unfollow": "follow";
str += "<a href='javascript:;' class='btn btn-default btn-sm btn-add-to-directory bg-white tooltips followBtn'" +
actionConnect="follow";
icon="chain";
classBtn="";
if(isFollowed){
actionConnect="unfollow";
icon="unlink";
classBtn="text-green";
}
str += "<a href='javascript:;' class='btn btn-default btn-sm btn-add-to-directory bg-white tooltips followBtn "+classBtn+"'" +
'data-toggle="tooltip" data-placement="left" data-original-title="'+tip+'"'+
" data-ownerlink='"+actionConnect+"' data-id='"+params.id+"' data-type='"+params.type+"' data-name='"+params.name+"'"+
" data-isFollowed='"+isFollowed+"'>"+
"<i class='fa fa-chain'></i>"+ //fa-bookmark fa-rotate-270
"<i class='fa fa-"+icon+"'></i>"+ //fa-bookmark fa-rotate-270
"</a>";
}
......@@ -3711,7 +3757,7 @@ var directory = {
}
if(data.type!="organizations" && typeof data.statusLink["isAdmin"] == "undefined"){
html +='<button class="btn btn-default btn-xs" '+
'onclick="connectTo(\''+contextData.type+'\',\''+contextData.id+'\', \''+data.id+'\', \''+data.type+'\', \'admin\',\'\',\'true\')"'+
'onclick="links.connect(\''+contextData.type+'\',\''+contextData.id+'\', \''+data.id+'\', \''+data.type+'\', \'admin\',\'\',\'true\')"'+
" style='bottom:"+(30*countBtn)+"px'>"+
'<i class="fa fa-user-plus"></i> '+trad["addasadmin"]+
'</button>';
......
var links = {
disconnect : function(parentType,parentId,childId,childType,connectType, callback, linkOption, msg) {
var messageBox = (notNull(msg)) ? msg : trad["removeconnection"+connectType];
$(".disconnectBtnIcon").removeClass("fa-unlink").addClass("fa-spinner fa-spin");
bootbox.dialog({
onEscape: function() {
$(".disconnectBtnIcon").removeClass("fa-spinner fa-spin").addClass("fa-unlink");
},
message: '<div class="row"> ' +
'<div class="col-md-12"> ' +
'<span>'+messageBox+' ?</span> ' +
'</div></div>',
buttons: {
success: {
label: "Ok",
className: "btn-primary",
callback: function () {
links.disconnectAjax(parentType, parentId, childId,childType,connectType, linkOption, callback);
}
},
cancel: {
label: trad["cancel"],
className: "btn-secondary",
callback: function() {
$(".disconnectBtnIcon").removeClass("fa-spinner fa-spin").addClass("fa-unlink");
}
}
}
});
},
disconnectAjax: function (parentType, parentId, childId,childType,connectType, linkOption, callback){
var formData = {
"childId" : childId,
"childType" : childType,
"parentType" : parentType,
"parentId" : parentId,
"connectType" : connectType,
};
if(typeof linkOption != "undefined" && linkOption)
formData.linkOption=linkOption;
$.ajax({
type: "POST",
url: baseUrl+"/"+moduleId+"/link/disconnect",
data : formData,
dataType: "json",
success: function(data){
if ( data && data.result ) {
typeConnect=(formData.parentType== "citoyens") ? "people" : formData.parentType;
idConnect=formData.parentId;
if(formData.parentId==userId){
typeConnect=(formData.childType== "citoyens") ? "people" : formData.childType;
idConnect=formData.childId;
}
removeFloopEntity(idConnect, typeConnect);
toastr.success("Le lien a été supprimé avec succès");
if (typeof callback == "function")
callback();
else
urlCtrl.loadByHash(location.hash);
} else {
toastr.error("You leave succesfully");
}
}
});
},
// Javascript function used to validate a link between parent and child (ex : member, admin...)
validate: function(parentType, parentId, childId, childType, linkOption, callback) {
var formData = {
"childId" : childId,
"childType" : childType,
"parentType" : parentType,
"parentId" : parentId,
"linkOption" : linkOption,
};
$.ajax({
type: "POST",
url: baseUrl+"/"+moduleId+"/link/validate",
data: formData,
dataType: "json",
success: function(data) {
if (data.result) {
if (typeof callback == "function")
callback(parentType, parentId, childId, childType, linkOption);
else{
toastr.success(data.msg);
urlCtrl.loadByHash(location.hash);
}
} else {
toastr.error(data.msg);
}
},
});
},
follow : function(parentType, parentId, childId, childType, callback){
mylog.log("follow",parentType, parentId, childId, childType, callback);
//$(".followBtn").removeClass("fa-link").addClass("fa-spinner fa-spin");
var formData = {
"childId" : childId,
"childType" : childType,
"parentType" : parentType,
"parentId" : parentId,
};
$.ajax({
type: "POST",
url: baseUrl+"/"+moduleId+"/link/follow",
data: formData,
dataType: "json",
success: function(data) {
if(data.result){
if (formData.parentType)
addFloopEntity(formData.parentId, formData.parentType, data.parent);
toastr.success(data.msg);
if (typeof callback == "function")
callback();
else
urlCtrl.loadByHash(location.hash);
}
else
toastr.error(data.msg);
},
});
},
connect: function(parentType, parentId, childId, childType, connectType, parentName, actionAdmin, callback) {
if(parentType=="events" && connectType=="attendee")
$(".connectBtn").removeClass("fa-link").addClass("fa-spinner fa-spin");
else
$(".becomeAdminBtn").removeClass("fa-user-plus").addClass("fa-spinner fa-spin");
titleBox="";
messageBox=(userId==childId) ? trad["suretojoin"+parentType] : trad.validateaddedofthisuser;
if (connectType=="admin")
messageBox += " " + trad["as"+connectType];
if($.inArray(connectType, ["admin","attendee"])< 0){
titleBox=trad["suretojoin"+parentType]+" "+trad["as"+connectType]+" ?";
messageBox='<div class="row"> ' +
'<div class="col-md-12"> ' +
'<form class="form-horizontal"> ' +
'<label class="col-md-4 control-label" for="awesomeness">'+tradDynForm.wouldbecomeadmin+'?</label> ' +
'<div class="col-md-4"> <div class="radio"> <label for="awesomeness-0"> ' +
'<input type="radio" name="askForAdmin" id="awesomeness-0" value="admin"> ' +
tradDynForm.yes+' </label> ' +
'</div><div class="radio"> <label for="awesomeness-1"> ' +
'<input type="radio" name="askForAdmin" id="awesomeness-1" value="'+connectType+'" checked="checked"> '+tradDynForm.no+' </label> ' +
'</div> ' +
'</div> </div>' +
'</form>'+
'</div>'+
'</div>';
}
bootbox.dialog({
title: titleBox,
onEscape: function() {
$(".becomeAdminBtn").removeClass("fa-spinner fa-spin").addClass("fa-user-plus");
},
message: messageBox,
buttons: {
success: {
label: "Ok",
className: "btn-primary",
callback: function () {
var roles=null;
if($("input[name='askForAdmin']").length){
roles = ($('#role').val() != "") ? $('#role').val() : null;
connectType = $("input[name='askForAdmin']:checked").val();
}
links.connectAjax(parentType, parentId, childId, childType, connectType, roles, callback);
}
},
cancel: {
label: trad["cancel"],
className: "btn-secondary",
callback: function() {
$(".becomeAdminBtn").removeClass("fa-spinner fa-spin").addClass("fa-user-plus");
}
}
}
}
);
},
connectAjax : function(parentType, parentId, childId, childType, connectType, roles, callback){
var formData = {
"childId" : childId,
"childType" : childType,
"parentType" : parentType,
"parentId" : parentId,
"connectType" : connectType
};
if(typeof roles != "undefined" && notNull(roles) )
formData.roles=roles;
$.ajax({
type: "POST",
url: baseUrl+"/"+moduleId+"/link/connect",
data: formData,
dataType: "json",
success: function(data) {
if(data.result){
addFloopEntity(data.parent["_id"]["$id"], data.parentType, data.parent);
toastr.success(data.msg);
if (typeof callback == "function")
callback();
else
urlCtrl.loadByHash(location.hash);
}
else{
if(typeof(data.type)!="undefined" && data.type=="info")
toastr.info(data.msg);
else
toastr.error(data.msg);
}
}
});
}
}
\ No newline at end of file
......@@ -8,6 +8,7 @@ on garde les librairies specifique au module dans le module
"/js/default/loginRegister.js",
'/js/co.js',
'/js/default/directory.js',
'/js/links.js',
'/js/default/index.js',
'/js/default/notifications.js',
//'/js/default/directory.js',
......
......@@ -57,8 +57,7 @@
if(@$linksBtn["isFollowing"]){
$statusXsMenu=Yii::t("common","You are following {which}",array("{which}"=>Yii::t("common","this ".Element::getControlerByCollection($elementType))));
$visibleXsLinks.='<li class="text-left visible-xs">'.
'<a href="javascript:;" class="bg-white text-red" '.
'onclick="disconnectTo(\''.$elementType.'\',\''.$elementId.'\',\''.Yii::app()->session["userId"].'\',\''.Person ::COLLECTION.'\',\'followers\')">'.
'<a href="javascript:links.disconnect(\''.$elementType.'\',\''.$elementId.'\',\''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\',\'followers\')" class="bg-white text-red">'.
'<i class="fa fa-sign-out"></i> '.Yii::t("common", "Don't follow this page").
'</a>'.
'</li>';
......@@ -71,7 +70,7 @@
</a>
<ul class="dropdown-menu">
<li class="text-left">
<a href="javascript:;" class="bg-white text-red" onclick="disconnectTo('<?php echo $elementType ?>','<?php echo $elementId ?>','<?php echo Yii::app()->session["userId"] ?>','<?php echo Person ::COLLECTION ?>','followers')">
<a href="javascript:links.disconnect('<?php echo $elementType ?>','<?php echo $elementId ?>','<?php echo Yii::app()->session["userId"] ?>','<?php echo Person::COLLECTION ?>','followers')" class="bg-white text-red">
<i class="fa fa-sign-out"></i><?php echo Yii::t("common", "Don't follow this page"); ?>
</a>
</li>
......@@ -82,14 +81,13 @@
<?php
}else{
$visibleXsLinks.='<li class="text-left visible-xs">'.
'<a href="javascript:;" class="bg-white" '.
'onclick="follow(\''.$elementType.'\',\''.$elementId.'\',\''.Yii::app()->session["userId"].'\',\''.Person ::COLLECTION.'\')">'.
'<a href="javascript:links.follow(\''.$elementType.'\',\''.$elementId.'\',\''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\')" class="bg-white">'.
'<i class="fa fa-rss"></i> '.Yii::t("common", "Follow this page").
'</a>'.
'</li>';
?>
<?php if(!@$xsView){ ?>
<a href="javascript:;" class="btn-o menu-linksBtn" onclick="follow('<?php echo $elementType ?>','<?php echo $elementId ?>','<?php echo Yii::app()->session["userId"] ?>','<?php echo Person ::COLLECTION ?>')"> <i class="fa fa-rss"></i> <?php echo Yii::t("common","Follow") ?> </a>
<a href="javascript:links.follow('<?php echo $elementType ?>','<?php echo $elementId ?>','<?php echo Yii::app()->session["userId"] ?>','<?php echo Person::COLLECTION ?>')" class="btn-o menu-linksBtn"> <i class="fa fa-rss"></i> <?php echo Yii::t("common","Follow") ?> </a>
<?php } ?>
<?php
}
......@@ -97,14 +95,13 @@
if (@$linksBtn["communityBn"]){
if($linksBtn["isMember"]==false){
$visibleXsLinks.='<li class="text-left visible-xs">'.
'<a href="javascript:;" class="bg-white" '.
'onclick="connectTo(\''.$elementType.'\',\''.$elementId.'\',\''.Yii::app()->session["userId"].'\',\''.Person ::COLLECTION.'\',\''.$linksBtn["connectAs"].'\')">'.
'<a href="javascript:links.connect(\''.$elementType.'\',\''.$elementId.'\',\''.Yii::app()->session["userId"].'\',\''.Person ::COLLECTION.'\',\''.$linksBtn["connectAs"].'\')" class="bg-white">'.
'<i class="fa fa-link"></i> '.Yii::t("common","Be {what}", array("{what}"=> Yii::t("common",$linksBtn["connectAs"]))).
'</a>'.
'</li>';
?>
<?php if(!@$xsView){ ?>
<a href="javascript:;" class="btn-o menu-linksBtn" onclick="connectTo('<?php echo $elementType ?>','<?php echo $elementId ?>','<?php echo Yii::app()->session["userId"] ?>','<?php echo Person ::COLLECTION ?>','<?php echo $linksBtn["connectAs"] ?>')">
<a href="javascript:links.connect('<?php echo $elementType ?>','<?php echo $elementId ?>','<?php echo Yii::app()->session["userId"] ?>','<?php echo Person::COLLECTION ?>','<?php echo $linksBtn["connectAs"] ?>')" class="btn-o menu-linksBtn">
<i class="fa fa-link"></i> <?php echo Yii::t("common","Be {what}", array("{what}"=> Yii::t("common",$linksBtn["connectAs"]))); ?>
</a>
<?php } ?>
......@@ -149,30 +146,28 @@
<?php } ?>
<?php if (!@$linksBtn["isAdmin"]){
$visibleXsLinks.='<li class="text-left visible-xs">'.
'<a href="javascript:;" class="bg-white" '.
'onclick="connectTo(\''.$elementType.'\',\''.$elementId.'\',\''.Yii::app()->session["userId"].'\',\''.Person ::COLLECTION.'\',\'admin\')">'.
'<a href="javascript:links.connect(\''.$elementType.'\',\''.$elementId.'\',\''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\',\'admin\')" class="bg-white">'.
'<i class="fa fa-user-plus"></i> '.Yii::t("common", "Become administrator").
'</a>'.
'</li>';
?>
<?php if(!@$xsView){ ?>
<li class="text-left">
<a href="javascript:;" class="bg-white" onclick="connectTo('<?php echo $elementType ?>','<?php echo $elementId ?>','<?php echo Yii::app()->session["userId"] ?>','<?php echo Person ::COLLECTION ?>','admin')">
<a href="javascript:links.connect('<?php echo $elementType ?>','<?php echo $elementId ?>','<?php echo Yii::app()->session["userId"] ?>','<?php echo Person::COLLECTION ?>','admin')" class="bg-white">
<i class="fa fa-user-plus"></i> <?php echo Yii::t("common", "Become administrator"); ?>
</a>
</li>
<?php } ?>
<?php }
$visibleXsLinks.='<li class="text-left visible-xs">'.
'<a href="javascript:;" class="bg-white text-red" '.
'onclick="disconnectTo(\''.$elementType.'\',\''.$elementId.'\',\''.Yii::app()->session["userId"].'\',\''.Person ::COLLECTION.'\',\''.$linksBtn["connectType"].'\')">'.
'<a href="javascript:links.disconnect(\''.$elementType.'\',\''.$elementId.'\',\''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\',\''.$linksBtn["connectType"].'\')" class="bg-white text-red">'.
'<i class="fa fa-sign-out"></i> '.Yii::t("common", "Leave this page").
'</a>'.
'</li>';
?>
<?php if(!@$xsView){ ?>
<li class="text-left">
<a href="javascript:;" class="bg-white text-red" onclick="disconnectTo('<?php echo $elementType ?>','<?php echo $elementId ?>','<?php echo Yii::app()->session["userId"] ?>','<?php echo Person ::COLLECTION ?>','<?php echo $linksBtn["connectType"] ?>')">
<a href="javascript:links.disconnect('<?php echo $elementType ?>','<?php echo $elementId ?>','<?php echo Yii::app()->session["userId"] ?>','<?php echo Person::COLLECTION ?>','<?php echo $linksBtn["connectType"] ?>')" class="bg-white text-red">
<i class="fa fa-sign-out"></i> <?php echo Yii::t("common", "Leave this page"); ?>
</a>
</li>
......
......@@ -34,22 +34,22 @@
</span>
</a>
<a href='javascript:;' class='label refuseBtn pull-right'
onclick='var $this=$(this); disconnectTo("<?php echo $elementType ?>",
onclick='var $this=$(this); links.disconnect("<?php echo $elementType ?>",
"<?php echo (string)$parent["_id"] ?>",
"<?php echo $key ?>",
"<?php echo Person::COLLECTION ?>",
"<?php echo $confirmations["connectType"] ?>",
"<?php echo Link::IS_ADMIN_PENDING ?>",
function() {
toastr.success("<?php echo Yii::t("common", "Answer well registered") ?>!!");
$this.parent().remove();
},
"<?php echo Link::IS_ADMIN_PENDING ?>");'
});'
style='margin-right: 5px;'>
<i class="fa fa-remove"></i> <?php echo Yii::t("common","Refuse"); ?>
</a>
<a href='javascript:;'
class='label acceptBtn pull-right'
onclick='var $this=$(this); validateConnection("<?php echo $elementType ?>",
onclick='var $this=$(this); links.validate("<?php echo $elementType ?>",
"<?php echo (string)$parent["_id"] ?>",
"<?php echo $key ?>",
"<?php echo Person::COLLECTION ?>",
......
......@@ -12,6 +12,7 @@
$cssAnsScriptFilesModule = array(
'/js/default/calendar.js',
'/js/links.js',
);
HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl);
......
......@@ -37,10 +37,10 @@
echo "<div class='no-padding containInvitation' style='border-bottom: 1px solid lightgray;margin-bottom:10px !important;'>".
"<div class='padding-5'>".
$labelInvitation.": <br/>".
'<a class="btn btn-xs tooltips btn-accept" href="javascript:;" onclick="validateConnection(\''.$type.'\',\''.(string)$element["_id"].'\', \''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\',\''.$linkValid.'\')" data-placement="bottom" data-original-title="'.Yii::t("common",$tooltipAccept).'">'.
'<a class="btn btn-xs tooltips btn-accept" href="javascript:;" onclick="links.validate(\''.$type.'\',\''.(string)$element["_id"].'\', \''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\',\''.$linkValid.'\')" data-placement="bottom" data-original-title="'.Yii::t("common",$tooltipAccept).'">'.
'<i class="fa fa-check "></i> '.Yii::t("common",$inviteAccept).
'</a>'.
'<a class="btn btn-xs tooltips btn-refuse margin-left-5" href="javascript:;" onclick="disconnectTo(\''.$type.'\',\''.(string)$element["_id"].'\',\''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\',\''.Element::$connectTypes[$type].'\',null,\''.$option.'\',\''.$msgRefuse.'\')" data-placement="bottom" data-original-title="'.Yii::t("common","Not interested by the invitation").'">'.
'<a class="btn btn-xs tooltips btn-refuse margin-left-5" href="javascript:;" onclick="links.disconnect(\''.$type.'\',\''.(string)$element["_id"].'\',\''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\',\''.Element::$connectTypes[$type].'\',null,\''.$option.'\',\''.$msgRefuse.'\')" data-placement="bottom" data-original-title="'.Yii::t("common","Not interested by the invitation").'">'.
'<i class="fa fa-remove"></i> '.Yii::t("common",$inviteRefuse).
'</a>'.
"</div>".
......
......@@ -123,10 +123,10 @@
echo "<div class='no-padding' style='border-bottom: 1px solid lightgray;margin-bottom:10px !important;'>".
"<div class='padding-5'>".
"<a href='#element.detail.type.".Person::COLLECTION.".id.".$invitedMe["invitorId"]."' class='lbh'>".$invitedMe["invitorName"]."</a><span class='text-dark'> vous a invité: <br/>".
'<a class="btn btn-xs btn-default tooltips" href="javascript:;" onclick="validateConnection(\''.$contentType.'\',\''.$parentId.'\', \''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\',\''.Link::IS_INVITING.'\')" data-placement="bottom" data-original-title="'.Yii::t("common",$tooltipAccept).'">'.
'<a class="btn btn-xs btn-default tooltips" href="javascript:;" onclick="links.validate(\''.$contentType.'\',\''.$parentId.'\', \''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\',\''.Link::IS_INVITING.'\')" data-placement="bottom" data-original-title="'.Yii::t("common",$tooltipAccept).'">'.
'<i class="fa fa-check "></i> '.Yii::t("common",$inviteAccept).
'</a>'.
'<a class="btn btn-xs btn-default tooltips" href="javascript:;" onclick="disconnectTo(\''.$contentType.'\',\''.$parentId.'\',\''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\',\'attendees\')" data-placement="bottom" data-original-title="Not interested by the invitation">'.
'<a class="btn btn-xs btn-default tooltips" href="javascript:;" onclick="links.disconnect(\''.$contentType.'\',\''.$parentId.'\',\''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\',\'attendees\')" data-placement="bottom" data-original-title="Not interested by the invitation">'.
'<i class="fa fa-remove"></i> '.Yii::t("common",$inviteRefuse).
'</a>'.
"</div>".
......
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