Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jean-Baptiste HUBER
co2
Commits
2f22565a
Commit
2f22565a
authored
Jan 30, 2019
by
Clément Damiens
Browse files
Merged branch development into development
parents
6c7c8896
5d0e7f8c
Changes
6
Hide whitespace changes
Inline
Side-by-side
assets/js/co.js
View file @
2f22565a
...
...
@@ -653,8 +653,7 @@ function connectTo(parentType, parentId, childId, childType, connectType, parent
}
}
}
}
);
});
}
}
...
...
assets/js/default/directory.js
View file @
2f22565a
...
...
@@ -679,10 +679,10 @@ function initPageTable(number){
if
(
coopSection
==
"
amendments
"
){
afterLoad
=
function
()
{
uiCoop
.
showAmendement
(
true
);
if
(
$
(
"
#form-amendement
"
).
hasClass
(
"
hidden
"
))
/*
if($("#form-amendement").hasClass("hidden"))
$("#form-amendement").removeClass("hidden");
else
$
(
"
#form-amendement
"
).
addClass
(
"
hidden
"
);
$("#form-amendement").addClass("hidden");
*/
};
}
else
if
(
coopSection
==
"
vote
"
){
mylog
.
log
(
"
.openCoopPanelHtml vote
"
);
...
...
@@ -2583,10 +2583,59 @@ var directory = {
// "><i class='fa fa-chevron-right'></i> <span class='hidden-xs'>"+trad.Open+"</span></button>";
// NAME
if
(
name
!=
""
)
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>
'
;
if
(
name
!=
""
){
str
+=
'
<a href="javascript:;" class="openCoopPanelHtml" style="text-decoration:none;"
'
+
linkParams
+
'
>
'
+
'
<h4 class="panel-title tooltips letter-turq" data-toggle="tooltip" data-placement="top" data-original-title="
'
+
name
+
'
">
'
+
'
<i class="fa
'
+
params
.
ico
+
'
"></i>
'
+
(
(
name
.
length
>
140
)
?
name
.
substring
(
0
,
30
)
+
"
...
"
:
name
)
+
'
</h4></a>
'
;
}
// if( typeof params.producer != "undefined" &&
// params.producer != null &&
// Object.keys(params.producer).length > 0 ) {
// var count = Object.keys(params.producer).length ;
// str += trad.proposedBy + " ";
// $.each(params.producer, function(kProd,valProd){
// var heightImg = ( count > 1 ) ? 35 : 25;
// var imgPath = assetPath+'/images/thumb/default_'+valProd.type+'.png';
// if(typeof valProd.profilThumbImageUrl != "undefined" && valProd.profilThumbImageUrl != null){
// imgPath = "/ph"+valProd.profilThumbImageUrl ;
// }
// str += '<img src="'+imgPath+'" class="img-circle" width="'+heightImg+'" height="'+heightImg+'" />';
// str += " "+valProd.name + " " ;
// });
// }
if
(
typeof
params
.
producer
!=
"
undefined
"
&&
params
.
producer
!=
null
&&
Object
.
keys
(
params
.
producer
).
length
>
0
)
{
count
=
Object
.
keys
(
params
.
producer
).
length
;
htmlAbout
=
""
;
$
.
each
(
params
.
producer
,
function
(
e
,
v
){
heightImg
=
(
count
>
1
)
?
35
:
25
;
imgIcon
=
(
typeof
v
.
profilThumbImageUrl
!=
"
undefined
"
&&
v
.
profilThumbImageUrl
!=
""
)
?
baseUrl
+
"
/
"
+
v
.
profilThumbImageUrl
:
assetPath
+
"
/images/thumb/default_
"
+
v
.
type
+
"
.png
"
;
// htmlAbout+='<a href="#page.type.'+v.type+'.id.'+e+'" class="lbh tooltips" target="_blank" ';
// if(count>1) htmlAbout+= 'data-toggle="tooltip" data-placement="left" title="'+v.name+'"';
// htmlAbout+=">"+
htmlAbout
+=
'
<span
'
;
if
(
count
>
1
)
htmlAbout
+=
'
data-toggle="tooltip" data-placement="left" title="
'
+
v
.
name
+
'
"
'
;
htmlAbout
+=
"
>
"
+
'
<img src="
'
+
imgIcon
+
'
" class="img-circle margin-right-10" width=
'
+
heightImg
+
'
height=
'
+
heightImg
+
'
/>
'
;
if
(
count
==
1
)
htmlAbout
+=
v
.
name
;
//htmlAbout+="</a>";
htmlAbout
+=
"
</span>
"
;
});
htmlHeader
=
((
params
.
type
==
typeObj
.
event
.
col
)
?
trad
[
"
Planned on
"
]
:
tradCategory
.
carriedby
)
;
htmlHeader
+=
"
:
"
+
htmlAbout
;
str
+=
htmlHeader
;
}
// STATE OF THE PROPOSAL
console
.
log
(
"
hasVote ?
"
,
params
.
hasVote
);
...
...
@@ -2634,7 +2683,8 @@ var directory = {
if
(
typeof
userId
!=
"
undefined
"
&&
userId
!=
null
&&
userId
!=
""
){
var
btnSize
=
(
params
.
status
==
"
amendementAndVote
"
)
?
"
6
"
:
"
12
"
;
if
(
(
params
.
status
==
"
tovote
"
||
params
.
status
==
"
amendementAndVote
"
)
&&
params
.
hasVote
===
false
)
str
+=
'
<a href="javascript:"
'
+
linkParams
+
'
class="btn-openVoteDetail bg-green btn col-sm-
'
+
btnSize
+
'
"><i class="fa fa-gavel"></i>
'
+
trad
.
Vote
+
'
</a>
'
;
str
+=
'
<a href="javascript:;"
'
+
linkParams
+
'
data-coop-section="vote" class="bg-green openCoopPanelHtml btn col-sm-
'
+
btnSize
+
'
"><i class="fa fa-gavel"></i>
'
+
trad
.
Vote
+
'
</a>
'
;
//str += '<a href="javascript:" '+ linkParams + ' class="btn-openVoteDetail bg-green btn col-sm-'+btnSize+' "><i class="fa fa-gavel"></i> '+trad.Vote+'</a>';
else
if
(
(
params
.
status
==
"
tovote
"
||
params
.
status
==
"
amendementAndVote
"
)
&&
params
.
hasVote
!==
false
)
str
+=
'
<a href="javascript:;"
'
+
linkParams
+
'
data-coop-section="vote" class="openCoopPanelHtml btn btn-default col-sm-
'
+
btnSize
+
'
"><i class="fa fa-eye"></i>
'
+
trad
[
"
See votes
"
]
+
'
</a>
'
;
}
else
{
...
...
@@ -2643,7 +2693,7 @@ var directory = {
str
+=
'
<a href="javascript:" data-toggle="modal" data-target="#modalLogin" class="btn-menu-connect bg-green btn col-sm-
'
+
btnSize
+
'
"><i class="fa fa-gavel"></i>
'
+
trad
.
Vote
+
'
</a>
'
;
}
if
(
params
.
status
==
"
amendementAndVote
"
||
params
.
status
==
"
amendable
"
){
if
(
(
params
.
status
==
"
amendementAndVote
"
||
params
.
status
==
"
amendable
"
)
){
amendCount
=
(
params
.
amendements
)
?
"
(
"
+
Object
.
keys
(
params
.
amendements
).
length
+
"
)
"
:
""
;
str
+=
'
<a href="javascript:;"
'
+
linkParams
+
'
data-coop-section="amendments" class="openCoopPanelHtml btn btn-default text-purple col-sm-6 "><i class="fa fa-list"></i>
'
+
trad
.
Amendements
+
amendCount
+
'
</a>
'
;
}
...
...
@@ -3064,8 +3114,8 @@ var directory = {
// '<span>'+tradDynForm.createsurvey+'</span>'+
// '</a>';
// }
if
(
userId
!=
""
&&
notNull
(
directory
.
custom
)
if
(
/*
userId != ""
&&
*/
notNull
(
directory
.
custom
)
&&
typeof
directory
.
custom
.
header
!=
"
undefined
"
&&
typeof
directory
.
custom
.
header
.
add
!=
"
undefined
"
&&
typeof
directory
.
custom
.
header
.
add
[
searchObject
.
initType
]
!=
"
undefined
"
){
...
...
assets/js/default/globalsearch.js
View file @
2f22565a
...
...
@@ -78,7 +78,7 @@ 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
"
){
if
(
typeof
custom
!=
"
undefined
"
&&
notNull
(
custom
)
&&
typeof
custom
.
filters
!=
"
undefined
"
&&
typeof
custom
.
filters
.
searchTypeGS
!=
"
undefined
"
){
data
.
countType
=
custom
.
filters
.
searchTypeGS
;
data
.
searchType
=
custom
.
filters
.
searchTypeGS
;
}
...
...
@@ -386,7 +386,7 @@ function autoCompleteSearchGS(search, indexMin, indexMax, input){
"</div>"; */
extendMsg
=
trad
.
extendedsearch
;
extendUrl
=
"
#search
"
;
if
(
notNull
(
custom
)
&&
typeof
custom
.
searchOpenMenu
!=
"
undefined
"
){
if
(
typeof
custom
!=
"
undefined
"
&&
notNull
(
custom
)
&&
typeof
custom
.
searchOpenMenu
!=
"
undefined
"
){
extendMsg
=
custom
.
searchOpenMenu
.
msg
;
extendUrl
=
custom
.
searchOpenMenu
.
url
;
}
...
...
config/CO2/params.json
View file @
2f22565a
...
...
@@ -194,7 +194,7 @@
"#dda"
:
{
"inMenu"
:
true
,
"useHeader"
:
true
,
"useFilter"
:
true
,
"useFilter"
:
{
"scope"
:
true
,
"filters"
:
false
}
,
"open"
:
true
,
"subdomain"
:
"dda"
,
"subdomainName"
:
"Agora Citoyenne"
,
...
...
views/admin/referenceTable.php
View file @
2f22565a
...
...
@@ -156,17 +156,20 @@ function initMenuReference(){
$
(
"
.sourceFilter
"
).
off
().
on
(
"
click
"
,
function
(){
searchAdmin
.
mode
=
"
source
"
;
searchAdmin
.
page
=
0
;
searchAdmin
.
text
=
null
;
startAdminSearch
(
true
);
});
$
(
"
.referenceFilter
"
).
off
().
on
(
"
click
"
,
function
(){
searchAdmin
.
mode
=
"
reference
"
;
searchAdmin
.
page
=
0
;
searchAdmin
.
text
=
null
;
startAdminSearch
(
true
);
});
$
(
"
.searchOpenFilter
"
).
off
().
on
(
"
click
"
,
function
(){
searchAdmin
.
mode
=
"
open
"
;
searchAdmin
.
page
=
0
;
searchAdmin
.
text
=
null
;
startAdminSearch
(
true
);
});
}
...
...
@@ -178,14 +181,11 @@ function initPageTable(number){
currentPage
:
1
,
hrefTextPrefix
:
"
?page=
"
,
cssStyle
:
'
light-theme
'
,
//prevText: '
<
span
aria
-
hidden
=
"
true
"
>&
laquo
;
<
/span>'
,
//nextText: '
<
span
aria
-
hidden
=
"
true
"
>&
raquo
;
<
/span>'
,
onInit
:
function
()
{
// fire first page loading
},
onPageClick
:
function
(
page
,
evt
)
{
// some code
//alert(page);
searchAdmin
.
page
=
(
page
-
1
);
startAdminSearch
();
}
...
...
views/translation/trad.php
View file @
2f22565a
...
...
@@ -584,6 +584,7 @@ var trad = {
"generaltermsofuse": "
<?php
echo
Yii
::
t
(
"common"
,
"general terms of use"
)
?>
",
"yourcommentisempty": "
<?php
echo
Yii
::
t
(
"comment"
,
"Your comment is empty"
)
?>
",
"manageby": "
<?php
echo
Yii
::
t
(
"common"
,
"Manage by"
)
?>
",
"proposedBy" : "
<?php
echo
Yii
::
t
(
"common"
,
"Proposed by"
)
?>
",
};
var tradDynForm = {
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment