Commit 9cebe7b5 authored by Raph El's avatar Raph El
Browse files

Merge branch 'development' of https://github.com/pixelhumain/co2 into development

parents 8b8af752 1354b72c
......@@ -4,8 +4,43 @@ function initDateHeaderPage(params){
$(".header-banner").html(str);
}
function getCroppingModal(){
function pushListRoles(links){
//Members
if(typeof links.members != "undefined"){
$.each(links.members, function(e,v){
if(typeof v.roles != "undefined"){
$.each(v.roles, function(i,data){
if(data != "" && !rolesList.includes(data)){
rolesList.push(data);
}
});
}
});
}
//Contributors
if(typeof links.contributors != "undefined"){
$.each(links.contributors, function(e,v){
if(typeof v.roles != "undefined"){
$.each(v.roles, function(i,data){
if(data != "" && !rolesList.includes(data)){
rolesList.push(data);
}
});
}
});
}
//Attendees
if(typeof links.attendees != "undefined"){
$.each(links.attendees, function(e,v){
if(typeof v.roles != "undefined"){
$.each(v.roles, function(i,data){
if(data != "" && !rolesList.includes(data)){
rolesList.push(data);
}
});
}
});
}
}
function menuLeftShow(){
......@@ -646,6 +681,10 @@ function displayInTheContainer(data, dataName, dataIcon, contextType, edit){
if(typeof val.rolesLink != "undefined"){
console.log(val.rolesLink);
$.each(val.rolesLink, function(i,v){
//Push new roles in rolesList
if(v != "" && !rolesList.includes(v))
rolesList.push(v);
//Incrément and push roles in filter array
if(typeof listRoles[v] != "undefined")
listRoles[v].count++;
else
......
......@@ -360,7 +360,7 @@ function modifyNews(idNews,typeNews){
else if(updateNews[idNews]["media"]["type"]=="gallery_files"){
message += getMediaFiles(updateNews[idNews]["media"],idNews, "update")+
"<input type='hidden' class='type' value='gallery_files'>";
}else if (updateNews[idNews]["media"]["type"]=="gallery_files"){
}else if (updateNews[idNews]["media"]["type"]=="gallery_images"){
message += getMediaImages(updateNews[idNews]["media"], idNews,null,null, "update")+
"<input type='hidden' class='type' value='gallery_images'>";
}else{
......@@ -1360,7 +1360,7 @@ function getMediaImages(o,newsId,authorId,targetName,edit){
if(typeof edit != "undefined" && edit=="update"){
for(var i in o.images){
html+="<div class='updateImageNews'><img src='"+baseUrl+"/"+uploadUrl+"communecter/"+o.images[i].folder+"/"+o.images[i].name+"' style='width:75px; height:75px;'/>"+
"<a href='javascript:;' class='btn-red text-white deleteDoc' onclick='deleteDocFromNews(\'"+o.images[i]._id.$id+"\',\'"+edit+"\')'><i class='fa fa-times text-dark'></i></a>"+
"<a href='javascript:;' class='btn-red text-white deleteDoc'><i class='fa fa-times text-dark'></i></a>"+
"<input type='hidden' class='docsId' value='"+o.images[i]._id.$id+"'></div>";
}
return html;
......@@ -1439,7 +1439,7 @@ function getMediaFiles(o,newsId, edit){
html+="<div class='col-md-12 padding-5 shadow2 margin-top-5'>"+
"<a href='"+path+"' target='_blank'>"+documents.getIcon(o.files[i].contentKey)+" "+o.files[i].name+"</a>";
if(typeof edit != "undefined" && edit=="update"){
html+="<a href='javascript:;' class='btn-red text-white deleteDoc' onclick='deleteDocFromNews(\'"+o.files[i]._id.$id+"\',\'"+edit+"\')'><i class='fa fa-times text-dark'></i></a>"+
html+="<a href='javascript:;' class='btn-red text-white deleteDoc'><i class='fa fa-times text-dark'></i></a>"+
"<input type='hidden' class='docsId' value='"+o.files[i]._id.$id+"'>";
}
html +="</div>";
......
......@@ -220,7 +220,7 @@
<div class="col-sm-2 col-md-2 col-xs-12 text-right margin-top-5 no-padding" id="col-btn-type-directory">
<button class="btn text-white bg-dark btn-open-filliaire">
<i class="fa fa-th"></i>
<span class="hidden-xs"><?php echo Yii::t("common","Thématiques") ?></span>
<span class="hidden-xs"><?php echo Yii::t("common","Themes") ?></span>
</button><hr class="hidden-xs">
<button class="btn text-black bg-white btn-directory-type btn-all" data-type="all">
<i class="fa fa-search"></i>
......
......@@ -720,6 +720,8 @@
KScrollTo("#topPosKScroll");
initDateHeaderPage(contextData);
getContextDataLinks();
if(typeof contextData.links != "undefined" && rolesList != "undefined")
pushListRoles(contextData.links);
//Sig.showMapElements(Sig.map, mapElements);
var elemSpec = dyFInputs.get("<?php echo $type?>");
......
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