...
 
Commits (51)
#filterContainer{
margin-top:20px;
margin-bottom: 10px;
}
#filters-nav{
border-bottom: 0px !important;
}
.central-section .central-container #filterContainer{
margin-top: 0px;
}
#filterContainer .dropdown, #filters-nav .dropdown{
float: left;
display: grid;
height: 40px;
margin-bottom: 5px;
margin-right: 10px;
}
#filterContainer .dropdown .btn-menu, #filters-nav .dropdown .btn-menu{
padding: 10px 15px;
font-size: 16px;
border: 1px solid #6b6b6b;
color: #6b6b6b;
top: 0px;
position: relative;
border-radius: 20px;
text-decoration: none;
background: white;
line-height: 20px;
}
#filterContainer .dropdown .dropdown-menu, #filters-nav .dropdown .dropdown-menu{
position: absolute;
overflow-y: visible !important;
top: 50px;
left: 5px;
width: 250px;
border-radius: 2px;
border: 1px solid #6b6b6b;
padding:0px;
}
#filterContainer .dropdown .dropdown-menu:before , #filters-nav .dropdown .dropdown-menu:before,
#filterContainer .dropdown .dropdown-menu:after, #filters-nav .dropdown .dropdown-menu:after,
#costum-scope-search .dropdown-result-global-search:before,
#costum-scope-search .dropdown-result-global-search:after{
bottom: 100%;
left: 20px;
margin-top: -20px;
border: solid transparent;
content: " ";
height: 0px;
width: 0;
border-width: 11px;
position: absolute;
}
#filterContainer .dropdown .dropdown-menu:before, #filters-nav .dropdown .dropdown-menu:before,
#costum-scope-search .dropdown-result-global-search:before{
border-bottom-color: grey;
border-width: 12px;
left: 19px;
}
#filterContainer .dropdown .dropdown-menu:after, #filters-nav .dropdown .dropdown-menu:after,
#costum-scope-search .dropdown-result-global-search:after{
border-bottom-color: white;
}
#filterContainer .dropdown .dropdown-menu .list-filters, #filters-nav .dropdown .dropdown-menu .list-filters{
max-height: 300px;
overflow-y: scroll;
}
#filterContainer .dropdown .dropdown-menu button, #filters-nav .dropdown .dropdown-menu button{
border: none;
background: white;
/* width: 100%; */
text-align: left;
font-size: 14px;
padding-left: 15px;
padding: 10px 10px;
padding-left: 15px;
}
#filterContainer .dropdown .dropdown-menu button:hover, #filters-nav .dropdown .dropdown-menu button:hover{
background-color: #e8e8e8;
}
#filterContainer .dropdown .dropdown-menu button.mainTitle, #filters-nav .dropdown .dropdown-menu button.mainTitle{
font-weight: 800;
padding-left: 10px;
}
#filterContainer #input-sec-search, #filters-nav #input-sec-search{
display: grid;
margin-bottom: 5px;
margin-right: 10px;
float: left;
}
#filterContainer #input-sec-search .input-group, #filters-nav #input-sec-search .input-group{
display: inline-flex;
}
#filterContainer #input-sec-search .input-group-addon, #filters-nav #input-sec-search .input-group-addon{
padding: 10px 0px 10px 10px;
font-size: 18px;
font-weight: 400;
line-height: 1;
color: #6b6b6b;
text-align: center;
background-color: white !important;
border-right-width: 0px;
border: 1px solid #6b6b6b;
border-radius: 20px 0px 0px 20px !important;
border-right-width: 0px;
width: 30px;
}
#filterContainer #input-sec-search .input-global-search, #filters-nav #input-sec-search .input-global-search{
border-left-width: 0px;
height: 40px;
border-radius: 0px 20px 20px 0px;
box-shadow: none;
width: inherit;
border-color: #6b6b6b;
}
#activeFilters .filters-activate{
border: 2px solid transparent;
background-color: #50b796;
margin-right: 5px;
margin-bottom: 5px;
padding: 5px 10px;
border-radius: 5px;
color: white !important;
text-decoration: none;
display: inline-block;
}
#activeFilters .filters-activate i{
margin-right: 3px;
}
#filterContainer .labelFilterTit, #filters-nav .labelFilterTit{
line-height: 45px;
font-size: 20px;
margin-right: 15px;
}
#costum-scope-search .dropdown-result-global-search{
position: absolute;
top: 60px;
z-index: 1;
background-color: white;
border: 1px solid #6b6b6b;
max-height: none !important;
border-radius: 3px;
}
#costum-scope-search .dropdown-result-global-search .content-result{
height: 390px;
overflow-y: overlay;
}
@media (max-width: 768px){
#filterContainer .dropdown, #filters-nav .dropdown,
#filterContainer #input-sec-search, #filters-nav #input-sec-search,
#filterContainer #input-sec-search .input-global-search, #filters-nav #input-sec-search .input-global-search{
width: 100%;
}
}
#filters-nav{
padding-top: 10px
}
.btn-select-filliaire2 {
border-color: transparent;
text-transform: none !important;
background-color: #F2F2F2 !important;;
margin-bottom: 5px;
border-radius: 10px;
font-family: "montserrat";
font-weight: 200 !important;
font-size: 12px !important;
text-align: center !important;
}
#filters-nav-list .btn-tags-start-search2, #filters-nav-list .btn-tags-refresh2 {
border-radius: 3px;
border: 1px solid #aaa !important;
padding-bottom: 9px !important;
}
Copyright (c) 2014, Cooper Hewitt Smithsonian Design Museum (cooperhewitt.org), with Reserved Font Name Cooper Hewitt.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
\ No newline at end of file
assets/images/cressReunion/logo_cress.jpg

