Commit 5bb70e2c authored by Clément Damiens's avatar Clément Damiens
Browse files

Merged branch development into development

parents 44096e3f 56af3274
......@@ -1982,6 +1982,7 @@ var directory = {
cp : params.cp,
country : params.country,
allCP : params.allCP,
uniqueCp : params.uniqueCp,
level1 : params.level1,
level1Name : params.level1Name
}
......@@ -1992,6 +1993,10 @@ var directory = {
valuesScopes.name = params.nameCity ;
}
if( notEmpty( params.uniqueCp ) ){
valuesScopes.uniqueCp = params.uniqueCp;
}
if( notEmpty( params.level4 ) && valuesScopes.id != params.level4){
valuesScopes.level4 = params.level4 ;
valuesScopes.level4Name = params.level4Name ;
......
......@@ -805,7 +805,7 @@ function bindScopesNewsEvent(news){
if(addScope){
newScope=myScopes[myScopes.type][key];
newScope.active=true;
newsScopes[scopeValue] = newScope;
newsScopes[key] = newScope;
$(this).attr("data-add",false).attr("data-original-title","Remove");
$(this).find("i").removeClass("fa-plus-circle").addClass("fa-times-circle");
pushHtml=$(this).parent().get();
......@@ -813,6 +813,7 @@ function bindScopesNewsEvent(news){
$("#content-added-scopes-container").append(pushHtml);
$(".form-create-news-container .form-actions .addplacesplease").remove();
}else{
mylog.log("manageMultiscopes remove", key, newsScopes);
delete newsScopes[key];
$(this).parent().remove();
}
......
......@@ -444,9 +444,10 @@ function scopeObject(values){
mylog.log("communexionObj level4", communexionObj);
//communexionObj.push(objToPush);
}
if(typeof values.cp != "undefined"){
mylog.log("scopeObject cp", typeof values.cp, typeof values.uniqueCp, values.uniqueCp);
if(typeof values.cp != "undefined" && typeof values.uniqueCp != "undefined" && values.uniqueCp == false){
objToPush={
id:values.cp+values.country,
name:values.cp,
type:"cp",
active:false,
......@@ -457,7 +458,8 @@ function scopeObject(values){
mylog.log("communexionObj cp", communexionObj);
//communexionObj.push(objToPush);
}
mylog.log("scopeObject level", values.level, notNull(values.level) && typeof values.level);
if(notNull(values.level) && typeof values.level != "undefined"){
objToPush={
id:values.id,
......@@ -491,7 +493,7 @@ function scopeObject(values){
if(notNull(values.allCP) && values.allCP == false){
objToPush={
id:values.city,
name:values.cityName,
name:values.cityName + " ( " +values.cp + " ) ",
type:"city",
active:true,
//level:6,
......
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