Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
co2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Albert Beltran
co2
Commits
1be6f4f8
Commit
1be6f4f8
authored
Jan 21, 2019
by
Raph El
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'development' into scopeDynForm
parents
0f56cd53
6e789d70
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
796 additions
and
507 deletions
+796
-507
assets/ico/favicon.ico
assets/ico/favicon.ico
+0
-0
assets/images/custom/ctc/banner-ctc.png
assets/images/custom/ctc/banner-ctc.png
+0
-0
assets/images/custom/ctc/banner_ctc.png
assets/images/custom/ctc/banner_ctc.png
+0
-0
assets/images/custom/ctc/default_directory.png
assets/images/custom/ctc/default_directory.png
+0
-0
assets/images/custom/ctc/partenaires_pacte.png
assets/images/custom/ctc/partenaires_pacte.png
+0
-0
assets/js/co.js
assets/js/co.js
+6
-5
assets/js/default/directory.js
assets/js/default/directory.js
+101
-66
assets/js/default/globalsearch.js
assets/js/default/globalsearch.js
+25
-4
assets/js/dynForm/proposal.js
assets/js/dynForm/proposal.js
+5
-4
assets/js/scopes/scopes.js
assets/js/scopes/scopes.js
+11
-5
config/CO2/params.json
config/CO2/params.json
+3
-3
models/CO2.php
models/CO2.php
+59
-52
views/admin/directoryTable.php
views/admin/directoryTable.php
+0
-1
views/admin/index.php
views/admin/index.php
+104
-33
views/app/welcome.php
views/app/welcome.php
+2
-1
views/custom/ctc.php
views/custom/ctc.php
+401
-35
views/custom/init.php
views/custom/init.php
+76
-15
views/custom/leport.php
views/custom/leport.php
+2
-283
views/translation/trad.php
views/translation/trad.php
+1
-0
No files found.
assets/ico/favicon.ico
0 → 100644
View file @
1be6f4f8
259 KB
assets/images/custom/ctc/banner-ctc.png
deleted
100644 → 0
View file @
0f56cd53
68.4 KB
assets/images/custom/ctc/banner_ctc.png
View replaced file @
0f56cd53
View file @
1be6f4f8
404 KB
|
W:
|
H:
128 KB
|
W:
|
H:
2-up
Swipe
Onion skin
assets/images/custom/ctc/default_directory.png
0 → 100644
View file @
1be6f4f8
44.7 KB
assets/images/custom/ctc/partenaires_pacte.png
0 → 100644
View file @
1be6f4f8
568 KB
assets/js/co.js
View file @
1be6f4f8
...
...
@@ -1535,17 +1535,18 @@ function setTitle(str, icon, topTitle,keywords,shortDesc) { mylog.log("setTitle"
if
(
topTitle
)
str
=
topTitle
;
$
(
document
).
prop
(
'
title
'
,
(
str
!=
""
)
?
str
:
"
Communecter, se connecter à sa commune
"
);
defaultTitle
=
(
typeof
custom
!=
"
undefined
"
&&
custom
!=
null
&&
typeof
custom
.
title
!=
"
undefined
"
)
?
custom
.
title
:
"
Communecter, se connecter à sa commune
"
;
$
(
document
).
prop
(
'
title
'
,
(
str
!=
""
)
?
str
:
defaultTitle
);
if
(
notNull
(
keywords
))
$
(
'
meta[name="keywords"]
'
).
attr
(
"
content
"
,
keywords
);
else
else
if
(
typeof
custom
==
"
undefined
"
||
!
notNull
(
custom
))
$
(
'
meta[name="keywords"]
'
).
attr
(
"
content
"
,
"
communecter,connecter, commun,commune, réseau, sociétal, citoyen, société, territoire, participatif, social, smarterre
"
);
if
(
notNull
(
shortDesc
))
if
(
notNull
(
shortDesc
))
{
$
(
'
meta[name="description"]
'
).
attr
(
"
content
"
,
shortDesc
);
else
}
else
if
(
typeof
custom
==
"
undefined
"
||
!
notNull
(
custom
))
$
(
'
meta[name="description"]
'
).
attr
(
"
content
"
,
"
Communecter : Connecter à sa commune, inter connecter les communs, un réseau sociétal pour un citoyen connecté et acteur au centre de sa société.
"
);
}
...
...
assets/js/default/directory.js
View file @
1be6f4f8
...
...
@@ -113,10 +113,6 @@ function initCountType(){
if
(
isCustom
(
searchObject
.
initType
,
"
types
"
)){
searchObject
.
countType
=
[];
$
.
each
(
custom
.
filters
.
app
[
searchObject
.
initType
].
types
,
function
(
e
,
v
){
//if($.inArray(v, ["NGO","Group","LocalBusiness","GovernmentOrganization"]) >= 0){
// if( $.inArray("organizations", searchObject.countType)<0)
// searchObject.types.push("organizations");
//}else
searchObject
.
countType
.
push
(
v
);
});
}
...
...
@@ -856,6 +852,9 @@ var directory = {
multiTagsT
:
[],
multiScopesT
:[],
viewMode
:
directoryViewMode
,
custom
:
(
typeof
custom
!=
"
undefined
"
&&
custom
!=
null
&&
typeof
custom
.
htmlConstruct
!=
"
undefined
"
&&
typeof
custom
.
htmlConstruct
.
directory
!=
"
undefined
"
)
?
custom
.
htmlConstruct
.
directory
:
null
,
colPos
:
"
left
"
,
dirLog
:
false
,
defaultPanelHtml
:
function
(
params
){
...
...
@@ -2537,13 +2536,13 @@ var directory = {
//mylog.log("-----------idParentRoom", idParentRoom);
var
name
=
(
typeof
params
.
title
!=
"
undefined
"
&&
params
.
title
!=
"
undefined
"
)
?
params
.
title
:
params
.
name
;
var
description
=
""
;
if
(
typeof
params
.
description
!=
"
undefined
"
){
description
=
params
.
description
.
length
>
200
?
params
.
description
.
substr
(
0
,
200
)
+
"
...
"
:
params
.
description
;
description
=
description
.
replace
(
/
\n
/g
,
"
<br>
"
);
//add Markdown
description
=
dataHelper
.
markdownToHtml
(
description
);
}
//
var description = "";
//
if(typeof params.description != "undefined" ){
//
description = params.description.length > 200 ? params.description.substr(0, 200) + "..." : params.description;
//
description = description.replace(/\n/g,"<br>");
//
//add Markdown
//
description = dataHelper.markdownToHtml(description);
//
}
name
=
escapeHtml
(
name
);
var
thisId
=
typeof
params
[
"
_id
"
]
!=
"
undefined
"
&&
typeof
params
[
"
_id
"
][
"
$id
"
]
!=
"
undefined
"
?
params
[
"
_id
"
][
"
$id
"
]
:
...
...
@@ -2578,12 +2577,13 @@ var directory = {
str
+=
"
<a href='javascript:;'
"
+
linkParams
+
"
class='margin-bottom-10 all-coop-detail-desc
"
+
thisId
+
"
openCoopPanelHtml container-img-profil'>
"
+
params
.
imgMediumProfil
+
"
</a>
"
;
// OPEN PANEL BTN
str
+=
"
<button class='btn btn-sm btn-default pull-right openCoopPanelHtml bold letter-turq'
"
+
linkParams
+
"
><i class='fa fa-chevron-right'></i> <span class='hidden-xs'>
"
+
trad
.
Open
+
"
</span></button>
"
;
//
str += "<button class='btn btn-sm btn-default pull-right openCoopPanelHtml bold letter-turq' "+linkParams+
//
"><i class='fa fa-chevron-right'></i> <span class='hidden-xs'>"+trad.Open+"</span></button>";
// NAME
if
(
name
!=
""
)
str
+=
'
<h4 class="panel-title letter-turq"><i class="fa
'
+
params
.
ico
+
'
"></i>
'
+
name
+
'
</h4>
'
;
str
+=
'
<a href="javascript:;" class="openCoopPanelHtml" style="text-decoration:none;"
'
+
linkParams
+
'
>
'
+
'
<h4 class="panel-title letter-turq"><i class="fa
'
+
params
.
ico
+
'
"></i>
'
+
name
+
'
</h4></a>
'
;
// STATE OF THE PROPOSAL
...
...
@@ -2605,10 +2605,10 @@ var directory = {
else
if
((
params
.
status
==
"
tovote
"
||
params
.
status
==
"
amendementAndVote
"
)
&&
params
.
hasVote
!==
false
)
str
+=
'
<small class="margin-left-15"><i class="fa fa-thumbs-up"></i>
'
+
trad
[
"
You did vote
"
]
+
'
</small>
'
;
if
(
params
.
chat
)
str
+=
'
<a href="javascript:"
'
+
linkParams
+
'
data-coop-section="comments" class="openCoopPanelHtml btn btn-xs btn-default tooltips pull-right text-dark" data-toggle="tooltip" data-placement="top" data-original-title="
'
+
tradDynForm
.
chat
+
'
"><i class="fa fa-comments" ></i></a>
'
;
if
(
params
.
invite
)
str
+=
'
<a href="javascript:" data-coop-id="
'
+
thisId
+
'
" class="btn btn-xs btn-default tooltips pull-right text-azure " data-toggle="tooltip" data-placement="top" data-original-title="
'
+
trad
.
invitesomeone
+
'
"><i class="fa fa-bullhorn"></i></a>
'
;
//
if(params.chat)
//
str += '<a href="javascript:" '+linkParams+' data-coop-section="comments" class="openCoopPanelHtml btn btn-xs btn-default tooltips pull-right text-dark" data-toggle="tooltip" data-placement="top" data-original-title="'+tradDynForm.chat+'"><i class="fa fa-comments" ></i></a> ';
//
if(params.invite)
//
str += ' <a href="javascript:" data-coop-id="'+ thisId + '" class="btn btn-xs btn-default tooltips pull-right text-azure " data-toggle="tooltip" data-placement="top" data-original-title="'+trad.invitesomeone+'"><i class="fa fa-bullhorn"></i></a>';
str
+=
'
</h5>
'
;
}
...
...
@@ -2620,8 +2620,12 @@ var directory = {
str
+=
'
<div class="all-coop-detail-desc
'
+
thisId
+
'
">
'
;
// DESCRIPTION
if
(
description
!=
""
)
str
+=
'
<hr>
'
;
str
+=
'
<span class="col-xs-12 no-padding text-dark descMD">
'
+
description
+
'
</span>
'
;
// if(description != "") str += '<hr>';
// str += '<span class="col-xs-12 no-padding text-dark descMD">'+description+'</span>';
if
(
typeof
params
.
shortDescription
!=
"
undefined
"
&&
params
.
shortDescription
!=
""
){
str
+=
'
<hr>
'
;
str
+=
'
<span class="col-xs-12 no-padding text-dark descMD">
'
+
params
.
shortDescription
+
'
</span>
'
;
}
//SHOW HIDE VOTE BTNs
var
btnSize
=
(
params
.
status
==
"
amendementAndVote
"
)
?
"
6
"
:
"
12
"
;
...
...
@@ -2923,40 +2927,45 @@ var directory = {
typeHeader
=
(
val
==
"
citoyens
"
)
?
"
persons
"
:
val
;
mylog
.
log
(
"
searchTypeHtml typeHeader
"
,
typeHeader
,
headerParams
);
var
params
=
headerParams
[
typeHeader
];
spanType
+=
"
<a href='#search?types=
"
+
typeHeader
+
"
' class='text-
"
+
params
.
color
+
"
lbh'>
"
+
"
<i class='fa fa-
"
+
params
.
icon
+
"
hidden-sm hidden-md hidden-lg padding-5'></i> <span class='hidden-xs'>
"
+
params
.
name
+
"
</span>
"
+
"
</a>
"
;
spanType
+=
// "<a href='#search?types="+typeHeader+"' class='text-"+params.color+" lbh'>"+
"
<span class='text-
"
+
params
.
color
+
"
'>
"
+
"
<i class='fa fa-
"
+
params
.
icon
+
"
hidden-sm hidden-md hidden-lg padding-5'></i> <span class='hidden-xs'>
"
+
params
.
name
+
"
</span>
"
+
"
</span>
"
;
//"</a> ";
});
return
spanType
;
},
endOfResult
:
function
(
noResult
){
//Event scroll and all searching
$
(
"
#btnShowMoreResult
"
).
remove
();
scrollEnd
=
true
;
//msg specific for end search
match
=
(
searchObject
.
text
!=
""
)
?
"
match
"
:
""
;
msg
=
(
notNull
(
noResult
)
&&
noResult
)
?
trad
[
"
noresult
"
+
match
]
:
trad
[
"
nomoreresult
"
+
match
];
contributeMsg
=
"
<span class='italic'><small>
"
+
trad
.
contributecommunecterslogan
+
"
</small><br/></span>
"
;
if
(
userId
!=
""
){
contributeAction
=
'
;" data-target="#dash-create-modal" data-toggle="modal" data-toggle="tooltip" data-placement="top"
'
;
if
(
location
.
hash
==
"
#ressources
"
)
contributeAction
=
'
dyFObj.openForm(
\'
ressources
\'
);"
'
;
else
if
(
location
.
hash
==
"
#annonces
"
)
contributeAction
=
'
dyFObj.openForm(
\'
classifieds
\'
);"
'
;
else
if
(
location
.
hash
==
"
#agenda
"
)
contributeAction
=
'
dyFObj.openForm(
\'
event
\'
);"
'
;
contributeMsg
+=
'
<a href="javascript:
'
+
contributeAction
+
'
class="text-green-k tooltips" >
'
+
'
<i class="fa fa-plus-circle"></i>
'
+
trad
.
sharesomething
+
'
</a>
'
;
}
else
{
contributeMsg
+=
'
<a href="javascript:;" class="letter-green margin-left-10" data-toggle="modal" data-target="#modalLogin">
'
+
'
<i class="fa fa-sign-in"></i>
'
+
trad
.
connectyou
+
'
</a>
'
;
str
=
""
;
if
(
!
notNull
(
directory
.
custom
)){
//Event scroll and all searching
$
(
"
#btnShowMoreResult
"
).
remove
();
scrollEnd
=
true
;
//msg specific for end search
match
=
(
searchObject
.
text
!=
""
)
?
"
match
"
:
""
;
msg
=
(
notNull
(
noResult
)
&&
noResult
)
?
trad
[
"
noresult
"
+
match
]
:
trad
[
"
nomoreresult
"
+
match
];
contributeMsg
=
"
<span class='italic'><small>
"
+
trad
.
contributecommunecterslogan
+
"
</small><br/></span>
"
;
if
(
userId
!=
""
){
contributeAction
=
'
;" data-target="#dash-create-modal" data-toggle="modal" data-toggle="tooltip" data-placement="top"
'
;
if
(
location
.
hash
==
"
#ressources
"
)
contributeAction
=
'
dyFObj.openForm(
\'
ressources
\'
);"
'
;
else
if
(
location
.
hash
==
"
#annonces
"
)
contributeAction
=
'
dyFObj.openForm(
\'
classifieds
\'
);"
'
;
else
if
(
location
.
hash
==
"
#agenda
"
)
contributeAction
=
'
dyFObj.openForm(
\'
event
\'
);"
'
;
contributeMsg
+=
'
<a href="javascript:
'
+
contributeAction
+
'
class="text-green-k tooltips" >
'
+
'
<i class="fa fa-plus-circle"></i>
'
+
trad
.
sharesomething
+
'
</a>
'
;
}
else
{
contributeMsg
+=
'
<a href="javascript:;" class="letter-green margin-left-10" data-toggle="modal" data-target="#modalLogin">
'
+
'
<i class="fa fa-sign-in"></i>
'
+
trad
.
connectyou
+
'
</a>
'
;
}
str
=
'
<div class="pull-left col-md-12 text-left" id="footerDropdown" style="width:100%;">
'
;
str
+=
"
<h5 style='margin-bottom:10px; margin-left:15px;border-left: 2px solid lightgray;' class='text-dark padding-20'>
"
+
msg
+
"
<br/>
"
+
contributeMsg
+
"
</h5><br/>
"
;
str
+=
"
</div>
"
;
}
str
=
'
<div class="pull-left col-md-12 text-left" id="footerDropdown" style="width:100%;">
'
;
str
+=
"
<h5 style='margin-bottom:10px; margin-left:15px;border-left: 2px solid lightgray;' class='text-dark padding-20'>
"
+
msg
+
"
<br/>
"
+
contributeMsg
+
"
</h5><br/>
"
;
str
+=
"
</div>
"
;
return
str
;
},
createBtnHtml
:
function
(){
...
...
@@ -2978,12 +2987,14 @@ var directory = {
if
(
$
.
inArray
(
addType
,
[
"
NGO
"
,
"
Group
"
,
"
LocalBusiness
"
,
"
GovernmentOrganization
"
])
>
0
){
subData
=
"
data-ktype='
"
+
addType
+
"
'
"
;
typeForm
=
"
organization
"
;
}
else
if
(
typeForm
!=
"
ressources
"
&&
typeForm
!=
"
poi
"
&&
typeForm
!=
"
places
"
&&
typeForm
!=
"
classifieds
"
&&
typeForm
!=
"
jobs
"
&&
typeForm
!=
"
interop
"
)
typeForm
=
typeObj
[
typeObj
[
addType
].
sameAs
].
ctrl
;
btn
+=
'
<button class="btn bg-white margin-left-5 btn-add pull-right text-
'
+
headerParams
[
addType
].
color
+
'
'
+
}
else
if
(
typeForm
!=
"
ressources
"
&&
typeForm
!=
"
poi
"
&&
typeForm
!=
"
places
"
&&
typeForm
!=
"
classifieds
"
&&
typeForm
!=
"
jobs
"
&&
typeForm
!=
"
interop
"
)
typeForm
=
typeObj
[
typeObj
[
addType
].
sameAs
].
ctrl
;
mylog
.
log
(
"
addType
"
,
addType
);
labelPlus
=
(
typeof
headerParams
[
addType
].
label
!=
"
undefined
"
)
?
headerParams
[
addType
].
label
:
trad
[
"
add
"
+
addType
];
btn
+=
'
<button class="btn main-btn-create margin-left-5 btn-add pull-right text-white bg-
'
+
headerParams
[
addType
].
color
+
'
"
'
+
'
data-type="
'
+
typeForm
+
'
"
'
+
subData
+
'
>
'
+
'
<i class="fa fa-plus-circle"></i>
'
+
trad
[
"
add
"
+
addType
]
+
'
<i class="fa fa-plus-circle"></i>
'
+
labelPlus
+
'
</button>
'
;
}
return
btn
;
...
...
@@ -3007,10 +3018,7 @@ var directory = {
mylog
.
log
(
"
-----------headerHtml countHeader3:
"
,
countHeader
);
// posClass=(typeCount == "classified") ? "left" : "right";
}
//headerStr="<div class='col-md-2 col-sm-3 hidden-xs'>";
//if(userId != "")
//headerStr+=directory.createBtnHtml();
//headerStr+="</div>";
mylog
.
log
(
"
-----------headerHtml :
"
+
countHeader
);
resultsStr
=
(
countHeader
>
1
)
?
trad
.
results
:
trad
.
result
;
...
...
@@ -3026,7 +3034,7 @@ var directory = {
directory
.
searchTypeHtml
()
+
'
</small>
'
+
'
</h4>
'
+
'
<div class="
'
+
toolsSize
+
'
col-xs-2 pull-right no-padding text-right headerSearchTools">
'
;
'
<div class="
'
+
toolsSize
+
'
col-xs-2 pull-right no-padding text-right headerSearchTools"
style="padding-top:3px !important;"
>
'
;
// TODO CLEM :: ADD SURVEY
// if(searchObject.types.length == 1 && searchObject.types[0]=="vote"){
// headerStr +='<a href="javascript:;" data-form-type="survey" class="addBtnFoot btn-open-form btn btn-default addBtnAll letter-turq margin-bottom-10">'+
...
...
@@ -3034,16 +3042,37 @@ var directory = {
// '<span>'+tradDynForm.createsurvey+'</span>'+
// '</a>';
// }
if
(
userId
!=
""
&&
notNull
(
directory
.
custom
)
&&
typeof
directory
.
custom
.
header
!=
"
undefined
"
&&
typeof
directory
.
custom
.
header
.
add
!=
"
undefined
"
&&
typeof
directory
.
custom
.
header
.
add
[
searchObject
.
initType
]
!=
"
undefined
"
){
headerStr
+=
"
<div class='pull-right'>
"
;
headerStr
+=
directory
.
createBtnHtml
();
headerStr
+=
"
</div>
"
;
}
if
(
!
notNull
(
directory
.
custom
)
||
typeof
directory
.
custom
.
header
==
"
undefined
"
||
typeof
directory
.
custom
.
header
.
viewMode
==
"
undefined
"
||
directory
.
custom
.
header
.
viewMode
)
{
headerStr
+=
'
<button class="btn switchDirectoryView
'
;
if
(
directory
.
viewMode
==
"
list
"
)
headerStr
+=
'
active
'
;
headerStr
+=
'
margin-right-5" data-value="list"><i class="fa fa-bars"></i></button>
'
+
'
<button class="btn switchDirectoryView
'
;
if
(
directory
.
viewMode
==
"
block
"
)
headerStr
+=
'
active
'
;
headerStr
+=
'
" data-value="block"><i class="fa fa-th-large"></i></button>
'
;
if
(
directory
.
viewMode
==
"
list
"
)
headerStr
+=
'
active
'
;
headerStr
+=
'
margin-right-5" data-value="list"><i class="fa fa-bars"></i></button>
'
+
'
<button class="btn switchDirectoryView
'
;
if
(
directory
.
viewMode
==
"
block
"
)
headerStr
+=
'
active
'
;
headerStr
+=
'
" data-value="block"><i class="fa fa-th-large"></i></button>
'
;
}
if
(
userId
!=
""
&&
searchObject
.
initType
==
"
classifieds
"
){
headerStr
+=
'
<button class="btn btn-default letter-blue addToAlert margin-left-5 tooltips" data-toggle="tooltip" data-placement="bottom" title="
'
+
trad
.
bealertofnewitems
+
'
" data-value="list" onclick="directory.addToAlert();"><i class="fa fa-bell"></i> <span class="hidden-xs">
'
+
trad
.
alert
+
'
</span></button>
'
;
}
if
(
typeof
themeParams
!=
"
undefined
"
&&
themeParams
.
appRendering
!=
"
undefined
"
&&
themeParams
.
appRendering
==
"
vertical
"
){
if
(
typeof
themeParams
!=
"
undefined
"
&&
themeParams
.
appRendering
!=
"
undefined
"
&&
themeParams
.
appRendering
==
"
vertical
"
&&
(
!
notNull
(
directory
.
custom
)
||
typeof
directory
.
custom
.
header
==
"
undefined
"
||
typeof
directory
.
custom
.
header
.
map
==
"
undefined
"
||
directory
.
custom
.
header
.
map
))
{
headerStr
+=
'
<button class="btn-show-map hidden-xs" style="" title="
'
+
trad
.
showthemap
+
'
" alt="
'
+
trad
.
Showthemap
+
'
">
'
+
'
<i class="fa fa-map-marker"></i> Carte
'
+
'
</button>
'
;
...
...
@@ -3203,13 +3232,14 @@ var directory = {
if
(
typeof
themeParams
.
add
==
"
undefined
"
||
(
typeof
themeParams
.
add
!=
"
undefined
"
&&
typeof
themeParams
.
add
[
typeForm
]
!=
"
undefined
"
)){
mylog
.
log
(
"
addType
"
,
addType
);
labelPlus
=
(
typeof
headerParams
[
addType
].
label
!=
"
undefined
"
)
?
headerParams
[
addType
].
label
:
trad
[
"
add
"
+
addType
];
btn
=
'
<button class="btn main-btn-create text-
'
+
headerParams
[
addType
].
color
+
'
tooltips" padding-5 no-margin
'
+
'
data-type="
'
+
typeForm
+
'
"
'
+
subData
+
'
data-toggle="tooltip" data-placement="top"
'
+
'
title="" style="border: none;background-color: white;">
'
+
'
<h5 class="no-margin">
'
+
'
<i class="fa fa-plus-circle"></i>
'
+
trad
[
"
add
"
+
addType
]
+
'
<i class="fa fa-plus-circle"></i>
'
+
labelPlus
+
'
</h5>
'
+
'
</button>
'
;
}
...
...
@@ -3333,7 +3363,12 @@ var directory = {
params
.
imgProfil
=
"
<i class='fa fa-image fa-2x'></i>
"
;
params
.
imgMediumProfil
=
"
<i class='fa fa-image fa-2x'></i>
"
;
}
if
(
"
undefined
"
!=
typeof
directory
.
custom
&&
typeof
directory
.
custom
.
results
!=
"
undefined
"
&&
typeof
directory
.
custom
.
results
[
params
.
type
]
!=
"
undefined
"
&&
typeof
directory
.
custom
.
results
[
params
.
type
].
defaultImg
!=
"
undefined
"
)
params
.
imgMediumProfil
=
"
<img class='img-responsive' onload='directory.checkImage(this);' src='
"
+
parentModuleUrl
+
directory
.
custom
.
results
[
params
.
type
].
defaultImg
+
"
'/>
"
;
if
(
"
undefined
"
!=
typeof
params
.
profilMediumImageUrl
&&
params
.
profilMediumImageUrl
!=
""
)
params
.
imgMediumProfil
=
"
<img class='img-responsive' onload='directory.checkImage(this);' src='
"
+
baseUrl
+
params
.
profilMediumImageUrl
+
"
'/>
"
;
...
...
assets/js/default/globalsearch.js
View file @
1be6f4f8
...
...
@@ -78,6 +78,10 @@ function autoCompleteSearchGS(search, indexMin, indexMax, input){
data
.
countType
=
[
"
citoyens
"
,
"
organizations
"
,
"
projects
"
,
"
events
"
];
data
.
searchType
=
[
"
citoyens
"
,
"
organizations
"
,
"
projects
"
,
"
events
"
];
}
if
(
notNull
(
custom
)
&&
typeof
custom
.
filters
!=
"
undefined
"
&&
typeof
custom
.
filters
.
searchTypeGS
!=
"
undefined
"
){
data
.
countType
=
custom
.
filters
.
searchTypeGS
;
data
.
searchType
=
custom
.
filters
.
searchTypeGS
;
}
var
domTarget
=
(
notNull
(
input
))
?
input
+
"
.dropdown-result-global-search
"
:
"
.dropdown-result-global-search
"
;
showDropDownGS
(
true
,
domTarget
);
if
(
indexMin
>
0
)
...
...
@@ -196,6 +200,8 @@ function autoCompleteSearchGS(search, indexMin, indexMax, input){
}
var
name
=
typeof
o
.
name
!=
"
undefined
"
?
o
.
name
:
""
;
if
(
typeof
o
.
title
!=
"
undefined
"
)
name
=
o
.
title
;
var
postalCode
=
(
typeof
o
.
address
!=
"
undefined
"
&&
o
.
address
!=
null
&&
typeof
o
.
address
.
postalCode
!=
"
undefined
"
)
?
o
.
address
.
postalCode
:
""
;
...
...
@@ -227,10 +233,18 @@ function autoCompleteSearchGS(search, indexMin, indexMax, input){
});
target
=
""
;
if
(
type
==
"
proposals
"
)
url
=
"
javascript:;
"
;
classA
=
(
type
==
"
proposals
"
)
?
"
openCoopPanelHtml
"
:
"
lbh
"
;
attrA
=
""
;
if
(
type
==
"
proposals
"
){
attrA
=
"
data-coop-type='proposals' data-coop-id='
"
+
id
+
"
' data-coop-idparentroom='
"
;
if
(
typeof
o
.
idParentRoom
!=
"
undefined
"
)
attrA
+=
o
.
idParentRoom
;
attrA
+=
"
' data-coop-parentid='
"
+
data
.
parentId
+
"
' data-coop-parenttype='
"
+
data
.
parentType
+
"
'
"
;
}
mylog
.
log
(
"
type
"
,
type
);
if
(
type
!=
"
city
"
&&
type
!=
"
zone
"
){
str
+=
"
<a href='
"
+
url
+
"
' class='
lbh col-md-12 col-sm-12 col-xs-12 no-padding searchEntity'
>
"
;
str
+=
"
<a href='
"
+
url
+
"
' class='
"
+
classA
+
"
col-md-12 col-sm-12 col-xs-12 no-padding searchEntity'
"
+
attrA
+
"
>
"
;
str
+=
"
<div class='col-md-2 col-sm-2 col-xs-2 no-padding entityCenter text-center'>
"
;
str
+=
htmlIco
;
str
+=
"
</div>
"
;
...
...
@@ -370,10 +384,17 @@ function autoCompleteSearchGS(search, indexMin, indexMax, input){
'<i class="fa fa-plus-circle"></i> '+trad.createpage+
'</button>'+
"</div>"; */
extendMsg
=
trad
.
extendedsearch
;
extendUrl
=
"
#search
"
;
if
(
notNull
(
custom
)
&&
typeof
custom
.
searchOpenMenu
!=
"
undefined
"
){
extendMsg
=
custom
.
searchOpenMenu
.
msg
;
extendUrl
=
custom
.
searchOpenMenu
.
url
;
}
str
+=
'
<div class="text-center" id="footerDropdownGS">
'
;
str
+=
"
<label class='text-dark'>
"
+
totalDataGSMSG
+
"
</label><br/>
"
;
str
+=
'
<a href="
#search
" class="btn btn-default btn-sm lbh" id="btnShowMoreResultGS">
'
+
'
<i class="fa fa-angle-right"></i> <i class="fa fa-search"></i>
'
+
trad
.
extendedsearch
+
str
+=
'
<a href="
'
+
extendUrl
+
'
" class="btn btn-default btn-sm lbh" id="btnShowMoreResultGS">
'
+
'
<i class="fa fa-angle-right"></i> <i class="fa fa-search"></i>
'
+
extendMsg
+
'
</a>
'
;
str
+=
'
</div>
'
;
...
...
assets/js/dynForm/proposal.js
View file @
1be6f4f8
...
...
@@ -9,7 +9,6 @@ dynForm = {
},
onload
:
function
(
data
){
if
(
location
.
hash
.
indexOf
(
"
.coop.room
"
)
>=
0
){
mylog
.
log
(
"
typeof contextData.currentRoomId
"
,
typeof
contextData
.
currentRoomId
);
mylog
.
log
(
"
init input hidden parentdata :
"
,
contextData
.
id
,
contextData
.
type
,
contextData
.
currentRoomId
);
...
...
@@ -261,7 +260,7 @@ dynForm = {
$
(
"
.producerfinder
"
).
hide
();
},
adminOnly
:
function
()
{
adminOnly
:
function
()
{
if
(
typeof
custom
!=
"
undefined
"
&&
typeof
custom
.
admins
!=
"
undefined
"
&&
typeof
custom
.
admins
[
userId
]
!=
"
undefined
"
...
...
@@ -272,10 +271,13 @@ dynForm = {
&&
typeof
custom
.
dynForm
.
proposal
.
adminOnly
!=
"
undefined
"
){
$
.
each
(
custom
.
dynForm
.
proposal
.
adminOnly
,
function
(
i
,
p
)
{
$
(
"
.
"
+
p
).
show
();
})
})
;
}
}
}
},
setTitle
:
function
()
{
$
(
"
#ajax-modal-modal-title
"
).
html
(
tradDynForm
.
addMeasure
);
}
},
afterSave
:
function
(
data
){
...
...
@@ -310,7 +312,6 @@ dynForm = {
// TODO : sur survey on utilise tradDynForm.infoSurvey
info
:
{
inputType
:
"
custom
"
,
html
:
"
<br><p><i class='fa fa-info-circle'></i>
"
+
tradDynForm
.
infoProposal3
+
"
</p>
"
,
},
...
...
assets/js/scopes/scopes.js
View file @
1be6f4f8
...
...
@@ -138,19 +138,25 @@ function getUrlSearchLocality(urlGet, alert){
if
(
notNull
(
searchingOnLoc
)){
$
.
each
(
searchingOnLoc
,
function
(
key
,
value
){
mylog
.
log
(
"
getMultiScopeForSearch value.active
"
,
value
.
active
);
if
(
typeof
custom
==
"
undefined
"
||
typeof
custom
.
scopes
==
"
undefined
"
||
typeof
custom
.
scopes
[
key
]
==
"
undefined
"
||
notNull
(
alert
)
){
//if(notNull(alert)
){
if
(
value
.
active
==
true
){
if
(
value
.
type
==
"
cities
"
){
if
(
value
.
type
==
"
cities
"
&&
(
typeof
custom
==
"
undefined
"
||
typeof
custom
.
filters
==
"
undefined
"
||
typeof
custom
.
filters
.
scopes
==
"
undefined
"
||
typeof
custom
.
filters
.
scopes
.
cities
==
"
undefned
"
||
key
.
indexOf
(
custom
.
filters
.
scopes
.
cities
)
<
0
)){
keyScope
=
(
typeof
value
.
postalCode
==
"
undefined
"
)
?
value
.
id
:
value
.
id
+
"
cp
"
+
value
.
postalCode
;
keyScope
+=
(
typeof
value
.
allCP
==
"
undefined
"
&&
value
.
allCP
)
?
"
allPostalCode
"
:
""
;
urlScopeCity
.
push
(
keyScope
);
}
else
if
(
value
.
type
==
"
cp
"
)
else
if
(
value
.
type
==
"
cp
"
&&
(
typeof
custom
==
"
undefined
"
||
typeof
custom
.
filters
==
"
undefined
"
||
typeof
custom
.
filters
.
scopes
==
"
undefined
"
||
typeof
custom
.
filters
.
scopes
.
cp
==
"
undefned
"
||
value
.
id
.
indexOf
(
custom
.
filters
.
scopes
.
cp
)
<
0
))
urlScopeCp
.
push
(
value
.
id
);
else
if
(
value
.
type
.
indexOf
(
"
level
"
)
>=
0
)
else
if
(
value
.
type
.
indexOf
(
"
level
"
)
>=
0
&&
(
typeof
custom
==
"
undefined
"
||
typeof
custom
.
filters
==
"
undefined
"
||
typeof
custom
.
filters
.
scopes
==
"
undefined
"
||
typeof
custom
.
filters
.
scopes
.
zones
==
"
undefned
"
||
value
.
id
.
indexOf
(
custom
.
filters
.
scopes
.
zones
)
<
0
))
urlScopeZone
.
push
(
value
.
id
);
}
}
//
}
});
if
(
urlScopeCity
.
length
>
0
)
urlMyScope
+=
"
&cities=
"
+
urlScopeCity
.
join
(
"
,
"
);
if
(
urlScopeZone
.
length
>
0
)
urlMyScope
+=
"
&zones=
"
+
urlScopeZone
.
join
(
"
,
"
);
...
...
config/CO2/params.json
View file @
1be6f4f8
...
...
@@ -42,7 +42,7 @@
"hash"
:
"#app.welcome"
,
"icon"
:
""
,
"mainTitle"
:
"Réseau sociétal <span class='text-red'>territorial</span>"
,
"placeholderMainSearch"
:
"
search something ...
"
,
"placeholderMainSearch"
:
"
what are you looking for ?
"
,
"lblBtnCreate"
:
"Create something"
,
"colorBtnCreate"
:
"green"
},
...
...
@@ -56,7 +56,7 @@
"hash"
:
"#app.home"
,
"icon"
:
""
,
"mainTitle"
:
"My citizen network"
,
"placeholderMainSearch"
:
"
search something ...
"
,
"placeholderMainSearch"
:
"
what are you looking for ?
"
,
"lblBtnCreate"
:
"Create something"
,
"colorBtnCreate"
:
"green"
},
...
...
@@ -248,7 +248,7 @@
"hash"
:
"#app.page"
,
"icon"
:
""
,
"mainTitle"
:
"Réseau social citoyen"
,
"placeholderMainSearch"
:
"
search something ...
"
"placeholderMainSearch"
:
"
what are you looking for ?
"
},
"#info"
:
{
"inMenu"
:
false
,
...
...
models/CO2.php
View file @
1be6f4f8
...
...
@@ -92,7 +92,7 @@ class CO2 {
if
(
!
empty
(
$v
)){
$newObj
[
$key
]
=
(
@
$filter
[
$key
])
?
$filter
[
$key
]
:
$v
;
$checkArray
=
true
;
$arrayInCustom
=
[
"label"
,
"subdomainName"
,
"icon"
,
"height"
,
"imgPath"
,
"useFilter"
,
"slug"
,
"formCreate"
];
$arrayInCustom
=
[
"label"
,
"subdomainName"
,
"placeholderMainSearch"
,
"icon"
,
"height"
,
"imgPath"
,
"useFilter"
,
"slug"
,
"formCreate"
];
foreach
(
$arrayInCustom
as
$entry
){
if
(
@
$v
[
$entry
]){
$newObj
[
$key
][
$entry
]
=
$v
[
$entry
];
...
...
@@ -108,63 +108,70 @@ class CO2 {
public
static
function
filterThemeInCustom
(
$params
){
$menuApp
=
array
(
"#annonces"
,
"#search"
,
"#agenda"
,
"#live"
,
"#dda"
);
//filter menu app custom
if
(
@
Yii
::
app
()
->
session
[
"custom"
][
"app"
]){
$params
[
"numberOfApp"
]
=
count
(
Yii
::
app
()
->
session
[
"custom"
][
"app"
]);
$menuPages
=
self
::
checkCOstumList
(
Yii
::
app
()
->
session
[
"custom"
][
"app"
],
$params
[
"pages"
]);
foreach
(
$params
[
"pages"
]
as
$hash
=>
$v
){
if
(
!
in_array
(
$hash
,
$menuApp
))
$menuPages
[
$hash
]
=
$v
;
}
$params
[
"pages"
]
=
$menuPages
;
}
if
(
@
Yii
::
app
()
->
session
[
"custom"
][
"header"
]){
if
(
@
Yii
::
app
()
->
session
[
"custom"
][
"header"
][
"banner"
])
$params
[
"header"
][
"banner"
]
=@
Yii
::
app
()
->
session
[
"custom"
][
"header"
][
"banner"
];
if
(
@
Yii
::
app
()
->
session
[
"custom"
][
"header"
][
"css"
])
$params
[
"header"
][
"css"
]
=@
Yii
::
app
()
->
session
[
"custom"
][
"header"
][
"css"
];
if
(
@
Yii
::
app
()
->
session
[
"custom"
][
"header"
][
"menuTop"
]){
if
(
@
Yii
::
app
()
->
session
[
"custom"
][
"header"
][
"menuTop"
][
"navLeft"
])
$params
[
"header"
][
"menuTop"
][
"navLeft"
]
=
self
::
checkCOstumList
(
Yii
::
app
()
->
session
[
"custom"
][
"header"
][
"menuTop"
][
"navLeft"
],
$params
[
"header"
][
"menuTop"
][
"navLeft"
]);
if
(
@
Yii
::
app
()
->
session
[
"custom"
][
"header"
][
"menuTop"
][
"navRight"
])
$params
[
"header"
][
"menuTop"
][
"navRight"
]
=
self
::
checkCOstumList
(
Yii
::
app
()
->
session
[
"custom"
][
"header"
][
"menuTop"
][
"navRight"
],
$params
[
"header"
][
"menuTop"
][
"navRight"
]);
if
(
@
Yii
::
app
()
->
session
[
"custom"
][
"htmlConstruct"
]){
$constructParams
=
Yii
::
app
()
->
session
[
"custom"
][
"htmlConstruct"
];
if
(
@
$constructParams
[
"app"
]){
$params
[
"numberOfApp"
]
=
count
(
$constructParams
[
"app"
]);
$menuPages
=
self
::
checkCOstumList
(
$constructParams
[
"app"
],
$params
[
"pages"
]);
foreach
(
$params
[
"pages"
]
as
$hash
=>
$v
){
if
(
!
in_array
(
$hash
,
$menuApp
))
$menuPages
[
$hash
]
=
$v
;
}
$params
[
"pages"
]
=
$menuPages
;
}
}
if
(
@
Yii
::
app
()
->
session
[
"custom"
][
"element"
]){
if
(
@
Yii
::
app
()
->
session
[
"custom"
][
"element"
][
"initView"
])
$params
[
"element"
][
"initView"
]
=@
Yii
::
app
()
->
session
[
"custom"
][
"element"
][
"initView"
];
if
(
@
Yii
::
app
()
->
session
[
"custom"
][
"element"
][
"menuLeft"
]){
foreach
(
$params
[
"element"
][
"menuLeft"
]
as
$key
=>
$v
){
if
(
@
Yii
::
app
()
->
session
[
"custom"
][
"element"
][
"menuLeft"
][
$key
]){
if
(
@
Yii
::
app
()
->
session
[
"custom"
][
"element"
][
"menuLeft"
][
$key
][
"label"
])
$params
[
"element"
][
"menuLeft"
][
$key
][
"label"
]
=
Yii
::
app
()
->
session
[
"custom"
][
"element"
][
"menuLeft"
][
$key
][
"label"
];
if
(
@
Yii
::
app
()
->
session
[
"custom"
][
"element"
][
"menuLeft"
][
$key
][
"icon"
])
$params
[
"element"
][
"menuLeft"
][
$key
][
"icon"
]
=
Yii
::
app
()
->
session
[
"custom"
][
"element"
][
"menuLeft"
][
$key
][
"icon"
];
}
else
{
unset
(
$params
[
"element"
][
"menuLeft"
][
$key
]);
}
if
(
@
$constructParams
[
"header"
]){
if
(
@
$constructParams
[
"header"
][
"banner"
])
$params
[
"header"
][
"banner"
]
=@
$constructParams
[
"header"
][
"banner"
];
if
(
@
$constructParams
[
"header"
][
"css"
])
$params
[
"header"
][
"css"
]
=@
$constructParams
[
"header"
][
"css"
];
if
(
@
$constructParams
[
"header"
][
"menuTop"
]){
if
(
@
$constructParams
[
"header"
][
"menuTop"
][
"navLeft"
])
$params
[
"header"
][
"menuTop"
][
"navLeft"
]
=
self
::
checkCOstumList
(
$constructParams
[
"header"
][
"menuTop"
][
"navLeft"
],
$params
[
"header"
][
"menuTop"
][
"navLeft"
]);
if
(
@
$constructParams
[
"header"
][
"menuTop"
][
"navRight"
])
$params
[
"header"
][
"menuTop"
][
"navRight"
]
=
self
::
checkCOstumList
(
$constructParams
[
"header"
][
"menuTop"
][
"navRight"
],
$params
[
"header"
][
"menuTop"
][
"navRight"
]);
}
}
/* if(@Yii::app()->session["custom"]["element"]["menuTop"]){
foreach($params["element"]["menuTop"] as $key => $v){
if(@Yii::app()->session["custom"]["element"]["menuTop"][$key]){
if(@Yii::app()->session["custom"]["element"]["menuTop"][$key]["label"])
$params["element"]["menuTop"][$key]["label"]=Yii::app()->session["custom"]["element"]["menuTop"][$key]["label"];
if(@Yii::app()->session["custom"]["element"]["menuTop"][$key]["icon"])
$params["element"]["menuTop"][$key]["icon"]=Yii::app()->session["custom"]["element"]["menuTop"][$key]["icon"];
}else{
unset($params["element"]["menuTop"][$key]);
if
(
@
$constructParams
[
"element"
]){
if
(
@
$constructParams
[
"element"
][
"initView"
])
$params
[
"element"
][
"initView"
]
=@
$constructParams
[
"element"
][
"initView"
];
if
(
@
$constructParams
[
"element"
][
"menuLeft"
]){
foreach
(
$params
[
"element"
][
"menuLeft"
]
as
$key
=>
$v
){
if
(
@
$constructParams
[
"element"
][
"menuLeft"
][
$key
]){
if
(
@
$constructParams
[
"element"
][
"menuLeft"
][
$key
][
"label"
])
$params
[
"element"
][
"menuLeft"
][
$key
][
"label"
]
=
$constructParams
[
"element"
][
"menuLeft"
][
$key
][
"label"
];
if
(
@
$constructParams
[
"element"
][
"menuLeft"
][
$key
][
"icon"
])
$params
[
"element"
][
"menuLeft"
][
$key
][
"icon"
]
=
$constructParams
[
"element"
][
"menuLeft"
][
$key
][
"icon"
];
}
else
{
unset
(
$params
[
"element"
][
"menuLeft"
][
$key
]);
}
}
}
}*/
/* if(@$constructParams["element"]["menuTop"]){
foreach($params["element"]["menuTop"] as $key => $v){
if(@$constructParams["element"]["menuTop"][$key]){
if(@$constructParams["element"]["menuTop"][$key]["label"])
$params["element"]["menuTop"][$key]["label"]=$constructParams["element"]["menuTop"][$key]["label"];
if(@$constructParams["element"]["menuTop"][$key]["icon"])
$params["element"]["menuTop"][$key]["icon"]=$constructParams["element"]["menuTop"][$key]["icon"];
}else{
unset($params["element"]["menuTop"][$key]);
}
}
}*/
}
if
(
@
$constructParams
[
"appRendering"
])
$params
[
"appRendering"
]
=
$constructParams
[
"appRendering"
];
if
(
@
$constructParams
[
"directory"
])
$params
[
"directory"
]
=
$constructParams
[
"directory"
];
if
(
@
$constructParams
[
"adminPanel"
])
$params
[
"adminPanel"
]
=
$constructParams
[
"adminPanel"
];
if
(
@
$constructParams
[
"redirect"
])
$params
[
"pages"
][
"#app.index"
][
"redirect"
]
=
$constructParams
[
"redirect"
];
if
(
@
$constructParams
[
"footer"
])
$params
[
"footer"
]
=
$constructParams
[
"footer"
];
}
if
(
@
Yii
::
app
()
->
session
[
"custom"
][
"appRendering"
])