Commit 4831f316 authored by Raph El's avatar Raph El
Browse files

Merge branch 'master' into development

parents e5ea2ef7 c34d9c26
......@@ -479,7 +479,7 @@ var coInterface = {
if(typeof formInMap != "undefined" && formInMap.actived == true)
formInMap.cancel(true);
else{
if(isMapEnd == false && contextData && contextData.map && location.hash.indexOf("#page.type."+contextData.type+"."+contextData.id) ){
if(typeof mapCO != "undefined" && isMapEnd == false && contextData && contextData.map && location.hash.indexOf("#page.type."+contextData.type+"."+contextData.id) ){
//Sig.showMapElements(Sig.map, contextData.map.data, contextData.map.icon, contextData.map.title);
mapCO.clearMap();
mapCO.addElts(contextData.map.data);
......@@ -681,6 +681,7 @@ var coInterface = {
mylog.warn("***************************************");
mylog.warn("coInterface.bindLBHLinks",$(this).attr("href"));
mylog.warn("***************************************");
searchObject.reset();
var h = ($(this).data("hash")) ? $(this).data("hash") : $(this).attr("href");
urlCtrl.loadByHash( h );
});
......@@ -688,7 +689,9 @@ var coInterface = {
e.preventDefault();
coInterface.simpleScroll(0, 500);
searchObject.reset();
mapCO.clearMap();
//if(!empty(filtersObj))
if(typeof mapCO != "undefined")
mapCO.clearMap();
contextData = null;
historyReplace=true;
urlCtrl.loadByHash($(this).data("hash"));
......@@ -862,7 +865,7 @@ var coInterface = {
showLoader : function(domContainer, msg){
color1="#354c57";
color2="#e6344d";
if(notNull(costum)){
if(typeof costum != "undefined" && notNull(costum)){
if(typeof costum.css != "undefined" && typeof costum.css.loader !="undefined"){
if(typeof costum.css.loader.ring1 != "undefined" && costum.css.loader.ring1.color != "undefined")
color1=costum.css.loader.ring1.color;
......@@ -3387,24 +3390,28 @@ function getContextDataLinks(){
success: function(data){
mylog.log("getContextDataLinks data", data);
//Sig.restartMap();
mapCO.clearMap();
if(notNull(contextData)){
contextData.map = {
data : data,
icon : "link",
title : trad.thecommunityof+" <b>"+contextData.name+"</b>"
} ;
mapCO.addElts(data)
//Sig.showMapElements(Sig.map, data, "link", trad.thecommunityof+" <b>"+contextData.name+"</b>");
if(typeof mapCO != "undefined"){
mapCO.clearMap();
if(notNull(contextData)){
contextData.map = {
data : data,
icon : "link",
title : trad.thecommunityof+" <b>"+contextData.name+"</b>"
} ;
mapCO.addElts(data)
//Sig.showMapElements(Sig.map, data, "link", trad.thecommunityof+" <b>"+contextData.name+"</b>");
}
}
//showMap();
},
error: function (error) {
mylog.log("getContextDataLinks error findGeoposByInsee", error);
//Sig.restartMap();
mapCO.clearMap();
if(typeof mapCO != "undefined")
mapCO.clearMap();
callbackFindByInseeError(error);
//showMap();
}
......
......@@ -19,14 +19,17 @@
searchObject.page=0,
searchObject.indexMin=0,
searchObject.indexStep=(typeof costum != "undefined" && notNull(costum) && typeof costum.searchObject != "undefined" && typeof costum.searchObject.indexStep != "undefined") ? costum.searchObject.indexStep : 30,
//searchObject.indexStep=(typeof costum != "undefined" && notNull(costum) && typeof costum.app != "undefined" && typeof appParamsKey != "undefined" && typeof costum.app[appParamsKey] != "undefined" && typeof costum.app[appParamsKey].searchObject != "undefined" && typeof costum.app[appParamsKey].searchObject.indexStep != "undefined") ? costum.app[appParamsKey].searchObject.indexStep : 30,
searchObject.count=true,
searchObject.initType="",
searchObject.types=[],
searchObject.types=[];
searchObject.countType=[];
searchObject.text="";
searchObject.tags=[];
if(typeof costum != "undefined" && notNull(costum) && typeof costum.searchObject != "undefined" && typeof costum.searchObject.sortBy != "undefined")
searchObject.sortBy=costum.searchObject.sortBy;
}
};
var searchInterface={
......
......@@ -23,19 +23,25 @@
<div class="" id="onepage">
<?php
//var_dump($type); exit;
// if( !empty(Yii::app()->session['costum']) &&
// !empty(Yii::app()->session['costum']['htmlConstruct']) &&
// !empty(Yii::app()->session['costum']['htmlConstruct']['element']) &&
// !empty(Yii::app()->session['costum']['htmlConstruct']['element']['url']) &&
// !empty(Yii::app()->session['costum']['htmlConstruct']['element']['url'][$type]) ) {
// if( !empty(Yii::app()->session['costum']['htmlConstruct']['element']['url'][$type]) ){
// var_dump(Yii::app()->session['costum']['htmlConstruct']['element']['url'][$type]); exit;
// }else
// var_dump(Yii::app()->session['costum']['htmlConstruct']['element']['url']); exit;
// // echo $this->renderPartial(Yii::app()->session['costum']['htmlConstruct']['element']['url'][$type],$params);
// } else {
if(in_array($type,[Person::COLLECTION,Event::COLLECTION,Project::COLLECTION,Organization::COLLECTION,Place::COLLECTION])){
if( !empty(Yii::app()->session['costum']) &&
!empty(Yii::app()->session['costum']['htmlConstruct']) &&
!empty(Yii::app()->session['costum']['htmlConstruct']['element']) &&
!empty(Yii::app()->session['costum']['htmlConstruct']['element']['url'])&&
!empty(Yii::app()->session['costum']['htmlConstruct']['element']['url'][$type]) ) {
$params = array("element"=>$element ,
"id" => @$id,
"type" => @$type,
"page" => "page",
"edit"=>$edit,
"openEdition" => $openEdition,
"linksBtn" => $linksBtn,
"isLinked" => $isLinked,
"controller" => $controller,
"countStrongLinks" => $countStrongLinks,
"countInvitations" => $countInvitations,
"countries" => $countries );
echo $this->renderPartial(Yii::app()->session['costum']['htmlConstruct']['element']['url'][$type],$params);
} else if(in_array($type,[Person::COLLECTION,Event::COLLECTION,Project::COLLECTION,Organization::COLLECTION,Place::COLLECTION])){
$params = array("element"=>$element ,
"id" => @$id,
"type" => @$type,
......@@ -64,19 +70,11 @@
// $this->renderPartial('co2.views.element.terla.index', $params );
// else if(!empty($view) && !empty($onepageKey) && in_array($view, $onepageKey)) {
// =======
if( !empty(Yii::app()->session['costum']) &&
!empty(Yii::app()->session['costum']['htmlConstruct']) &&
!empty(Yii::app()->session['costum']['htmlConstruct']['element']) &&
!empty(Yii::app()->session['costum']['htmlConstruct']['element']['url'])&&
!empty(Yii::app()->session['costum']['htmlConstruct']['element']['url'][$type]) ) {
echo $this->renderPartial(Yii::app()->session['costum']['htmlConstruct']['element']['url'][$type],$params);
} else if(isset($view) && !empty($view) && !empty($onepageKey) && in_array($view, $onepageKey))
if(isset($view) && !empty($view) && !empty($onepageKey) && in_array($view, $onepageKey))
$this->renderPartial("co2.views.element.onepage", $params);
else
$this->renderPartial('co2.views.element.profilSocial', $params );
}
if($type == News::COLLECTION){
} else if($type == News::COLLECTION){
$params = array("element"=>$element ,
"page" => "page",
"type" => $type,
......@@ -88,36 +86,7 @@
$this->renderPartial('news.views.co.standalone', $params );
}
/*if($type == Product::COLLECTION){
$params = array("element"=>$element ,
"page" => "page",
"type" => $type,
"controller" => $controller,
);
if(@$members) $params["members"] = $members;
if(@$invitedMe) $params["invitedMe"] = $invitedMe;
if(($element["creator"]==Yii::app()->session["userId"] || @Yii::app()->session["superAdmin"]) && $view != "show")
$this->renderPartial('co2.views.element.terla.dashboard', $params );
else
$this->renderPartial('co2.views.element.standalone', $params );
}
if($type == Service::COLLECTION){
$params = array("element"=>$element ,
"page" => "page",
"type" => $type,
"controller" => $controller,
);
if(@$members) $params["members"] = $members;
if(@$invitedMe) $params["invitedMe"] = $invitedMe;
if($element["creator"]==Yii::app()->session["userId"] && $view != "show")
$this->renderPartial('co2.views.element.terla.dashboard', $params );
else
$this->renderPartial('co2.views.element.standalone', $params );
}*/
if($type == Survey::COLLECTION){
else if($type == Survey::COLLECTION){
$params = array("survey"=>$element ,
"page" => "page",
"type" => $type,
......@@ -125,9 +94,7 @@
);
$this->renderPartial('co2.views.survey.entryStandalone', $params );
}
if($type == Classified::COLLECTION){
} else if($type == Classified::COLLECTION){
$params = array("element"=>$element ,
"page" => "page",
"type" => $type,
......@@ -139,9 +106,7 @@
$this->renderPartial('eco.views.co.standalone', $params );
}
if($type == Poi::COLLECTION){
}else if($type == Poi::COLLECTION){
$params = array("element"=>$element ,
"page" => "page",
"type" => $type,
......@@ -150,7 +115,6 @@
$this->renderPartial('co2.views.poi.standalone', $params );
}
// }
?>
</div>
</div>
......
......@@ -247,8 +247,11 @@ var currentKFormType = "";
jQuery(document).ready(function() {
// initKInterface();
initCountType();
loadingData = false;
mylog.log("searchObj type", type);
loadingData = false;
if(typeof costum != "undefined" && notNull(costum) && typeof costum.app != "undefined" && typeof appParamsKey != "undefined" && typeof costum.app[appParamsKey] != "undefined" && typeof costum.app[appParamsKey].searchObject != "undefined" && typeof costum.app[appParamsKey].searchObject.indexStep != "undefined")
searchObject.indexStep=costum.app[appParamsKey].searchObject.indexStep;
searchInterface.init(type);
if(type=="events"){
if(window.location.href.indexOf("#agenda") == -1)
......
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