Commit 5fbcb659 authored by tonyemma's avatar tonyemma

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

parents a889df40 ad02407f
......@@ -540,14 +540,14 @@ var coInterface = {
if($("#headerBand").length > 0){
if($(this).scrollTop() > $("#headerBand").outerHeight() && infScroll){
coInterface.menu.initTopPostion=0;
coInterface.setDomHtmlPosition();
$("#affix-sub-menu, #mainNav, #menuApp, #filters-nav").removeClass("position-absolute");
$(".main-container.vertical .headerSearchContainer").addClass("affix");
coInterface.setDomHtmlPosition();
infScroll=false;
}else if($(this).scrollTop()<=$("#headerBand").outerHeight() && !infScroll){
coInterface.menu.initTopPostion=$("#headerBand").outerHeight();
coInterface.setDomHtmlPosition();
$("#affix-sub-menu, #mainNav, #filters-nav, #menuApp").addClass("position-absolute");
coInterface.setDomHtmlPosition();
infScroll=true;
}
......@@ -587,11 +587,14 @@ var coInterface = {
}, 400);
},
setDomHtmlPosition: function(){
mylog.log("coInterface.setDomHtmlPosition", coInterface.menu.initTopPostion);
$("#mainNav").css("top",coInterface.menu.initTopPostion);
//heightNav=$("#mainNav").outerHeight();
heightTopMenu=$("#mainNav").outerHeight()+coInterface.menu.initTopPostion;
mylog.log("coInterface.setDomHtmlPosition", heightTopMenu, $("#mainNav").outerHeight());
$("#menuApp, #affix-sub-menu").css("top",heightTopMenu);
$("#notificationPanelSearch.vertical.arrow_box, #floopDrawerDirectory, #modal-preview-coop, .main-container .dropdown-main-menu, #mainNav .dropdown-result-global-search, .main-container.vertical .portfolio-modal.modal, .portfolio-modal.modal.vertical").css("top",heightTopMenu);
$("#notificationPanelSearch.horizontal.arrow_box, #notificationPanelSearch.vertical.arrow_box, #floopDrawerDirectory, #modal-preview-coop, .main-container .dropdown-main-menu, #mainNav .dropdown-result-global-search, .main-container.vertical .portfolio-modal.modal, .portfolio-modal.modal.vertical").css("top",heightTopMenu);
$(".dropdownApps-menuTop .dropdown-menu, #affix-sub-menu .dropdown-result-global-search").css("top", (heightTopMenu+$("#text-search-menu").height()));
coInterface.setTopPosition(false);
/*if(heightNav > 70){
......@@ -600,6 +603,7 @@ var coInterface = {
} */
},
setTopPosition: function(bool){
mylog.log("coInterface.setTopPosition", bool);
headerScaling=bool;
heightPos=$("#mainNav").outerHeight();
if(coInterface.menu.initTopPostion!=0)
......@@ -618,6 +622,7 @@ var coInterface = {
heightPos=heightPos+$("#filters-nav").outerHeight();
$("#mapContent").css("top",heightPos);
if($(".main-container.vertical .headerSearchContainer").hasClass("affix")){
mylog.log("coInterface.setTopPosition headerSearchContainer heightPos", heightPos);
$(".main-container.vertical .headerSearchContainer").css("top",heightPos);
heightPos=heightPos+$(".main-container.vertical .headerSearchContainer").outerHeight();
}else{
......
......@@ -1935,24 +1935,6 @@ var directory = {
str += "</div>";
if("undefined" != typeof params.organizerObj && params.organizerObj != null){
str += "<div class='col-md-8 col-sm-8 col-xs-12 entityOrganizer margin-top-10'>";
if("undefined" != typeof params.organizerObj.profilThumbImageUrl &&
params.organizerObj.profilThumbImageUrl != ""){
str += "<img class='pull-left img-responsive' src='"+baseUrl+params.organizerObj.profilThumbImageUrl+"' height='50'/>";
}
console.log("typeDYN",params.organizerObj.type, params.organizerObj);
elem = dyFInputs.get(params.organizerObj.type);
str += "<h5 class='no-margin padding-top-5'><small>"+tradDynForm.organizedby+"</small></h5>";
str += "<a href='#page.type."+elem.col+".id."+params.organizerObj["_id"]["$id"]+"' class='lbh' > <small class='entityOrganizerName'>"+params.organizerObj.name+"</small></a>";
str += "</div>";
}
str += "<div class='col-md-8 col-sm-8 col-xs-12 entityRight padding-top-10 margin-top-10 pull-right' style='border-top: 1px solid rgba(0,0,0,0.2);'>";
var thisLocality = "";
......@@ -1978,7 +1960,22 @@ var directory = {
params.name +
"</a>";
if("undefined" != typeof params.organizer && params.organizer != null){
countOrganizer=Object.keys(params.organizer).length;
str += "<div class='col-xs-12 margin-top-10 no-padding'>";
str+="<span class='bold'>"+tradDynForm.organizedby+" : </span>";
$.each(params.organizer, function(e,v){
imgIcon = (typeof v.profilThumbImageUrl != "undefined" && v.profilThumbImageUrl!="" ) ? baseUrl+"/"+v.profilThumbImageUrl: assetPath + "/images/thumb/default_"+v.type+".png";
str+='<a href="#page.type.'+v.type+'.id.'+e+'" class="lbh-preview-element tooltips" ';
if(countOrganizer>1) str+= 'data-toggle="tooltip" data-placement="top" title="'+v.name+'"';
str+=">"+
'<img src="'+imgIcon+'" class="img-circle margin-right-10" width="35" height="35"/>';
if(countOrganizer==1) str+=v.name;
str+="</a>";
});
str+="</div>";
}
str += "<div class='entityDescription margin-bottom-10'>" +
params.description +
"</div>";
......@@ -3045,8 +3042,9 @@ var directory = {
.done(function (data) {
if ( data && data.result ) {
toastr.info("élément effacé");
if( $("#"+type+id).length > 0)
$("#"+type+id).remove();
if( $(".contain_"+type+"_"+id).length > 0 )
else if( $(".contain_"+type+"_"+id).length > 0 )
$(".contain_"+type+"_"+id).remove();
else
urlCtrl.loadByHash( location.hash );
......@@ -3723,6 +3721,7 @@ var directory = {
}*/
html+="</div>";
mylog.log("directory.getAdminToolBar html end", html);
return html;
},
getTypeObj: function(e){
......
......@@ -79,11 +79,15 @@ function autoCompleteSearchGS(search, indexMin, indexMax, input, callB){
data.countType = [ "citoyens", "organizations", "projects", "events" ];
data.searchType = [ "citoyens", "organizations", "projects", "events" ];
}
if(typeof costum != "undefined" && notNull(costum) && typeof costum.filters != "undefined" && typeof costum.filters.searchTypeGS != "undefined"
&& (!notNull(input) || $.inArray(input, ["#filter-scopes-menu", "#scopes-news-form"]) < 0)){
if(typeof costum != "undefined" && notNull(costum) && typeof costum.filters != "undefined" && (!notNull(input) || $.inArray(input, ["#filter-scopes-menu", "#scopes-news-form"]) < 0)){
if(typeof costum.filters.searchTypeGS != "undefined"){
data.countType = costum.filters.searchTypeGS;
data.searchType = costum.filters.searchTypeGS;
}
if(typeof costum.filters.sourceKey != "undefined"){
data.sourceKey=[costum.slug];
}
}
var domTarget = (notNull(input)) ? input+" .dropdown-result-global-search" : ".dropdown-result-global-search";
var dropDownVisibleDom=(notNull(input)) ? input+" .dropdown-result-global-search" : ".dropdown-result-global-search";
if($(domTarget+" .content-result").length > 0)
......
......@@ -450,7 +450,7 @@ function bindButtonMenu(){
function getLabelTitleDir(dataName, dataIcon, countData, n){
mylog.log("getLabelTitleDir", dataName, dataIcon, countData, n, trad);
var elementName = "<span class='Montserrat' id='name-lbl-title'>"+$("#nameHeader .name-header").html()+"</span>";
var elementName = "<span class='Montserrat' id='name-lbl-title'>"+contextData.name+"</span>";
var s = (n>1) ? "s" : "";
......@@ -696,7 +696,7 @@ function displayInTheContainer(data, dataName, dataIcon, contextType, edit){
communityStr +='</div>';
}*/
mylog.log("communityStr", n, communityStr);
mylog.log("displayInTheContainer communityStr", n, communityStr);
if(n>0){
var thisTitle = getLabelTitleDir(dataName, dataIcon, parseInt(n), n);
......@@ -756,6 +756,7 @@ function displayInTheContainer(data, dataName, dataIcon, contextType, edit){
});
}
toogleNotif(false);
mylog.log("displayInTheContainer html",html);
$("#central-container").html(html);
//if(dataName != "collections" && directory.viewMode=="block")
// setTimeout(function(){ directory.checkImage(data);}, 300);
......@@ -788,7 +789,7 @@ function displayInTheContainer(data, dataName, dataIcon, contextType, edit){
});
});
}
mylog.log("displayInTheContainer here");
mylog.log("dataToMap", dataToMap);
$("#btn-show-links-onmap").off().click(function(){
//Sig.showMapElements(Sig.map, dataToMap, "", thisTitle);
......@@ -804,6 +805,7 @@ function displayInTheContainer(data, dataName, dataIcon, contextType, edit){
var html = communityStr+"<div class='col-md-12 col-sm-12 col-xs-12 labelTitleDir margin-bottom-15'>"+
getLabelTitleDir(dataName, dataIcon, parseInt(n), n)+
"</div>";
mylog.log("displayInTheContainer html2", html);
$("#central-container").html(html + "<span class='col-md-12 alert bold bg-white'>"+
"<i class='fa fa-ban'></i> "+trad.nodata+
"</span>");
......@@ -816,7 +818,9 @@ function displayInTheContainer(data, dataName, dataIcon, contextType, edit){
$(".load-coummunity").removeClass("active");
$(this).addClass("active");
pageProfil.params.dir = $(this).data("type-dir");
location.hash=hashUrlPage+".view.directory.dir."+pageProfil.params.dir;
//history.pushState remplace le location.hash car il recharge la page .
//location.hash=hashUrlPage+".view.directory.dir."+pageProfil.params.dir;
history.pushState(null, null, hashUrlPage+".view.directory.dir."+pageProfil.params.dir);
pageProfil.views.directory();
});
}
......
......@@ -7,8 +7,10 @@
"tool" : { "label": "Tool","key":"tool","icon":"wrench"},
"machine" : { "label": "Machine","key":"machine","icon":"cogs"},
"article" : { "label": "Article","key":"article","icon":"newspaper-o"},
"forum" : { "label": "Forum","key":"forum","icon":"comment"},
"cms" : { "label": "CMS","key":"cms","icon":"edit"},
"doc" : { "label": "Documentation","key":"doc","icon":"book"},
"faq" : { "label": "FAQ","key":"faq","icon":"info"},
"software" : { "label": "Software","key":"software","icon":"code"},
"rh" : { "label": "Human ressource","key":"rh","icon":"users"},
"financialRessource" : { "label": "Financial ressource","key":"RessourceFinanciere","icon":"money"},
......
This diff is collapsed.
......@@ -7,6 +7,12 @@ co2/datamigration/ModifyCostumDB
/////////////////////////// End permanent bash /////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
*** CTENAT
co2/datamigration/UpdateAnswersIndicateurs
co2/datamigration/FinancterLabel
co2/datamigration/Financter
co2/datamigration/UpdateAnswersActionCandidateMissing
/////////////////////////// BASH VERSION 0.99 /////////////////////////////////////
// This file helps any devlopper to update his environment in order to make it work
......
......@@ -69,6 +69,16 @@
// $pageConfig=(@Yii::app()->session['paramsConfig']["element"]) ? Yii::app()->session['paramsConfig']["element"] : null;
// $addConfig=(@Yii::app()->session['paramsConfig']["add"]) ? Yii::app()->session['paramsConfig']["add"] : null;
///-------------- END ------------////
if(empty($element["_id"])){
$what=(@$element["type"]) ? "the ".Element::getControlerByCollection($element["type"]) : "the element";
?>
<script type="text/javascript">
urlCtrl.loadByHash("");
bootbox.dialog({message:"<div class='alert-danger text-center'><strong><?php echo Yii::t("common","{what}, that you are looking for, has been deleted or doesn't exist", array("{what}"=>ucfirst(Yii::t("common", $what)))) ?></strong></div>"});
</script>
<?php
exit;
}
if(@Yii::app()->params["front"]) $front = Yii::app()->params["front"];
$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.';
$auth = Authorisation::canParticipate(Yii::app()->session['userId'], $type, (string)$element["_id"]);
......
......@@ -32,6 +32,9 @@
$addCogFlag=true;
$addCogFlag=15;
//print_r($e);
if(is_array(@$e["name"]))
$name = @$e["name"][0];
else
$name = @$e["name"];
$status="";
$statTit="";
......@@ -64,7 +67,6 @@
$anId = $k;
$contentPop=$statTit.$rolesStr.$status;
?>
<!--<a href="#page.type.<?php echo $e["type"] ?>.id.<?php echo $anId; ?>" title="<?php echo $name ?>" class="lbh btn no-padding contentImg <?php echo $grayscale ?> tooltips" data-toggle="tooltip" data-placement="top" data-original-title="<?php echo $name ?>">-->
<a href="#page.type.<?php echo $e["type"] ?>.id.<?php echo $anId; ?>" class="hover-underline" data-toggle="popover" title="<?php echo $name ?>" data-content="<?php echo $contentPop ?>">
<img width="<?php echo $heightWidth ?>" height="<?php echo $heightWidth ?>" alt="image" class="<?php echo @$imgClass ?>" src="<?php echo $imgPath ?>">
</a>
......
......@@ -8,15 +8,7 @@
padding-bottom: 15px;
}
</style>
<?php
//var_dump($params);
if(!empty($params["files"])){ ?>
<h5 class="col-xs-12 title-files-list text-dark"> Voir le récapitulatif de la mesure :</h5>
<?php foreach($params["files"] as $k => $v){ ?>
<div class='col-xs-12 padding-5 shadow2 margin-top-5 margin-bottom-5'>
<a href='<?php echo $v["docPath"] ?>' target='_blank' class="link-files"><i class="fa fa-file-pdf-o text-red"></i> <?php echo $v["name"] ?></a>
</div>
<?php } } ?>
<div id="description" class="description-preview col-xs-12 no-padding activeMarkdown"><?php echo (!empty($params["description"]) ? $params["description"] : "" ); ?></div>
<?php
......
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