Commit 33bf30cd authored by Raph El's avatar Raph El

Merge branch 'master' into qa

parents 754fe6f0 a5694b9b
......@@ -96,6 +96,7 @@ var settings = {
$("#btnSettingsInfos").off().on("click",function(){
$("#modalExplainSettings").modal("show");
});
coInterface.bindLBHLinks();
},
//recherche text par nom, cp, city, slug
filterSettingsCommunity: function(searchVal){
......@@ -179,9 +180,8 @@ var settings = {
'</div>';
$.each(array, function(e, value){
if(typeof value.isFollowed == "undefined"
&& typeof value.toBeValidated == "undefined"
&& (typeSet!="confidentiality" || (typeof value.isAdmin != "undefined" && typeof value.isAdminPending == "undefined"))){
if((typeof value.isFollowed == "undefined" || (typeof value.isAdmin != "undefined" && typeof value.isAdminPending == "undefined"))
&& typeof value.toBeValidated == "undefined"){
var oldElement = isOldElement(value);
var profilThumbImageUrl = (typeof value.profilThumbImageUrl != "undefined" && value.profilThumbImageUrl != "") ? baseUrl + value.profilThumbImageUrl : assetPath + "/images/thumb/default_"+defaultImg+".png";
var id = (typeof value._id != "undefined" && typeof value._id.$id != "undefined") ? value._id.$id : id;
......@@ -191,19 +191,22 @@ var settings = {
var elementStyle = oldElement ? "display:none" : "";
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 : "";
var isEltAdmin=(typeof value.isAdmin != "undefined" && typeof value.isAdminPending == "undefined") ? true : false;
str+='<div class="col-xs-12 padding-5 notification-label-communtiy '+elementClass+' contact'+id+'" style="'+elementStyle+'" id="settingsItem-'+type+'-'+id+'" idcontact="'+id+'">'+
'<div class="btn-chk-contact col-md-6 col-sm-4 col-xs-12">' +
'<div class="btn-chk-contact col-md-6 col-sm-6 col-xs-12">' +
'<img src="'+ profilThumbImageUrl+'" class="thumb-send-to bg-'+typeObj[typeObj[type].sameAs].color+' pull-left" height="35" width="35">'+
'<span class="info-contact col-xs-10 margin-top-5">' +
'<span class="name-contact text-dark text-bold elipsis pull-left" idcontact="'+id+'">' + value.name + '</span>'+
'<span class="name-contact text-dark text-bold elipsis pull-left" idcontact="'+id+'"><a href="#page.type.'+type+'.id.'+id+'" class="lbh-preview-element">' + value.name + '</a></span>'+
'<input type="hidden" class="slug-contact" idcontact="'+id+'" value="'+value.slug+'">'+
'<br/>'+
'<span class="text-red pull-left">'+((isEltAdmin) ? trad.administrator : ucfirst(trad.member))+'</span>'+
'<br/>'+
'<span class="cp-contact text-light pull-left" idcontact="'+id+'">' + cp + '&nbsp;</span>'+
'<span class="city-contact text-light pull-left" idcontact="'+id+'">' + city + '</span>'+
'</span>' +
'</div>';
//if(typeSet=="notifications")
str+=settings.getToolbarSettings(setNotif, setMails, type, id);
str+=settings.getToolbarSettings(setNotif, setMails, type, id, isEltAdmin);
//else if(typeSet=="confidentiality")
// str+=settings.getToolbarSettingsConfidentiality(type,id);
str+='</div>';
......@@ -217,14 +220,16 @@ var settings = {
settings.settingsCommunityEvents();
}
},
getToolbarSettings: function(setNotif, setMails, type, id){
html='<div class="col-md-6 col-sm-4 col-xs-6">'+
'<div class="col-xs-12 no-padding margin-bottom-5">'+
'<a class="btn btn-default col-md-12 col-sm-12 col-xs-12 dropdown-settings" href="javascript:;" onclick="settings.showPanelConfidentiality(\''+type+'\',\''+id+'\',true)">'+
'<i class="fa fa-cogs"></i> '+tradSettings.settingsConfidentiality+
'</a>'+
'</div>'+
settings.getToolbarSettingsNotifications(setNotif, setMails, type, id)+
getToolbarSettings: function(setNotif, setMails, type, id, isAdmin){
html='<div class="col-md-6 col-sm-6 col-xs-12">';
if(isAdmin){
html+='<div class="col-xs-12 no-padding margin-bottom-5">'+
'<a class="btn btn-default col-md-12 col-sm-12 col-xs-12 dropdown-settings" href="javascript:;" onclick="settings.showPanelConfidentiality(\''+type+'\',\''+id+'\',true)">'+
'<i class="fa fa-cogs"></i> '+tradSettings.settingsConfidentiality+
'</a>'+
'</div>';
}
html+=settings.getToolbarSettingsNotifications(setNotif, setMails, type, id)+
'</div>';
return html;
},
......
......@@ -39,27 +39,20 @@ HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->requ
border-radius: 50%;
padding: 3px;
margin-top: 7px;
}
.explainLabelNotifs{
padding-top: 10px;
padding-bottom: 10px;
font-size: 16px;
}
#modalExplainSettings{
top: 60px !important;
}
/*@media (max-width: 991px) {
.settingsHeader{
left: 0px;
}
}*/
@media (min-width: 991px) {
#modalExplainSettings{
left: 25% !important;
}
}
</style>
<div id="community-settings" class="contain-section-params col-xs-12 no-padding">
<div class="settingsHeader bg-white no-padding">
<div class="settings-header">
<h4 class="title"><i class="fa fa-bell"></i> <?php echo Yii::t("settings", "Confidentiality of your community data and edition") ?></h4>
</div>
<span class="text-dark explainLabelNotifs"><i class="fa fa-info-circle"></i> <?php echo Yii::t("settings", "All explanations about notifications settings I received from my community") ?> <a href="javascript:;" id="btnSettingsInfos" style="padding: 0px;color: #337ab7;font-weight: bold;"><?php echo Yii::t("common", "here") ?></a></span>
<?php $this->renderPartial('co2.views.settings.modalExplainCommunitySettings', array()); ?>
<div id="settingsScrollByType" class="pull-left"></div>
<!--<a href="javascript:;" id="btnSettingsInfos" class="text-dark pull-right margin-right-20"><i class="fa fa-info-circle"></i> <span class="hidden-xs"> <?php echo Yii::t("common","Infos") ?></span></a>-->
<input type="text" id="search-in-settings" class="form-control" placeholder="<?php echo Yii::t("common","Search name, slug, postal code, city ...") ?>">
......
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