Commit 7ac44442 authored by ramiandrison gova's avatar ramiandrison gova
Browse files

Merge remote-tracking branch 'origin/development' into development

parents 10796feb 65b8df60
......@@ -294,93 +294,7 @@ ul.tl li .item-detail{
#contenuDesc img{
max-width: 100%;
}
/*comment social*/
.middle {
text-align: center;
}
.btn-network {
display: inline-block;
width: 50px;
height: 50px;
background: #fff/*#f1f1f1*/;
margin: 10px;
border-radius: 30%;
box-shadow: 0 5px 15px -5px #2C3E50;
color: #1da1f2;
overflow: hidden;
position: relative;
border: 1px solid #1d3b58;
}
a.btn-network:hover {
transform: scale(1.3);
color: #f1f1f1;
}
.btn-network i {
line-height: 50px;
font-size: 25px;
transition: 0.2s linear;
}
.btn-network img {
margin: 12px;
width: 25px;
transition: 0.2s linear;
}
.btn-network:hover i, .btn-network:hover img {
transform: scale(1.3);
color: #f1f1f1;
}
.fa-facebook {
color: #3c5a99;
}
.fa-twitter {
color: #1da1f2;
}
.fa-telegram{
color: #55acee;
}
.fa-instagram {
color: #c94d82;
}
.fa-github {
color: #444;
}
.btn-network::before {
content: "";
position: absolute;
width: 120%;
height: 120%;
background: #1d3b58;
transform: rotate(45deg);
left: -110%;
top: 90%;
}
.btn-network:hover::before {
animation: aaa 0.7s 1;
top: -10%;
left: -10%;
}
@keyframes aaa {
0% {
left: -110%;
top: 90%;
}
50% {
left: 10%;
top: -30%;
}
100% {
left: -10%;
top: -10%;
}
}
/*******************XS-menu About ****************/
......@@ -551,7 +465,7 @@ ul.tl li .item-detail{
text-align: center;
}
.badge {
.badge-list .badge {
position: relative;
margin: 1.5em 3em;
width: 4em;
......@@ -563,7 +477,7 @@ ul.tl li .item-detail{
background: linear-gradient(to bottom right, #cddc39 0%, #8bc34a 100%);
color: #7cb342;
}
.badge:before, .badge:after {
.badge-list .badge:before, .badge:after {
position: absolute;
width: inherit;
height: inherit;
......@@ -576,16 +490,16 @@ ul.tl li .item-detail{
bottom: 0;
margin: auto;
}
.badge:before {
.badge-list .badge:before {
transform: rotate(60deg);
}
.badge:after {
.badge-list .badge:after {
transform: rotate(-60deg);
}
.badge:hover {
.badge-list .badge:hover {
top: -4px;
}
.badge .circle {
.badge-list .badge .circle {
width: 40px;
height: 40px;
position: absolute;
......@@ -598,15 +512,15 @@ ul.tl li .item-detail{
bottom: 0;
margin: auto;
}
.badge .circle i.fa {
.badge-list .badge .circle i.fa {
font-size: 2em;
margin-top: 8px;
}
.badge .font {
.badge-list .badge .font {
display: inline-block;
margin-top: 1em;
}
.badge .ribbon {
.badge-list .badge .ribbon {
position: absolute;
border-radius: 4px;
padding: 3px;
......
......@@ -220,13 +220,50 @@ var adminPanel = {
},
paramsFilter : {
container : "#filterContainer",
options : {
tags : {
verb : '$and'
}
},
defaults : {
types : [ "crowdfunding" ],
//type : "pledge"
filters : {
type : "pledge"
}
}
},
filters : {
publicData : {
view : "dropdownList",
type : "filters",
name : "Données publiques",
//event : "selectList",
field : "publicDonationData",
action : "filters",
event : "filters",
keyValue : false,
list : {
"true" : "Données publiques",
"false" : "Données privées"
}
},
invoice : {
view : "dropdownList",
type : "filters",
name : "Demande de facture",
//event : "selectList",
field : "invoice",
action : "filters",
event : "filters",
keyValue : false,
list : {
"true" : "Facture demandée",
"false" : "Facture non demandée"
}
}
}
}
};
......@@ -254,6 +291,11 @@ var adminPanel = {
actions:{
delete : true
},
options : {
tags : {
verb : '$and'
}
},
paramsFilter : {
container : "#filterContainer",
defaults : {
......@@ -262,8 +304,40 @@ var adminPanel = {
filters : {
type : "donation"
}
}
}
},
filters : {
publicData : {
view : "dropdownList",
type : "filters",
name : "Données publiques",
//event : "selectList",
field : "publicDonationData",
action : "filters",
event : "filters",
keyValue : false,
list : {
"true" : "Données publiques",
"false" : "Données privées"
}
},
invoice : {
view : "dropdownList",
type : "filters",
name : "Demande de facture",
//event : "selectList",
field : "invoice",
action : "filters",
event : "filters",
keyValue : false,
list : {
"true" : "Facture demandée",
"false" : "Facture non demandée"
}
}
}
}
};
ajaxPost('#content-view-admin', baseUrl+'/'+moduleId+'/admin/directory/', data, function(){},"html");
......
......@@ -899,10 +899,23 @@ var coInterface = {
}else{
hashT=location.hash.split("?");
getStatus=urlCtrl.getUrlSearchParams();
hashNav=(hashT[0].indexOf("#") < 0) ? "#"+hashT[0] : hashT[0];
//hashT[0].substring(0) substring ne sert à rien ... why ???
urlHistoric=hashNav+"?preview="+previewHash[2]+"."+previewHash[4];
if($("#entity"+previewHash[4]).length > 0) setTimeout(function(){$("#entity"+previewHash[4]).addClass("active");},200);
if (previewHash.length>1){
urlHistoric=hashNav+"?preview="+previewHash[2]+"."+previewHash[4];
if($("#entity"+previewHash[4]).length > 0) setTimeout(function(){$("#entity"+previewHash[4]).addClass("active");},200);
}
else{
mylog.log("hashNav",hashNav);
pageName=(previewHash[0].indexOf("#")==0) ? previewHash[0].substr(1) : previewHash[0];
urlHistoric=hashNav+"?preview=page.costum.view."+pageName ;
// Voir intégration dans history.replaceState !!
if (typeof costum.app[link] !="undefined" && typeof(costum.app[link].hash!="undefined") && costum.app[link].hash.indexOf("view")>-1 && typeof(costum.app[link].urlExtra!="undefined")){
link="view"+costum.app[link].urlExtra;
}
}
if(getStatus != "") urlHistoric+="&"+getStatus;
history.replaceState({}, null, urlHistoric);
urlCtrl.openPreview(link);
......
......@@ -1751,6 +1751,9 @@ var directory = {
if(typeof costum[costum.slug].donation.setUnloggedMode=="function"){
costum[costum.slug].donation.setUnloggedMode();
}
var goal = $(this).data("goal");
var pledgeAmount = $(this).data("pledgeamount");
var directDonation=$(this).data("directdonation");
//alert(directDonation);
var dataEdit={};
......@@ -1795,7 +1798,32 @@ var directory = {
});
}else{
dataEdit.type="pledge";
dyFObj.openForm("donation",null,dataEdit);
if(goal>=pledgeAmount){
dyFObj.openForm("donation",null,dataEdit);
}
else{
urlCtrl.modalExplain({
icon : "money",
name : "La jauge a été atteinte",
text : "L\'obectif de la campagne de financement a atteint par les promesses de dons. Nous vous invitons à soutenir d'autres projets.",
link : {
pledge : {
label : "Je soutiens quand même !",
icon : "money",
link : "javascript:;",
onclick : 'dyFObj.openForm("donation",null,{"type":"pledge"})',
dataExtend : dataEdit
}
}
});
// $("#ajax-modal .modal-header h3").text("La jauge est atteinte !").css("color","#8ac4c5");
// $("#ajax-modal-modal-body").append(
// '<div class="">'+
// 'L\'obectif de la campagne de financement a atteint par les promesses de dons. Il ne vous est plus possible de faire une promesse'+
// '</div>');
// $("#ajax-modal").modal();
}
}
......
......@@ -13,7 +13,7 @@ function bindAboutPodElement() {
mylog.log("-----------------changeHiddenFields----------------------");
//
listFields = [ "username", "birthDate", "email", "avancement", "url", "fixe",
"mobile","fax", "facebook", "twitter", /*"gpplus",*/ "github", "gitlab", "instagram","telegram","diaspora","mastodon"];
"mobile","fax", "facebook", "twitter", /*"gpplus",*/ "github", "gitlab", "instagram","telegram","diaspora","mastodon","signal"];
$.each(listFields, function(i,value) {
mylog.log("listFields", value, typeof contextData[value]);
......@@ -414,19 +414,19 @@ function bindAboutPodElement() {
pageProfil.views.detail();
},
properties : {
//BADGE:DE-COMMENT
// badges : {
// inputType : "finder",
// label : "Ajouter un badge",
// multiple : true,
// placeholder:"Rechercher un badge existant",
// rules : { required : false, lengthMin: [1, "parent"]},
// initType: ["badges"],
// initBySearch: true,
// initMe: false,
// openSearch :true,
// values :contextData.badges
// },
// BADGE:DE-COMMENT
badges : {
inputType : "finder",
label : "Ajouter un badge",
multiple : true,
placeholder:"Rechercher un badge existant",
rules : { required : false, lengthMin: [1, "parent"]},
initType: ["badges"],
initBySearch: true,
initMe: false,
openSearch :true,
values :contextData.badges
},
block : dyFInputs.inputHidden(),
name : dyFInputs.name(contextData.type),
similarLink : dyFInputs.similarLink,
......@@ -737,7 +737,7 @@ function bindAboutPodElement() {
beforeSave : function(){
mylog.log("beforeSave", contextData["socialNetwork"]);
//removeFieldUpdateDynForm(contextData.type);
var SNetwork = [ "telegram", "github", "gitlab", "twitter", "facebook", /*"gpplus",*/ "instagram", "diaspora", "mastodon"];
var SNetwork = [ "telegram", "github", "gitlab", "twitter", "facebook", /*"gpplus",*/ "instagram", "diaspora", "mastodon","signal"];
$.each(SNetwork, function(key, val){
mylog.log("val", val);
mylog.log("val2", $("#ajaxFormModal #"+val).val(), $("#ajaxFormModal #"+val).length);
......@@ -766,40 +766,46 @@ function bindAboutPodElement() {
if(typeof data.resultGoods.values.telegram != "undefined"){
contextData.socialNetwork.telegram = data.resultGoods.values.telegram.trim();
if(contextData.socialNetwork.telegram.length != 0 )
changeNetwork('#divTelegram', '#telegramAbout', 'https://web.telegram.org/#/im?p=@'+contextData.socialNetwork.telegram, 'https://web.telegram.org/#/im?p=@'+contextData.socialNetwork.telegram,'Telegram', '<i class="fa fa-telegram"></i>');
else
changeNetwork('#divTelegram', '#telegramAbout', contextData.socialNetwork.telegram, contextData.socialNetwork.telegram,'Telegram', '<i class="fa fa-telegram"></i>');
//if(contextData.socialNetwork.telegram.length != 0 )
//changeNetwork('#divTelegram', '#telegramAbout', 'https://web.telegram.org/#/im?p=@'+contextData.socialNetwork.telegram, 'https://web.telegram.org/#/im?p=@'+contextData.socialNetwork.telegram,'Telegram', '<i class="fa fa-telegram"></i>');
//else
changeNetwork('#divTelegram', 'telegramAbout', contextData.socialNetwork.telegram, contextData.socialNetwork.telegram,'Telegram', '<i class="fa fa-telegram"></i>');
}
if(typeof data.resultGoods.values.signal != "undefined"){
contextData.socialNetwork.signal = data.resultGoods.values.signal.trim();
changeNetwork('#divSignal', 'signalAbout', contextData.socialNetwork.signal, contextData.socialNetwork.signal, 'Signal', '<img src="'+assetPath +'/images/signal_icon.png">');
}
if(typeof data.resultGoods.values.diaspora != "undefined"){
contextData.socialNetwork.diaspora = data.resultGoods.values.diaspora.trim();
changeNetwork('#divDiaspora', '#diasporaAbout', contextData.socialNetwork.diaspora, contextData.socialNetwork.diaspora, 'Diaspora', '<img src="'+assetPath +'/images/diaspora_icon.png">');
changeNetwork('#divDiaspora', 'diasporaAbout', contextData.socialNetwork.diaspora, contextData.socialNetwork.diaspora, 'Diaspora', '<img src="'+assetPath +'/images/diaspora_icon.png">');
}
if(typeof data.resultGoods.values.mastodon != "undefined"){
contextData.socialNetwork.mastodon = data.resultGoods.values.mastodon.trim();
changeNetwork('#divMastodon', '#mastodonAbout', contextData.socialNetwork.mastodon, contextData.socialNetwork.mastodon,'Mastodon', '<img src="'+assetPath +'/images/mastodon.png">');
changeNetwork('#mastodonAbout', 'divMastodon', contextData.socialNetwork.mastodon, contextData.socialNetwork.mastodon,'Mastodon', '<img src="'+assetPath +'/images/mastodon.png">');
}
if(typeof data.resultGoods.values.facebook != "undefined"){
contextData.socialNetwork.facebook = data.resultGoods.values.facebook.trim();
changeNetwork('#divFacebook','#facebookAbout', contextData.socialNetwork.facebook, contextData.socialNetwork.facebook,'Telegram', '<i class="fa fa-facebook"></i>');
changeNetwork('#divFacebook','facebookAbout', contextData.socialNetwork.facebook, contextData.socialNetwork.facebook,'Facebook', '<i class="fa fa-facebook"></i>');
}
if(typeof data.resultGoods.values.twitter != "undefined"){
contextData.socialNetwork.twitter = data.resultGoods.values.twitter.trim();
changeNetwork('#divTwitter','#twitterAbout', contextData.socialNetwork.twitter, contextData.socialNetwork.twitter,'Telegram', '<i class="fa fa-twitter"></i>');
changeNetwork('#divTwitter','twitterAbout', contextData.socialNetwork.twitter, contextData.socialNetwork.twitter,'Telegram', '<i class="fa fa-twitter"></i>');
}
if(typeof data.resultGoods.values.github != "undefined"){
contextData.socialNetwork.github = data.resultGoods.values.github.trim();
changeNetwork('#divGithub','#githubAbout', contextData.socialNetwork.github, contextData.socialNetwork.github,'Telegram', '<i class="fa fa-github"></i>');
changeNetwork('#divGithub','githubAbout', contextData.socialNetwork.github, contextData.socialNetwork.github,'Telegram', '<i class="fa fa-github"></i>');
}
if(typeof data.resultGoods.values.gitlab != "undefined"){
contextData.socialNetwork.gitlab = data.resultGoods.values.gitlab.trim();
changeNetwork('#divGitlab','#gitlabAbout', contextData.socialNetwork.gitlab, contextData.socialNetwork.gitlab,'Gitlab', '<img src="'+assetPath +'/images/gitlab_icon.png">');
changeNetwork('#divGitlab','gitlabAbout', contextData.socialNetwork.gitlab, contextData.socialNetwork.gitlab,'Gitlab', '<img src="'+assetPath +'/images/gitlab_icon.png">');
}
/*
if(typeof data.resultGoods.values.gpplus != "undefined"){
......@@ -809,7 +815,7 @@ function bindAboutPodElement() {
if(typeof data.resultGoods.values.instagram != "undefined"){
contextData.socialNetwork.instagram = data.resultGoods.values.instagram.trim();
changeNetwork('#divInstagram','#instagramAbout', contextData.socialNetwork.instagram, contextData.socialNetwork.instagram,'Instagram', '<i class="fa fa-instagram"></i>');
changeNetwork('#divInstagram','instagramAbout', contextData.socialNetwork.instagram, contextData.socialNetwork.instagram,'Instagram', '<i class="fa fa-instagram"></i>');
}
}
dyFObj.closeForm();
......@@ -828,14 +834,16 @@ function bindAboutPodElement() {
instagram : dyFInputs.inputUrl(tradDynForm["linkInstagram"]),
diaspora : dyFInputs.inputUrl(tradDynForm["linkDiaspora"]),
mastodon : dyFInputs.inputUrl(tradDynForm["linkMastodon"]),
telegram : dyFInputs.inputUrl(tradDynForm["linkTelegram"]),
signal : dyFInputs.inputUrl(tradDynForm["linkSignal"])
}
}
}
};
if(contextData.type == typeObj.person.col ){
/*if(contextData.type == typeObj.person.col ){
form.dynForm.jsonSchema.properties.telegram = dyFInputs.inputText("Votre Speudo Telegram","Votre Speudo Telegram");
}
}*/
var dataUpdate = {
block : "network",
......@@ -863,6 +871,8 @@ function bindAboutPodElement() {
dataUpdate.diaspora = contextData.socialNetwork.diaspora;
if( notEmpty(contextData.socialNetwork.mastodon) )
dataUpdate.mastodon = contextData.socialNetwork.mastodon;
if( notEmpty(contextData.socialNetwork.signal) )
dataUpdate.signal = contextData.socialNetwork.signal;
}
dyFObj.openForm(form, "sub", dataUpdate);
......@@ -881,7 +891,7 @@ function bindAboutPodElement() {
}
else{
$(id).html('<a href="'+url+'" target="_blank" id="'+id+'" class="btn-network tooltips" data-toggle="tooltip" data-placement="top" title="'+name+'">'+icon+'</a>');
$(id).html('<a href="'+url+'" target="_blank" id="'+idUrl+'" class="btn-network tooltips" data-toggle="tooltip" data-placement="top" title="'+name+'">'+icon+'</a>');
//$(id).html('<a href="'+url+'" target="_blank" id="'+id+'" class="socialIcon" >'+str+'</a>');
}
......@@ -1197,13 +1207,13 @@ function bindAboutPodElement() {
mylog.log("------------------------ removeFieldUpdateDynForm", collection);
var fieldsElement = [ "name", "slug", "tags", "email", "url", "fixe", "mobile", "fax",
"telegram", "github", "gitlab", "twitter", "facebook", /*"gpplus",*/
"diaspora","mastodon"];
"diaspora","mastodon","signal"];
var fieldsPerson = ["username", "birthDate"];
var fieldsProject = [ "avancement", "startDate", "endDate", "parentId" ];
var fieldsOrga = [ "type", "parentId" ];
var fieldsEvent = [ "type", "startDate", "endDate", "parentId", "organizerId"];
var SNetwork = [ "telegram", "github", "gitlab", "twitter", "facebook", /*"gpplus",*/"diaspora","mastodon"];
var SNetwork = [ "telegram", "github", "gitlab", "twitter", "facebook", /*"gpplus",*/ "diaspora", "mastodon", "signal"];
if(collection == typeObj.person.col)
fieldsElement = fieldsElement.concat(fieldsPerson);
......
......@@ -695,10 +695,11 @@ var searchObj = {
if(typeof vL == "string"){
//alert(v.keyValue);
keyButton=(exists(v.keyValue) && (!v.keyValue || v.keyValue==="false")) ? kL:vL;
valueButton=(typeof v.list=="object" && exists(v.keyValue) && (!v.keyValue || v.keyValue==="false")) ? vL : keyButton;
str += '<button class="btn-filters-select '+k+' '+classButton+'" '+
dataType+' '+
'data-key="'+keyButton+'" '+
'data-value="' + keyButton+'" '+
'data-value="' + valueButton+'" '+
dataField+' '+
dataLabel+' '+
dataEvent+' '+
......
......@@ -17,6 +17,7 @@ dynForm = {
var s = today.getSeconds();
var reference = dd+mm+yyyy+s;
$("#ajaxFormModal #name").val(reference);
//$("#ajaxFormModal #invoice").val("Non");
// if($("#ajaxFormModal #type").val()=="pledge"){
// dyFCustom.setTitle("Faire une promesse de don");
// $("#ajaxFormModal #donationPlatform").hide();
......@@ -58,10 +59,10 @@ dynForm = {
inputType : "select",
label : "Civilité",
placeholder : "Choisir ...",
options : ["M.","Mme"],
options : ["Monsieur","Madame","Autre"],
groupOptions : false,
groupSelected : false,
//optionsValueAsKey:true,
optionsValueAsKey:true,
select2 : {
multiple : false
},
......@@ -96,10 +97,7 @@ dynForm = {
telephone : {
inputType : "text",
label : "Téléphone",
placeholder : "Téléphone",
rules: {
required:true
}
placeholder : "Téléphone"
},
amount : {
inputType: "text",
......@@ -110,19 +108,16 @@ dynForm = {
}
},
invoice : {
inputType : "select",
placeholder : "",
label : "Souhaitez-vous une facture ?",
options : [
"Non",
"Oui"
],
groupOptions : false,
groupSelected : false,
//optionsValueAsKey:true,
select2 : {
"multiple" : false
}
inputType : "checkboxSimple",
label: "Souhaitez-vous une facture ?",
params : {
"onText" : "Oui",
"offText" : "Non",
"onLabel" : "Je souhaite une facture",
"offLabel" : "Je ne souhaite pas de facture",
"labelInformation" : ""
},
checked : false
},
receiver : {
inputType : "finder",
......
......@@ -57,16 +57,16 @@ dynForm = {
openSearch :true
},
// BADGE:DE-COMMENT
// badges : {
// inputType : "finder",
// label : "Ajouter un badge",
// //multiple : true,