Commit e0439a30 authored by Raph El's avatar Raph El

Modif network

parent 69783445
......@@ -47,6 +47,7 @@ class NetworkModule extends CWebModule {
'citizenToolKit.models.*',
'ressources.models.*',
'classifieds.models.*',
'places.models.*',
$this->id.'.models.*',
$this->id.'.components.*',
$this->id.'.messages.*',
......
......@@ -2136,8 +2136,27 @@ var directory = {
mylog.log("-----------networkPanelHtml", params, key);
params.title = escapeHtml(params.title);
str = "";
str += "<div class='col-lg-4 col-md-6 col-sm-6 col-xs-12 margin-bottom-10 ' style='word-wrap: break-word; overflow:hidden;''>";
str += "<div class='searchEntity networkPanelHtml'>";
// str += "<div class='col-lg-4 col-md-6 col-sm-6 col-xs-12 margin-bottom-10 ' style='word-wrap: break-word; overflow:hidden;''>";
// str += "<div class='searchEntity networkPanelHtml'>";
str += "<div class='col-lg-4 col-md-6 col-sm-6 col-xs-12 searchEntityContainer contain_"+params.type+"_"+params.id+"'>";
str += '<div class="searchEntity" id="entity'+params.id+'">';
if(userId != null && userId != "" && params.id != userId && !inMyContacts(params.typeSig, params.id) && location.hash.indexOf("#page") < 0 && search.app != "territorial"){
isFollowed=false;
if(typeof params.isFollowed != "undefined" )
isFollowed=true;
mylog.log("isFollowed", params.isFollowed, isFollowed);
str += "<a href='javascript:;' class='btn btn-default btn-sm btn-add-to-directory bg-white tooltips followBtn'" +
' data-toggle="tooltip" data-placement="left" data-original-title="'+trad['Follow']+'"'+
" data-ownerlink='follow' data-id='"+params.id+"' data-type='"+params.type+"' data-name='"+params.skin.title+"' data-isFollowed='"+isFollowed+"'>"+
"<i class='fa fa-chain'></i>"+
"</a>";
}
str += "<div class='panel-heading border-light col-xs-12'>";
str += '<a href="'+baseUrl+"/network/default/index?src="+baseUrl+"/"+moduleId+"/network/get/id/"+params.id+'" target="_blank" class="text-dark">'
str += '<h4 class="panel-title text-dark pull-left">'+ params.skin.title+'</h4></a>';
......@@ -2719,8 +2738,8 @@ var directory = {
else if(params.type.substring(0,11) == "poi.interop")
str += directory.interopPanelHtml(params);
else if(params.type == "network")
str += directory.network2PanelHtml(params);
//str += directory.networkPanelHtml(params);
//str += directory.network2PanelHtml(params);
str += directory.networkPanelHtml(params);
else
str += directory.defaultPanelHtml(params);
}
......@@ -2769,7 +2788,7 @@ var directory = {
"</button> ";
countBtn++;
}
if(data.edit=="organizations" || data.edit=="projects"){
if(data.edit=="organizations" || data.edit=="projects" || data.edit=="networks"){
html +="<button class='btn btn-default btn-xs disconnectConnection'"+
" data-type='"+data.type+"' data-id='"+data.id+"' data-connection='"+data.edit+"' data-parent-hide='3'"+
" style='bottom:"+(30*countBtn)+"px'>"+
......
......@@ -383,6 +383,7 @@ function loadDataDirectory(dataName, dataIcon, edit){ mylog.log("loadDataDirecto
var type = ($.inArray(dataName, ["poi","ressources","vote","actions","discuss"]) >=0) ? dataName : null;
if(typeof edit != "undefined" && edit)
edit=dataName;
mylog.log("loadDataDirectory edit" , edit);
displayInTheContainer(data, dataName, dataIcon, type, edit);
bindButtonOpenForm();
}
......@@ -636,13 +637,13 @@ function loadActionRoom(){
function loadNetworks(){
mylog.log("HERE loadNetworks");
mylog.log("loadNetworks");
showLoader('#central-container');
getAjax('', baseUrl+'/'+moduleId+'/element/getnetworks/type/'+contextData.type+
'/id/'+contextData.id,
function(data){
mylog.log("HERE", data);
displayInTheContainer(data, "networks", "external-link", "networks");
function(data){
mylog.log("loadNetworks success", data, edit);
displayInTheContainer(data, "networks", "external-link", "networks",edit);
}
,"html");
}
......@@ -784,7 +785,7 @@ function displayInTheContainer(data, dataName, dataIcon, contextType, edit){
html += "<div class='col-md-12 margin-bottom-15 labelTitleDir'>";
console.log("eztrzeter", dataName);
mylog.log("eztrzeter", dataName);
if(dataName != "urls" && dataName != "contacts")
html += btnMap;
......@@ -804,7 +805,7 @@ function displayInTheContainer(data, dataName, dataIcon, contextType, edit){
if(dataName != "collections"){
if(mapElements.length==0) mapElements = data;
else $.extend(mapElements, data);
mylog.log("edit2", edit);
html += directory.showResultsDirectoryHtml(data, contextType, null, edit);
}else{
$.each(data, function(col, val){
......
......@@ -1491,7 +1491,7 @@ La vie en santé;Santé;;
public function actionListcountries(){
$res = Zone::getListCountry();
$res = Zone::getListCountry(true);
Rest::json($res);
Yii::app()->end();
}
......@@ -1541,4 +1541,15 @@ La vie en santé;Santé;;
Rest::json($params);
Yii::app()->end();
}
public function actionListcountries2(){
$res = Zone::getListCountry(true);
foreach ($res as $key => $value) {
echo $value["name"].", ";
}
// Rest::json($res);
// Yii::app()->end();
}
}
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