Commit eac48b9f authored by Clément Damiens's avatar Clément Damiens

parent 81f64207
......@@ -763,6 +763,7 @@ var coInterface = {
if($(target).length>=1){
var heightTopBar = $("#mainNav").height();
if($("#territorial-menu").length >= 1) heightTopBar = $("#mainNav").height() + $("#territorial-menu").height() + 20;
if($(".headerSearchContainer").length >=1) heightTopBar +=($(".headerSearchContainer").outerHeight() + 20);
$('html, body').stop().animate({
scrollTop: $(target).offset().top - 60 - heightTopBar
}, 500, '');
......
......@@ -325,7 +325,7 @@ function autoCompleteSearch(name, locality, indexMin, indexMax){
scrollEnd = false;
}
showResultInCalendar(mapElements);
// showResultInCalendar(mapElements);
//affiche les éléments sur la carte
Sig.showMapElements(Sig.map, mapElements);
}
......
This diff is collapsed.
......@@ -122,7 +122,7 @@ function autoCompleteSearch(indexMin, indexMax, callBack){
$(".btn-start-search").addClass("bg-azure");
$(".btn-start-search").removeClass("bg-dark");
if(indexMin==0 || (typeof pageEvent != "undefined" && pageEvent)){
if((indexMin==0 || (typeof pageEvent != "undefined" && pageEvent)) && appParamsKey != "#agenda" ){
coInterface.simpleScroll(0, 400);
coInterface.showLoader("#dropdown_search",trad.currentlyresearching);
mapCO.showLoader();
......@@ -212,7 +212,7 @@ function autoCompleteSearch(indexMin, indexMax, callBack){
str=directory.endOfResult();
$("#dropdown_search").append(str);
}
if(searchObject.initType=="agenda"){
if(appParamsKey == "#agenda"){
if(searchObject.text != "")
$("#content-social .calendar").hide(700);
else if(!$("#content-social .calendar").is(":visible"))
......@@ -254,8 +254,8 @@ function autoCompleteSearch(indexMin, indexMax, callBack){
scrollEnd = false;
}*/
if(searchObject.initType == "events" && typeof showResultInCalendar != "undefined" && searchObject.text=="")
showResultInCalendar(results);
if(searchObject.initType == "events" && searchObject.text=="")
calendar.addEvents(results);//showResultInCalendar(results);
if(mapElements.length==0 || indexMin == 0)
mapElements = results;
......@@ -1846,10 +1846,12 @@ var directory = {
str += "<div class='col-xs-12 searchEntityContainer "+params.type+" "+params.elTagsList+" contain_"+params.type+"_"+params.id+" '>";
str += "<div class='searchEntity' id='entity"+params.id+"'>";
if(params.updated != null && params.updated.indexOf(trad.ago)>=0 && location.hash == "#agenda")
if(params.updated != null && params.updated.indexOf(trad.ago)>=0)
params.updated = trad.rightnow;
if(params.updated != null && !params.useMinSize)
if(Date.parse(params.startDate) > Date.now()){
params.updated="";
}
if(params.updated != null && params.updated!= "")
str += "<div class='dateUpdated'><i class='fa fa-flash'></i> " + params.updated + "</div>";
var dateFormated = directory.getDateFormated(params);
......
......@@ -764,11 +764,11 @@ function displayInTheContainer(data, dataName, dataIcon, contextType, edit){
//init calendar view
calendar.init("#profil-content-calendar");
mylog.log("calendar data", data);
calendar.showCalendar("#profil-content-calendar", data);
$(window).on('resize', function(){
$("#profil-content-calendar").fullCalendar('destroy');
calendar.showCalendar("#profil-content-calendar", data, "month");
});
calendar.addEvents(data);
//$(window).on('resize', function(){
// $("#profil-content-calendar").fullCalendar('destroy');
// calendar.showCalendar("#profil-content-calendar", data, "month");
//});
/*$(".fc-button").on("click", function(e){
calendar.setCategoryColor();
})*/
......
......@@ -52,21 +52,25 @@ HtmlHelper::registerCssAndScriptsFiles( array( '/css/calendar.css') , Yii::app(
<!-- <div class='col-xs-12 margin-bottom-10'>
<a href='javascript:;' id='showHideCalendar' class='text-azure' data-hidden='0'><i class='fa fa-caret-up'></i> Hide calendar</a>
</div> -->
<div id='profil-content-calendar' class='col-xs-12 margin-bottom-20' style="height: 450px"></div>
<div id='profil-content-calendar' class='col-xs-12 margin-bottom-20'></div>
<div class="col-xs-12">
<div id='situate-day' class="col-xs-12">
<h2 class="text-white date" style="text-transform:inherit;padding-left:15px;"><i class="fa fa-angle-down"></i> <span class="date-label"><?php echo Yii::t("common","Coming events"); ?></span></h2>
</div>
</div>
</div>
<script type="text/javascript">
function showResultInCalendar(mapElements){
/*function showResultInCalendar(mapElements){
calendar.init("#profil-content-calendar");
$("#profil-content-calendar").fullCalendar('destroy');
calendar.showCalendar("#profil-content-calendar", mapElements, "month");
$("#profil-content-calendar").fullCalendar("gotoDate", moment(Date.now()));
$(window).on('resize', function(){
//$("#profil-content-calendar").fullCalendar('destroy');
/*$(window).on('resize', function(){
$("#profil-content-calendar").fullCalendar('destroy');
calendar.showCalendar("#profil-content-calendar", mapElements, "month");
});
}
}*/
</script>
\ No newline at end of file
......@@ -289,6 +289,7 @@ jQuery(document).ready(function() {
if(window.location.href.indexOf("#agenda") == -1)
window.history.pushState({},"", window.location.href+"#agenda");
calculateAgendaWindow(0);
calendar.init("#profil-content-calendar");
}
// var paramsMapCO = {
// container : "mapContent",
......
......@@ -393,6 +393,7 @@ var trad = {
"selectscopesearch":"<?php echo Yii::t("common","Select scopes of research") ?>",
"communectyou":"<?php echo Yii::t("common","Connect to your city") ?>",
"communectwith":"<?php echo Yii::t("common","Connected with") ?>",
"today":"<?php echo Yii::t("translate","Today") ?>",
"sunday":"<?php echo Yii::t("translate","Sunday") ?>",
"monday":"<?php echo Yii::t("translate","Monday") ?>",
"tuesday":"<?php echo Yii::t("translate","Tuesday") ?>",
......
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