Commit 202003ca authored by Tibor Katelbach's avatar Tibor Katelbach

Merge remote-tracking branch 'origin/master'

parents 4d8beeac dd88b3a7
......@@ -3,6 +3,7 @@
//for select input : {"value":"FR", "text":"France"}
//for select2 input : {"id":"FR", "text":"France"}
function getCountries(selectType) {
mylog.log("getCountries");
var result = new Array();
$.ajax({
url: baseUrl+'/'+moduleId+"/opendata/getcountries",
......
......@@ -395,7 +395,7 @@ function scopeObject(values){
}
mylog.log("scopeObject cp", typeof values.postalCode, typeof values.uniqueCp, values.uniqueCp);
if(typeof values.postalCode != "undefined" && typeof values.uniqueCp != "undefined" && values.uniqueCp == false){
mylog.log("communexionObj cp values", values);
mylog.log("scopeObject communexionObj cp values", values);
objToPush={
id:values.postalCode+values.country+objToPush.type,
......@@ -405,7 +405,7 @@ function scopeObject(values){
countryCode:values.country
}
communexionObj[objToPush.id] = objToPush;
mylog.log("communexionObj cp", communexionObj);
mylog.log("scopeObject communexionObj cp", communexionObj);
}
if(notNull(values.level) && typeof values.level != "undefined"){
......@@ -431,7 +431,7 @@ function scopeObject(values){
// objToPush["postalCode"] = values.postalCode ;
}
communexionObj[objToPush.id+objToPush.type] = objToPush;
mylog.log("communexionObj", communexionObj);
mylog.log("scopeObject communexionObj", communexionObj);
if(notNull(values.allCP) && values.allCP == false){
objToPush={
......
......@@ -676,6 +676,7 @@ function showMyContactInModalAddMembers(fieldObj, jqElement){
var fieldHTML = "";
$.each(fieldObj.contactTypes, function(key, type){
mylog.log("fieldObj.contactTypes", key, type, typeof type);
fieldHTML += '<div class="panel panel-default" id="scroll-type-'+type.name+'"> '+
'<div class="panel-heading">'+
......@@ -686,6 +687,8 @@ function showMyContactInModalAddMembers(fieldObj, jqElement){
'<ul>';
if(typeof fieldObj.values[type.name] != "undefined")
$.each(fieldObj.values[type.name], function(key2, value){
mylog.log("TESTTEST", key2, value);
if(typeof value != "undefined"){
var cp = (typeof value.address != "undefined" && notNull(value.address) && typeof value.address.postalCode != "undefined") ? value.address.postalCode : typeof value.cp != "undefined" ? value.cp : "";
var city = (typeof value.address != "undefined" && notNull(value.address) && typeof value.address.addressLocality != "undefined") ? value.address.addressLocality : "";
......@@ -703,7 +706,7 @@ function showMyContactInModalAddMembers(fieldObj, jqElement){
'<a href="javascript:">admin <i class="fa fa-user-secret"></i></a>'+
'</small>';
}
fieldHTML += '<div class="btn btn-default btn-scroll-type btn-select-contact" id="contact'+thisKey+'">' +
fieldHTML += '<div class="btn btn-default btn-scroll-type btn-select-contact" id="contact'+getObjectId(value)+'">' +
'<div class="col-md-1 no-padding"><input type="checkbox" name="scope-'+type.name+'" class="chk-scope-'+type.name+' chk-contact" id="chk-scope-'+thisKey+'" idcontact="'+thisKey+'" value="'+thisValue+'" data-type="'+type.name+'"></div> '+
'<div class="btn-chk-contact col-md-11 no-padding" idcontact="'+thisKey+'" typecontact="'+type.name+'">' +
'<img src="'+ profilThumbImageUrl+'" class="thumb-send-to" height="35" width="35">'+
......@@ -743,9 +746,11 @@ function filterContact(searchVal){
if(searchVal != "") $(".btn-select-contact").hide();
else $(".btn-select-contact").show();
//recherche la valeur recherché dans les 3 champs "name", "cp", et "city"
$.each($(".name-contact"), function() { checkSearch($(this), searchVal); });
$.each($(".cp-contact"), function() { checkSearch($(this), searchVal); });
$.each($(".city-contact"), function() { checkSearch($(this), searchVal); });
$.each($(".name-contact"), function() {
checkSearch($(this), searchVal);
});
//$.each($(".cp-contact"), function() { checkSearch($(this), searchVal); });
//$.each($(".city-contact"), function() { checkSearch($(this), searchVal); });
}else if(addLinkSearchMode == "all"){
if(searchVal.length>2){
clearTimeout(timeout);
......@@ -815,10 +820,14 @@ function autoCompleteEmailAddMember(searchValue){
//si l'élément contient la searchVal, on l'affiche
function checkSearch(thisElement, searchVal, type){
mylog.log("checkSearch", thisElement, searchVal, type);
var content = thisElement.html();
mylog.log("checkSearch content", content);
var found = content.search(new RegExp(searchVal, "i"));
mylog.log("checkSearch found", found);
if(found >= 0){
var id = thisElement.attr("idcontact");
mylog.log("checkSearch id", id);
$("#contact"+id).show();
}
}
......
This diff is collapsed.
......@@ -110,6 +110,7 @@ var trad = {
"addevents" : "<?php echo Yii::t("common","Add a new event") ?>",
"addprojects" : "<?php echo Yii::t("common","Add a new project") ?>",
"addressources":"<?php echo Yii::t("common","Add a new ressource") ?>",
"addressource":"<?php echo Yii::t("common","Add a new ressource") ?>",
"addclassified":"<?php echo Yii::t("common","Add a new classified") ?>",
"addclassifieds":"<?php echo Yii::t("common","Add a new classified") ?>",
"addplace":"<?php echo Yii::t("common","Add a new place") ?>",
......@@ -148,6 +149,8 @@ var trad = {
"createevent":"<?php echo Yii::t("common","Create an event") ?>",
"createpoi":"<?php echo Yii::t("common","Create a point of interest") ?>",
"createclassified":"<?php echo Yii::t("common","Create a classified ad") ?>",
"createressource":"<?php echo Yii::t("common","Create a ressource") ?>",
"createressources":"<?php echo Yii::t("common","Create a ressource") ?>",
"createcollection":"<?php echo Yii::t("common","Create a new collection") ?>",
"createpage":"<?php echo Yii::t("common","Create a page") ?>",
"organizations":"<?php echo Yii::t("common","organizations"); ?>",
......
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