Commit e1143be9 authored by Ifaliana Arimanana's avatar Ifaliana Arimanana
Browse files

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

parents 05b51ebc 1c73fc2b
......@@ -224,15 +224,15 @@ costum.initCssCustom=function(){
if(jsonHelper.notNull(style+".menuTop.app") ){
str+="#mainNav .menu-app-top{"+costum.getStyleCustom(".menuTop.app")+"}";
if(jsonHelper.notNull(style+".menuTop.app.button") )
str+="#mainNav .lbh-menu-app,#mainNav .lbh-anchor{"+costum.getStyleCustom(".menuTop.app.button")+"}";
str+="#mainNav .lbh-menu-app,#mainNav .lbh-urlExtern,#mainNav .lbh-anchor{"+costum.getStyleCustom(".menuTop.app.button")+"}";
if(jsonHelper.notNull(style+".menuTop.app.button.design") )
str+= "@media (min-width: 767px){"+
"#mainNav .lbh-menu-app,#mainNav .lbh-anchor{"+costum.getStyleCustom(".menuTop.app.button.design")+"}"+
"#mainNav .lbh-menu-app,#mainNav .lbh-urlExtern,#mainNav .lbh-anchor{"+costum.getStyleCustom(".menuTop.app.button.design")+"}"+
"}";
if(jsonHelper.notNull(style+".menuTop.app.button.design.hover") )
str+= "@media (min-width: 767px){"+
"#mainNav .lbh-menu-app:hover,#mainNav .lbh-menu-app.active,#mainNav .lbh-anchor:hover,#mainNav .lbh-anchor.active"+
"#mainNav .lbh-menu-app:hover,#mainNav .lbh-urlExtern:hover,#mainNav .lbh-menu-app.active,#mainNav .lbh-anchor:hover,#mainNav .lbh-anchor.active"+
"{"+costum.getStyleCustom(".menuTop.app.button.design.hover")+"}"+
"}";
......
......@@ -536,17 +536,17 @@ var carouselObj = {
if(exists(paramsData["elDesign"]) && paramsData["elDesign"] == 1 || paramsData["elDesign"] == 3){
properties["infoDistanceFromImage"] = {
"inputType" : "text",
"inputType" : "text",
"label" : "Distance des infos et image('ex: -150px')",
"placeholder" : "-144px"
};
properties["infoMarginLeft"] = {
"inputType" : "text",
"inputType" : "text",
"label" : "Marge à gauche",
"placeholder" : "0px"
};
properties["infoMarginRight"] = {
"inputType" : "text",
"inputType" : "text",
"label" : "Marge à droite",
"placeholder" : "0px"
};
......@@ -586,7 +586,7 @@ var carouselObj = {
if(exists(paramsData["elDesign"]) && paramsData["elType"] == "events"){
properties["infoDateFormat"] = {
"inputType" : "select",
"inputType" : "select",
"label" : "Format de la date",
"options" : {
"1" : "Format 1",
......@@ -704,13 +704,29 @@ var carouselObj = {
}
i++;
});
if(exists(paramsData["cardNbResult"]) && notEmpty(paramsData["cardNbResult"]) && dataCount > paramsData["cardNbResult"])
html +=
if(exists(paramsData["cardNbResult"]) && notEmpty(paramsData["cardNbResult"]) && dataCount > paramsData["cardNbResult"]){
if (paramsData["elType"] == "events")
html +=
`<div class="swiper-slide">
<a href="#search?types=${paramsData["elType"]}" class="btn btn-sm btn-primary lbh see-more">
<i class="fa fa-plus"></i> VOIR PLUS
</a>
</div>`;
<a href="#agenda" class="btn btn-sm btn-primary lbh see-more">
<i class="fa fa-plus"></i> VOIR PLUS
</a>
</div>`;
else if (paramsData["elType"] == "classifieds")
html +=
`<div class="swiper-slide">
<a href="#annonces" class="btn btn-sm btn-primary lbh see-more">
<i class="fa fa-plus"></i> VOIR PLUS
</a>
</div>`;
else
html +=
`<div class="swiper-slide">
<a href="#search?types=${paramsData["elType"]}" class="btn btn-sm btn-primary lbh see-more">
<i class="fa fa-plus"></i> VOIR PLUS
</a>
</div>`;
}
carouselObj.multiCart.htmlCarousel(kunik);
$('.container1-' + kunik + ' .swiper-wrapper').html(html);
}
......
......@@ -38,6 +38,7 @@ class CocityController extends CommunecterController {
],
"haveTpl" => "false",
"position" => $key,
"blockCmsColorTitle3" => "white",
"creator" => $_POST['map']['creator']
);
......@@ -45,16 +46,20 @@ class CocityController extends CommunecterController {
$arrayInsert =array_merge($arrayInsert, [
"elPoiType" =>"article",
"elType" => "poi",
"title" => "Actualité",
"blockCmsColorTitle1" => "#005E6F",
"blockCmsColorTitle6" => "#005E6F",
"blockCmsColorTitle5" => "#000000",
"blockCmsColorTitle3" => "#000000",
"blockCmsTextSizeTitle1" => "35",
"imgBorderColor" => "#ffffff",
"showAdress" => true,
"imgHeight" => "400px",
"imgBg" => "#ffffff",
"infoBg" => "#ffffff",
"imgRound" => "5%",
"imgWidth" => "400px",
"imgWidth" => "300px",
"imgWidth" => "300px",
"showDate" => true,
"showDescription" => true,
"showName" => true,
......@@ -73,6 +78,7 @@ class CocityController extends CommunecterController {
"socialBgColor" => "white",
"socialColor" => "0a96b5",
"socialPosition" => "center",
"blockCmsBgColor" => "#0a96b5",
"blockCmsColorTitle1" => "white",
"blockCmsColorTitle3" => "white",
"showType" => ""
......@@ -144,13 +150,11 @@ class CocityController extends CommunecterController {
"spanTooltip" => true,
"labelClass" => "padding-left-10",
"buttonList"=>[
"#search"=> true,
"#search"=> true,
"#live" => true,
"#agenda"=> true,
"#annonce"=>true,
"#dda"=>true
]
],
"add"=>true
......
......@@ -36,16 +36,27 @@ class FiliereController extends CommunecterController {
"paddingBottom" => "0",
"paddingLeft" => "0",
"paddingRight" => "0",
"paddingTop" => "0",
"paddingTop" => "0"
);
if($key==0){
if(file_exists(Yii::app()->getModule("costum")->assetsUrl."/images/filiereGenerique/".$_POST['thematic'].".png")){
$mybaseUrl = Yii::app()->baseUrl;
$myAssetsUrl = Yii::app()->getModule("costum")->assetsUrl;
//if(is_file($mybaseUrl.$myAssetsUrl.'/images/filiereGenerique/'.$_POST["thematic"].'.png')){
$arrayInsert["logo"] = $myAssetsUrl.'/images/filiereGenerique/'.$_POST["thematic"].'.png';
//}else{
// $arrayInsert["logo"] = $myAssetsUrl."/images/filiereGenerique/default.png";
//}
$arrayInsert["titleBlock"] = $_POST['map']['name'];
$arrayInsert["subtitleBlock"] = $_POST['ville'];
$arrayInsert["blockCmsColorTitle1"] = "white";
$arrayInsert["blockCmsColorTitle2"] = "white";
$arrayInsert["logo"] = Yii::app()->getModule("costum")->assetsUrl."/images/filiereGenerique/".$_POST['thematic'].".jpg";
}else{
$arrayInsert["logo"] = Yii::app()->getModule("costum")->assetsUrl."/images/filiereGenerique/default.png";
}
}
Yii::app()->mongodb->selectCollection("cms")->insert($arrayInsert);
......@@ -156,10 +167,27 @@ class FiliereController extends CommunecterController {
]
]);
$values = [
"cocity"=>$_POST['cocity'],
"ville"=>$_POST['ville'],
"thematic"=>$_POST['thematic'],
"costum"=>[
"slug"=>"filiereGenerique",
"htmlConstruct"=>$htmlConstruct,
"typeObj"=>$typeObj
]
];
if(isset($_POST['map']['geo']) && isset($_POST['map']['geoPosition']) && isset($_POST['map']['address'])){
$values["geo"] = $_POST['map']['geo'];
$values["geoPosition"] = $_POST['map']['geoPosition'];
$values["address"] = $_POST['map']['address'];
}
// base config costum
PHDB::update("organizations",
array('slug' => $_POST['map']["slug"]),
array('$set' => ["cocity"=>$_POST['cocity'], "ville"=>$_POST['ville'], "thematic"=>$_POST['thematic'], "costum"=>["slug"=>"filiereGenerique", "htmlConstruct"=>$htmlConstruct, "typeObj"=>$typeObj]]));
array('$set' => $values));
echo Rest::json(array('url' => Yii::app()->baseUrl.'/costum/co/index/slug/'.$_POST['map']["slug"]));
}
......
{
"slug" : "appelAProjet",
"welcomeTpl" : "costum.views.custom.appelAProjet.home",
"sourceKey" : true,
"favicon" : "",
"metaImg" : "",
"metaTitle" : "appelAProjet",
"logoMin" : "",
"formId" : "projetId",
"docId" : "id",
"admin" : {
"email" : ""
},
"js" : {
"urls" : [
"index.js"
]
},
"dynForm" : {
"jsonSchema" : {
"title" : "Template config",
"type" : "object"
}
},
"css" : {
"urls" : [
"index.css"
],
"loader" : {
"background" : "white",
"ring1" : {
"color" : "#3a8037",
"height" : 360,
"width" : 360,
"left" : -15,
"borderWidth" : 4,
"top" : -35
},
"ring2" : {
"color" : "#f8904a",
"height" : 350,
"width" : 350,
"left" : -10,
"borderWidth" : 5,
"top" : -30
}
},
"progress" : {
"value" : {
"background" : "#3a8037"
},
"bar" : {
"background" : "#fff"
}
},
"menuTop" : {
"background" : "white",
"boxShadow" : "1px 1px 3px #ddd",
"logo" : {
"height" : 70
},
"app" : {
"paddingLeft" : "30px",
"button" : {
"fontSize" : 20,
"fontWeight" : 800,
"paddingBottom" : "0px",
"marginLeft" : "10px",
"textTransform" : "capitalize",
"color" : "#000000"
}
},
"button" : {
"paddingTop" : 0,
"fontSize" : 30,
"color" : "#5b2649"
},
"scopeBtn" : {
"color" : "#5b2649"
},
"filterBtn" : {
"color" : "#5b2649"
},
"badge" : {
"background" : "#5b2649",
"border" : "1px solid white"
},
"connectBtn" : {
"background" : "#5b2649",
"color" : "white",
"fontSize" : 18,
"borderRadius" : 10,
"padding" : "8px 15px"
}
},
"menuApp" : {
"background" : "#3a8037",
"button" : {
"fontSize" : 80,
"color" : "#008037",
"hover" : {
"borderBottom" : "2px solid #fff"
}
}
},
"button" : {
"footer" : {
"add" : {
"paddingLeft" : "10px",
"fontSize" : 30,
"bottom" : 1000,
"background" : "transparent",
"color" : "#098048"
},
"toolbarAdds" : {
"bottom" : 10,
"paddingLeft" : "40px",
"fontSize" : 50,
"left" : "0"
}
}
},
"color" : {
"purple" : "#5b2649",
"blue" : "#0091c6",
"orange" : "#fea621"
}
},
"app" : {},
"htmlConstruct" : {
"element" : {
"tplCss" : [
"v1.0_pageProfil.css"
],
"banner" : "co2.views.element.bannerHorizontal",
"containerClass" : {
"centralSection" : "col-xs-12 col-lg-10 col-lg-offset-1"
},
"menuTop" : {
"class" : "col-xs-12",
"left" : {
"class" : "col-lg-3 col-md-3 col-sm-4 hidden-xs no-padding",
"buttonList" : {}
},
"right" : {
"class" : "col-md-12 col-sm-12 col-lg-12 col-xs-12 text-center",
"buttonList" : {
"xsMenu" : {
"class" : "visible-xs",
"buttonList" : {}
},
"app" : {
"class" : "hidden-xs",
"label" : true,
"icon" : false,
"spanTooltip" : false,
"buttonList" : {}
},
"params" : {
"buttonList" : {
"settings" : true
}
}
}
}
}
},
"directoryViewMode" : "block",
"footer" : {
"url" : "costum.views.custom.appelAProjet.footer"
},
"redirect" : {
"logged" : "welcome",
"unlogged" : "welcome"
}
},
"typeObj" : {},
"filters" : {
"sourceKey" : true
}
}
\ No newline at end of file
<?php
if(isset($this->costum["contextType"]) && isset($this->costum["contextId"])){
$el = Element::getByTypeAndId($this->costum["contextType"], $this->costum["contextId"] );
}
$param=["canEdit"=>true];
$params = [
"tpl" => $el["slug"],
"slug" =>$this->costum["slug"],
"canEdit" =>true,
"el" =>$el
];
echo $this->renderPartial("costum.views.tpls.tplsEngine", $params,true );
?>
<script type="text/javascript">
jQuery(document).ready(function() {
});
</script>
\ No newline at end of file
graph
\ No newline at end of file
......@@ -88,7 +88,6 @@ if($paramsData["elType"] == "events" || $paramsData["elType"] == "organizations"
sectionDyf.<?php echo $kunik ?>ParamsData = <?php echo json_encode( $paramsData ); ?>;
var addType = "<?= $addType ?>";
var contextData = <?php echo json_encode($el); ?>;
contextData.id = contextData._id.$id;
var commonElObj = {
"beforeBuild":{
......
......@@ -176,15 +176,7 @@ if (isset($blockCms)) {
tplCtx.value[k] = $("#"+k).val();
});
mylog.log("save tplCtx",tplCtx);
try {
tplCtx.value["geo"] = cocity.geo;
tplCtx.value["geoPosition"] = cocity.geoPosition;
tplCtx.value["address"] = cocity.address;
} catch (error) {
mylog.log("Get address error", error);
}
mylog.log("save tplCtx",tplCtx);
if(typeof tplCtx.value == "undefined")
toastr.error('value cannot be empty!');
......@@ -221,15 +213,12 @@ if (isset($blockCms)) {
defaultTags = cocity.filiere[thematic.toLowerCase()]["tags"];
}
/**
if(cocity.address && cocity.geo && cocity.geoPosition){
defaultLocation = {
"address": cocity.address,
"geo":cocity.geo,
"geoPosition": cocity.geoPosition
}
dyFInputs.formLocality("Ndao ary soloana", "Eto ilay Izy", null, defaultLocation);
}
}**/
dyFObj.openForm(
'organization',
......@@ -242,6 +231,13 @@ if (isset($blockCms)) {
null,
{
afterSave : function(orga){
if(cocity.address && cocity.geo && cocity.geoPosition){
if(typeof orga["map"]["address"] == "undefined" && typeof orga["map"]["geo"] == "undefined" && typeof orga["map"]["geoPosition"]=="undefined"){
orga["map"]["address"] = cocity.address;
orga["map"]["geo"] = cocity.geo;
orga["map"]["geoPosition"] = cocity.geoPosition;
}
}
var data = {"cocity":cocityId, "ville":ville, "thematic":translatedThematic, ...orga};
ajaxPost(
null,
......
......@@ -40,9 +40,9 @@
"textMT" => "8.5",
"textPR" => "10",
"textPL" => "10",
"logo" => null,
"logo" => "",
"logosPosition" => "centre",
"logosWidth" => "30",
"logosWidth" => "20",
"backgroundImages"=> null
];
......@@ -54,7 +54,10 @@
}
}
$paramsData["logo"] = $logoPicture;
if(count($logoPicture)!=0){
$paramsData["logo"] = $logoPicture;
}
$paramsData["backgroundImages"] = $backgroundImages;
......@@ -105,15 +108,12 @@
position:absolute;
z-index:1;
/*text-align:center;*/
font-weight: 500;
top: <?= $paramsData['textMT']?>%;
padding-left: <?= $paramsData['textPR']?>%;
padding-left: <?= $paramsData['textPL']?>%;
margin-top: <?= $paramsData['textMT']?>%;
/*color: <?//= $paramsData["titleColor"] ?>;
text-shadow: black 0.1em 0.1em 0.2em;*/
}
.title-1, .title-2, .title-3 {
font-weight: 500;
font-weight: 900;
}
.imgBgHeight {
height: <?= $paramsData['imgHeight']?>px!important;
......@@ -150,16 +150,16 @@
<div class="containerCarousel containerCarousel-<?= $kunik?>">
<div id="docCarousel" class="carousel slide" data-ride="carousel">
<div id="head<?=$kunik ?>" class="col-xs-12">
<h3 class="title-1"><?= $paramsData["titleBlock"] ?></h3>
<h4 class="title-2"><?= $paramsData["subtitleBlock"] ?></h4>
<h1 class="title-1"><?= $paramsData["titleBlock"] ?></h1>
<h3 class="title-2"><?= $paramsData["subtitleBlock"] ?></h3>
<h5 class="title-3"><?= $paramsData["other"] ?></h5>
<br><br>
</div>
<div class="content<?=$kunik ?>">
<?php if(empty($paramsData["logo"])){
<?php if(is_string($paramsData["logo"]) && $paramsData["logo"]!=""){
?>
<img class="logo<?=$kunik ?>" src="<?= $paramsData['logo']; ?>">
<?php }else{ ?>
<img class="logo<?=$kunik ?>" src="<?= $paramsData['logo']['0'] ?>">
<?php } ?>
......@@ -168,7 +168,7 @@
<div class="carousel-inner">
<?php if(count($paramsData["backgroundImages"])==0){ ?>
<div class="item active">
<img class="imgBgHeight" src='<?php echo Yii::app()->getModule("costum")->assetsUrl; ?>/images/smarterre/cercle1.jpg'>
<img class="imgBgHeight" src='<?php echo Yii::app()->getModule("costum")->assetsUrl; ?>/images/smarterre/cercle1.jpg'>
</div>
<?php }else{ ?>
<?php foreach ($paramsData["backgroundImages"] as $key => $value){ ?>
......
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