18.7 KB | W: | H:

assets/images/cressReunion/logo_cress.jpg

24.4 KB | W: | H:

assets/images/cressReunion/logo_cress.jpg
assets/images/cressReunion/logo_cress.jpg
assets/images/cressReunion/logo_cress.jpg
assets/images/cressReunion/logo_cress.jpg
  • 2-up
  • Swipe
  • Onion skin
var filterObj = {
container : "#filterContainer" ,
urlData : baseUrl+"/" + moduleId + "/search/globalautocomplete",
init : function(pInit = null){
mylog.log("fObj init",pInit);
//Init variable
var copyFilters = jQuery.extend(true, {}, filterObj);
copyFilters.initVar(pInit);
return copyFilters;
},
initVar : function(pInit){
mylog.log("fObj initVar",pInit);
this.container = ( (pInit != null && typeof pInit.container != "undefined") ? pInit.container : "#filterContainer" );
this.urlData = ( (pInit != null && typeof pInit.urlData != "undefined") ? pInit.urlData : "#filterContainer" );
this.urlData = ( (pInit != null && typeof pInit.filliaireCategories != "undefined") ? pInit.filliaireCategories : {} );
this.initDefaults(pInit);
this.initViews(pInit);
this.initActions(pInit);
},
initDefaults : function(pInit){
mylog.log("fObj initDefaults",pInit);
var str = "";
var fObj = this;
if(typeof pInit.defaults != "undefined"){
mylog.log("fObj initDefaults defaults");
if(typeof pInit.defaults.fields != "undefined"){
$.each(pInit.defaults.fields,function(k,v){
mylog.log("fObj initDefaults fields",k, v);
if(typeof searchObject.filters == "undefined" )
searchObject.filters = {};
if(typeof searchObject.filters[k] == "undefined" )
searchObject.filters[k] = [];
searchObject.filters[k].push(v);
});
}
}
},
initActions : function(pInit){
mylog.log("fObj initActions",pInit);
var str = "";
var fObj = this;
if(typeof pInit.filters != "undefined"){
$.each(pInit.filters,function(k,v){
mylog.log("fObj initActions each", k,v);
if(typeof v.action != "undefined" && typeof fObj.actions[v.action] != "undefined"){
fObj.actions[v.action](fObj);
}
});
}
},
initViews : function(pInit){
mylog.log("fObj initViews",pInit);
var str = '<div class="pull-left text-dark labelFilterTit"><i class="fa fa-filter"></i> <span class="hidden-sm">Filtres</span></div>';
var fObj = this;
if(typeof pInit.filters != "undefined"){
$.each(pInit.filters,function(k,v){
mylog.log("fObj initViews each", k,v);
if(typeof v.view != "undefined" && typeof fObj.views[v.view] != "undefined"){
str += fObj.views[v.view](k,v);
}
if(typeof v.filliaireCategories != "undefined")
fObj.filliaireCategories = v.filliaireCategories;
});
}
str+='<div id="activeFilters" class="col-xs-12 padding-5"></div>';
$(fObj.container).html(str);
fObj.initFilters();
},
initFilters : function(){
fObj=this;
getParamsUrls=location.hash.split("?");
if(typeof getParamsUrls[1] != "undefined" ){
var parts = getParamsUrls[1].split("&");
var $_GET = {};
var initScopesResearch={"key":"open","ids":[]};
for (var i = 0; i < parts.length; i++) {
var temp = parts[i].split("=");
$_GET[decodeURIComponent(temp[0])] = decodeURIComponent(temp[1]);
}
if(Object.keys($_GET).length > 0){
$.each($_GET, function(e,v){
v=decodeURI(v);
if(e=="tags"){
tags=v.split(",");
$.each(tags, function(i, tag){
fObj.manage.addActive(fObj,"tags",tag);
});
}
if(e=="cities" || e=="zones"){
if($.inArray(e,["cities","zones","cp"]) > -1) $.each(v.split(","), function(i, j){ initScopesResearch.ids.push(j) });
if(initScopesResearch.key!="" && initScopesResearch.ids.length > 0)
checkMyScopeObject(initScopesResearch, $_GET, function(){
if(typeof myScopes.open != "undefined" && Object.keys(myScopes.open).length > 0){
$.each(myScopes.open, function(i, scope){
if(typeof scope.active != "undefined" && scope.active)
fObj.manage.addActive(fObj, "scope",scope.name,i);
});
}
});
if(typeof myScopes.open != "undefined" && Object.keys(myScopes.open).length > 0){
$.each(myScopes.open, function(i, scope){
if(typeof scope.active != "undefined" && scope.active)
fObj.manage.addActive(fObj, "scope",scope.name,i);
});
}
}
});
}
}
},
search : function(){
searchObject.nbPage=0;
searchObject.count=true;
if(typeof searchObject.ranges != "undefined") searchAllEngine.initSearch();
if(directory.appKeyParam == "#mapcress")
searchMapCress(searchObject);
else
startSearch(0);
},
views : {
themes : function(k,v){
mylog.log("fObj views themes",k,v);
var str = "";
str +='<li class="dropdown dropdown-tags" >'+
'<a href="javascript:;" class="dropdown-toggle menu-button btn-menu text-dark pull-left" '+
' data-label-xs="tags" type="button" id="dropdownTags" data-toggle="dropdown" '+
' aria-haspopup="true" aria-expanded="false" data-toggle="tooltip" data-placement="bottom"'+
'title="Thématiques" alt="Thématiques">Thématiques<i class="fa fa-angle-down"></i></a>'+
'<div class="dropdown-menu arrow_box hidden-xs" aria-labelledby="dropdownTags" style="width : 600px !important">'+
'<div class="col-xs-12 no-padding margin-bottom-5">'+
'<div class="form-group filterstags col-md-8 col-sm-8 col-xs-10 no-margin no-padding">'+
'<input id="tagsFilterInput" class="tagsFilterInput" type="" '+
'data-type="select2" name="tags" placeholder="#Tags" value="" style="width:100%;">'+
'</div>'+
'<button class="btn btn-default letter-green col-md-2 col-sm-2 col-xs-1 btn-tags-start-search2 no-margin padding-10">'+
'<i class="fa fa-arrow-circle-right"></i> <span class="hidden-xs">Valider</span>'+
'</button>'+
'<button class="btn btn-default letter-blue col-md-2 col-sm-2 btn-tags-refresh2 no-margin padding-10">'+
'<i class="fa fa-refresh"></i> <span class="hidden-xs">Rafraichir</span>'+
'</button>'+
'</div>';
if(typeof v.filliaireCategories != "undefined" && v.filliaireCategories != null){
$.each(v.filliaireCategories, function(key, cat){
if(typeof cat.name != "undefined" && cat.name != null){
str += '<div class="col-md-2 col-sm-2 col-xs-3 no-padding">'+
'<button class="btn btn-default col-md-12 col-sm-12 col-xs-12 padding-10 bold text-dark elipsis margin-bottom-5 btn-select-filliaire2"'+
'data-fkey="'+key+'" '+
'style="border-radius:0px; border-color: transparent; text-transform: uppercase;"'+
'data-keycat="'+cat.name+'">'+
'<i class="fa '+cat.icon+' fa-2x"></i><br>'+
cat.name +
'</button>'+
'</div>';
}
});
}
str += '</div>'+
'</li>';
return str;
},
tags : function(k,v){
mylog.log("fObj views tags", k,v);
var str = "";
return str;
},
select : function(k,v){
mylog.log("fObj views select", k,v);
var str = "<select>";
str += '<option value="-1" >ALL</option>';
if(typeof v.list != "undefined"){
$.each( v.list ,function(kL,vL){
str +='<option value="'+vL+'" >'+vL+'</option>';
});
}
str += "</select>";
return str;
},
selectList : function(k,v){
mylog.log("fObj views selectList", k,v);
label=(typeof v.name != "undefined") ? v.name: "Ajouter un filtre";
str='<li class="dropdown">'+
'<a href="javascript:;" class="dropdown-toggle menu-button btn-menu" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-label-xs="types" data-toggle="tooltip" data-placement="bottom">'+
label+' <i class="fa fa-angle-down margin-left-5"></i>'+
'</a>'+
'<div class="dropdown-menu arrow_box" style="overflow-y: auto;" aria-labelledby="dropdownTypes">'+
'<div class="list-filters">';
if(typeof v.list != "undefined"){
includeSubList=(typeof v.list=="object" && !Array.isArray(v.list)) ? true : false;
$.each( v.list ,function(kL,vL){
if(includeSubList){
str +='<button class="mainTitle col-xs-12" data-field="'+v.field+'" data-type="'+v.type+'" data-value="'+kL+'" >'+kL+'</button>';
if(Object.keys(vL).length > 0){
$.each(vL, function(i, sub){
str +='<button class="col-xs-12" data-field="'+v.field+'" data-type="'+v.type+'" data-value="'+sub+'" >'+sub+'</button>';
});
}
}else{
str +='<button class="col-xs-12" data-field="'+v.field+'" data-type="'+v.type+'" data-value="'+vL+'" >'+vL+'</button>';
}
});
}
str+='</div></div>'+
'</li>';
return str;
},
scope : function(){
mylog.log("fObj views scope");
return '<div id="costum-scope-search"><div id="input-sec-search">'+
'<div class="input-group shadow-input-header">'+
'<span class="input-group-addon scope-search-trigger">'+
'<i class="fa fa-map-marker fa-fw" aria-hidden="true"></i>'+
'</span>'+
'<input type="text" class="form-control input-global-search" autocomplete="off"'+
' id="searchOnCity" placeholder="Où ?">'+
'</div>'+
'<div class="dropdown-result-global-search col-xs-12 col-sm-5 col-md-5 col-lg-5 no-padding" '+
' style="display: none;">'+
'<div class="content-result">'+
'</div>'+
'</div>'+
'</div></div>';
}
},
actions : {
themes : function(fObj){
mylog.log("fObj actions themes",fObj);
$(".btn-select-filliaire2").off().on("click",function(){
mylog.log("fObj actions themes searchInterface.init .btn-select-filliaire2", fObj.filliaireCategories);
var fKey = $(this).data("fkey");
myMultiTags = {};
tagsArray=[];
mylog.log("fObj actions themes searchInterface.init .btn-select-filliaire2 fKey", fKey);
$.each(fObj.filliaireCategories[fKey]["tags"], function(key, tag){
mylog.log("fObj actions themes searchInterface.init .btn-select-filliaire2 tag", tag);
tag=(typeof tradTags[tag] != "undefined") ? tradTags[tag] : tag;
tagsArray.push(tag);
});
mylog.log("fObj actions themes searchInterface.init .btn-select-filliaire2 tagsArray", tagsArray);
$('#tagsFilterInput').val(tagsArray).trigger("change");
});
$(".btn-tags-start-search2").off().on("click", function(){
mylog.log("fObj actions themes searchInterface.init .btn-tags-start-search2");
searchObject.tags=$('#tagsFilterInput').val().split(",");
searchObject.nbPage=0;
pageCount=true;
searchObject.count=true;
$('#tagsFilterInput').val(searchObject.tags).trigger("change");
if(typeof searchObject.ranges != "undefined") searchAllEngine.initSearch();
$(".dropdown-tags").removeClass("open");
activeTagsFilter();
startSearch(0, indexStepInit, searchCallback);
});
$(".btn-tags-refresh2").off().on("click", function(){
mylog.log("fObj actions themes searchInterface.init .btn-tags-refresh2");
searchObject.tags=[];
$('#tagsFilterInput').val("").trigger("change");
searchObject.nbPage=0;
pageCount=true;
searchObject.count=true;
if(typeof searchObject.ranges != "undefined") searchAllEngine.initSearch();
$(".dropdown-tags").removeClass("open");
activeTagsFilter();
startSearch(0, indexStepInit, searchCallback);
});
},
tags : function(fObj){
mylog.log("fObj actions tags");
$("button[data-type='tags']").off().on("click",function(){
searchObject.tags.push($(this).data("value"));
fObj.search();
fObj.manage.addActive(fObj,"tags",$(this).data("value"), $(this).data("key"), $(this).data("field"));
});
},
filters : function(fObj){
mylog.log("fObj actions filters");
$("button[data-type='filters']").off().on("click",function(){
mylog.log("fObj actions filters button[data-type='filters']");
if(typeof $(this).data("field") != "undefined"){
if(typeof searchObject.filters == "undefined" )
searchObject.filters = {};
if(typeof searchObject.filters[$(this).data("field")] == "undefined" )
searchObject.filters[$(this).data("field")] = [];
searchObject.filters[$(this).data("field")].push($(this).data("value"));
//searchObject.searchType[] = "organizations";
fObj.search();
fObj.manage.addActive(fObj, "filters",$(this).data("value"), $(this).data("key"), $(this).data("field"));
}
});
},
scope : function(fObj){
mylog.log("fObj actions scope");
myScopes.open={};
bindSearchCity("#costum-scope-search", function(){
$(".item-globalscope-checker").off().on('click', function(){
mylog.log("fObj actions scope .item-globalscope-checker");
$("#costum-scope-search .input-global-search").val("");
$(".dropdown-result-global-search").hide(700).html("");
myScopes.type="open";
mylog.log("fObj actions scope globalscope-checker", $(this).data("scope-name"), $(this).data("scope-type"));
newScope=scopeObject(myScopes.search[$(this).data("scope-value")]);
$.each(newScope, function(e, v){
if(typeof v.active == "undefined" || !v.active)
delete newScope[e];
else
newKeyScope=e;
});
myScopes.open[newKeyScope]=newScope[newKeyScope];
localStorage.setItem("myScopes",JSON.stringify(myScopes));
fObj.manage.addActive(fObj, "scope",$(this).data("scope-name"),newKeyScope);
fObj.search();
});
});
}
},
manage:{
addActive: function(fObj, type, value, key, field){
mylog.log("fObj manage addActive", type, value, key);
var dataKey = (typeof key != "undefined") ? 'data-key="'+key+'" ' : "" ;
var dataField = (typeof field != "undefined") ? 'data-field="'+field+'" ' : "" ;
str='<div class="filters-activate tooltips" data-position="bottom" data-title="Effacer" '+
dataKey +
dataField +
'data-value="'+value+'" '+
'data-name="'+name+'" '+
'data-type="'+type+'">' +
"<i class='fa fa-times-circle'></i>"+
"<span "+
"class='activeFilters' "+
dataKey +
dataField +
'data-value="'+value+'" '+
'data-scope-name="'+name+'" '+
'data-type="'+type+'">' +
value +
"</span>"+
"</div>";
$(fObj.container+" #activeFilters").append(str);
coInterface.initHtmlPosition();
searchAllEngine.initSearch();
$(fObj.container+" .filters-activate").off().on("click",function(){
fObj.manage.removeActive(fObj, $(this).data("type"), $(this).data("value"), $(this).data("key"), $(this).data("field"));
$(this).fadeOut(200);
coInterface.initHtmlPosition();
searchAllEngine.initSearch();
});
},
removeActive : function(fObj, type, value, key, field){
mylog.log("fObj manage removeActive", type, value, key, field);
if(type=="filters"){
mylog.log("fObj manage removeActive filters", searchObject);
if( typeof searchObject.filters != "undefined" && typeof searchObject.filters[field] != "undefined")
searchObject.filters[field].splice(searchObject.filters[field].indexOf(value),1);
}
else if(type=="tags")
searchObject.tags.splice(searchObject.tags.indexOf(value),1);
else if(type=="scope"){
delete myScopes.open[key];
}
fObj.search();
}
}
};
function searchMapCress(){
mapCO.showLoader();
var paramsSearchMap=searchInterface.constructObjectAndUrl();
mylog.log("fObj searchMapCress paramsSearchMap", paramsSearchMap);
$.ajax({
type: "POST",
url: baseUrl+"/" + moduleId + "/search/globalautocomplete",
data: paramsSearchMap,
dataType: "json",
error: function (data){
mylog.log(">>> error autocomplete search");
mylog.dir(data);
$("#dropdown_search").html(data.responseText);
//signal que le chargement est terminé
loadingData = false;
},
success: function(data){
mylog.log(">>> fObj searchMapCress success autocomplete search !!!! ", data); //mylog.dir(data);
if(!data){
toastr.error(data.content);
}
else{
mapCO.clearMap();
mapCO.addElts(data.results);
}
}
});
}
\ No newline at end of file
......@@ -10,7 +10,8 @@ class SommomController extends CommunecterController {
public function actions(){
return array(
'dashboard' => 'costum.controllers.actions.sommom.DashboardAction'
'dashboard' => 'costum.controllers.actions.sommom.DashboardAction',
'graph' => 'costum.controllers.actions.sommom.GraphAction'
);
}
//public function actionPersondah
......
......@@ -87,6 +87,8 @@ class DashboardAction extends CAction
$zoneobs = [];
$espobs = [];
$act = [];
$espgeo = [];
$counter = 0;
foreach($answers as $key => $value){
......@@ -114,16 +116,16 @@ class DashboardAction extends CAction
}else {
array_push($organisme, []);
}
if(isset($value["answers"]["sommomForm1"]["sommomForm128"][0]["pointGPS"])){
array_push($gpsterritoire, $value["answers"]["sommomForm1"]["sommomForm128"][0]["pointGPS"]);
}else {
array_push($gpsterritoire, []);
}
if(isset($value["answers"]["sommomForm1"]["sommomForm128"][0]["pointGPS"])){
array_push($gpsterritoire, $value["answers"]["sommomForm1"]["sommomForm128"][0]["pointGPS"]);
if(isset($value["answers"]["sommomForm1"]["sommomForm128"][0]["coord"])){
array_push($gpsterritoire, $value["answers"]["sommomForm1"]["sommomForm128"][0]["coord"]);
}else {
array_push($gpsterritoire, []);
}
// if(isset($value["answers"]["sommomForm1"]["sommomForm128"][0]["pointGPS"])){
// array_push($gpsterritoire, $value["answers"]["sommomForm1"]["sommomForm128"][0]["pointGPS"]);
// }else {
// array_push($gpsterritoire, []);
// }
if(isset($value["answers"]["sommomForm1"]["sommomForm12"])){
array_push($zoneobs, $value["answers"]["sommomForm1"]["sommomForm12"]);
}else {
......@@ -139,6 +141,11 @@ class DashboardAction extends CAction
}else {
array_push($act, []);
}
if(isset($value["answers"]["sommomForm1"]["sommomForm11"])){
array_push($espgeo, $value["answers"]["sommomForm1"]["sommomForm11"]);
}else {
array_push($espgeo, []);
}
for($i = 1; $i < 6; $i++){
${"sommomForm" . $i ."Data".$counter} = [];
......@@ -181,17 +188,28 @@ class DashboardAction extends CAction
}
for($k = 0; $k < count($users); $k++){
$name = PHDB::findOne(Document::COLLECTION, array("id"=>$ids[$k]),array("name"));
if($name == null){
$name = PHDB::find(Document::COLLECTION, array("id"=>$ids[$k]),array("name"));
$cntu = "";
foreach ($name as $key => $value) {
if(isset($value['name'])){
$cntu = $value['name'];
}
}
if(count($name) == 0){
array_push($photo, "");
}else {
array_push($photo, $name['name']);
array_push($photo, $cntu);
}
}
$home = [$users, $territoire, $ile, $organisme, $gpsterritoire, $zoneobs, $espobs, $act, $ids, $photo, $links];
$home = [$users, $territoire, $ile, $organisme, $gpsterritoire, $zoneobs, $espobs, $act, $ids, $photo, $links, $espgeo];
$hgraph = [];
for($k = 0; $k < count($users); $k++){
${"list".$k} = [];
......@@ -243,7 +261,7 @@ class DashboardAction extends CAction
for($k = 0; $k < count($users); $k++){
for($i = 0; $i < 12; $i++){
${$monthLabel[$i]."Pre".$k} = 0;
${$monthLabel[$i]."Obs".$k} = 0;
//${$monthLabel[$i]."Obs".$k} = 0;
}
}
......@@ -267,17 +285,16 @@ class DashboardAction extends CAction
$debutp = $data["dpPresence"];
}
}
if(isset($data["pObservation"])){
if(!is_array($data["pObservation"])) {
$fino = $data["pObservation"];
}
}
if(isset($data["dpObservation"])){
if(!is_array($data["dpObservation"])) {
$debuto = $data["dpObservation"];
}
}
// if(isset($data["pObservation"])){
// if(!is_array($data["pObservation"])) {
// $fino = $data["pObservation"];
// }
// }
// if(isset($data["dpObservation"])){
// if(!is_array($data["dpObservation"])) {
// $debuto = $data["dpObservation"];
// }
// }
if($finp == "Annuelle" or $debutp == "Annuelle"){
......@@ -299,24 +316,24 @@ class DashboardAction extends CAction
}
}
if($fino == "Annuelle" or $debuto == "Annuelle"){
for($m = 0; $m < count($monthLabel); $m++){
${$monthLabel[$m]."Obs".$k}++;
}
}else {
if($debuto != "" and $fino != ""){
for($m = 0; $m < count($monthLabel); $m++){
if($debuto == $monthLabel[$m]){
for($mm = $m; $mm < count($monthLabel); $mm++){
${$monthLabel[$mm]."Obs".$k}++;
if($monthLabel[$mm] == $fino){
break;
}
}
}
}
}
}
// if($fino == "Annuelle" or $debuto == "Annuelle"){
// for($m = 0; $m < count($monthLabel); $m++){
// ${$monthLabel[$m]."Obs".$k}++;
// }
// }else {
// if($debuto != "" and $fino != ""){
// for($m = 0; $m < count($monthLabel); $m++){
// if($debuto == $monthLabel[$m]){
// for($mm = $m; $mm < count($monthLabel); $mm++){
// ${$monthLabel[$mm]."Obs".$k}++;
// if($monthLabel[$mm] == $fino){
// break;
// }
// }
// }
// }
// }
// }
}
......@@ -325,13 +342,13 @@ class DashboardAction extends CAction
for($k = 0; $k < count($users); $k++){
${"monthPreData".$k} = [];
${"monthObsData".$k} = [];
//${"monthObsData".$k} = [];
}
for($k = 0; $k < count($users); $k++){
for($i = 0; $i < 12; $i++){
${"monthPreData".$k}[$i] = ${$monthLabel[$i]."Pre".$k};
${"monthObsData".$k}[$i] = ${$monthLabel[$i]."Obs".$k};
//${"monthObsData".$k}[$i] = ${$monthLabel[$i]."Obs".$k};
}
}
......@@ -467,12 +484,12 @@ class DashboardAction extends CAction
"url" => "/graph/co/dash/g/graph.views.co.sommom.barMany"
]];
${"graph".$k} += ["freqobs".$k =>[
"title"=>"fréquence d'observation des cétaces par mois"." ".$territoire[$k],
"data" => ${"monthObsData".$k},
"lbls" => $monthLabel,
"url" => "/graph/co/dash/g/graph.views.co.sommom.barMany"
]];
// ${"graph".$k} += ["freqobs".$k =>[
// "title"=>"fréquence d'observation des cétaces par mois"." ".$territoire[$k],
// "data" => ${"monthObsData".$k},
// "lbls" => $monthLabel,
// "url" => "/graph/co/dash/g/graph.views.co.sommom.barMany"
// ]];
${"graph".$k} += ["typeparzone".$k =>[
"title"=>"type de cétacés par zone d'observation"." ".$territoire[$k],
......@@ -543,7 +560,7 @@ class DashboardAction extends CAction
"blocks" => $blocks,
"territoire" => $home,
"activegraph" => $activegraph,
""
"hgraph" => $hgraph
];
if(Yii::app()->request->isAjaxRequest)
......
This diff is collapsed.
This diff is collapsed.
{
"slug" : "aress",
"welcomeTpl" : "costum.views.custom.aress.home",
"isTemplate" : true,
"hasOpenForm" : true,
"isMultiForms" : true,
"sourceKey" : true,
"dynForm" : {
"jsonSchema" : {
"title" : "Template config",
"type" : "object",
"properties" : {
"title1" : {
"label" : "Title 1",
"path" : "costum.cms.title1"
},
"subtitle1" : {
"label" : "Sub Title 1",
"path" : "costum.cms.subtitle1"
},
"textIntro" : {
"label" : "Text Intro",
"inputType" : "textarea",
"path" : "costum.cms.textIntro"
}
}
}
},
"favicon" : "co2#/images/favicon.ico",
"metaImg" : "this.profilBannerUrl",
"logoMin" : "co2#/images/logoBtn.png",
"colors" : {
"pink" : "#E4394D",
"dark" : "#354C57",
"grey" : "#f6f6f6"
},
"css" : {
"styles" : {
"#loadingPageImg" : {
"left" : "15px",
"position" : "relative"
}
},
"loader" : {
"background" : "white",
"ring1" : {
"color" : "this.colors.pink",
"height" : 360,
"width" : 360,
"left" : -15,
"borderWidth" : 4,
"top" : -35
},
"ring2" : {
"color" : "this.colors.dark",
"height" : 350,
"width" : 350,
"left" : -10,
"borderWidth" : 5,
"top" : -30
}
},
"progress" : {
"value" : {
"background" : "this.colors.pink"
},
"bar" : {
"background" : "#fff"
}
},
"menuTop" : {
"background" : "white",
"button" : {
"paddingTop" : 0,
"fontSize" : 30,
"color" : "this.colors.dark"
},
"scopeBtn" : {
"color" : "this.colors.dark"
},
"filterBtn" : {
"color" : "this.colors.dark"
},
"badge" : {
"background" : "this.colors.pink",
"border" : "1px solid white"
},
"connectBtn" : {
"background" : "this.colors.dark",
"color" : "white",
"fontSize" : 18,
"borderRadius" : 10,
"padding" : "8px 15px"
}
},
"menuApp" : {
"background" : "this.colors.pink",
"button" : {
"fontSize" : 25,
"color" : "#2c3e50",
"hover" : {
"borderBottom" : "2px solid #fff"
}
}
},
"button" : {
"footer" : {
"add" : {
"bottom" : 25,
"background" : "transparent",
"color" : "white"
},
"toolbarAdds" : {
"bottom" : 30
}
}
},
"color" : {
"purple" : "this.colors.pink"
}
},
"htmlConstruct" : {
"appRendering" : "vertical",
"header" : {
"menuTop" : {
"navLeft" : {
"logo" : {
"height" : 40
},
"searchBar" : true,
"useFilter" : {
"scopeFilter" : true,
"showFilter" : true
}
},
"navRight" : {
"connected" : {
"dropdownUser" : {
"languages" : false,
"statistics" : false,
"documentation" : true,
"donate" : false,
"admin" : true,
"settings" : false,
"logout" : true
},
"userProfil" : {
"img" : true
},
"networkFloop" : true,
"notifications" : true,
"dda" : false,
"chat" : true,
"home" : false,
"app" : false
},
"disconnected" : {
"languages" : false,
"login" : true
}
}
}
},
"subMenu" : {
"fontSize" : 40,
"app" : true,
"button" : true
},
"footer" : {
"add" : false,
"donate" : false
},
"adminPanel" : {
"add" : true,
"menu" : {
"statistic" : true,
"directory" : true,
"community" : {
"show" : true
}
}
},
"directoryViewMode" : "block",
"directory" : {
"header" : {
"map" : false,
"viewMode" : false,
"add" : {
"proposals" : true
}
}
},
"redirect" : {
"logged" : "welcome",
"unlogged" : "welcome"
}
},
"searchOpenMenu" : [
{
"url" : "#search",
"msg" : "Tous les COnstructeurs"
}
]
}
\ No newline at end of file
......@@ -3,7 +3,12 @@
"sourceKey" : true,
"slug" : "cressReunion",