Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
Sous Surveillance
Commits
ac1329a8
Commit
ac1329a8
authored
Apr 02, 2015
by
luxcem
Browse files
deputes_infos dans un fichier à part
parent
c99d6b96
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
ac1329a8
...
...
@@ -4,3 +4,4 @@ bower_components/
.tmp/
dist/
src/assets/deputes
src/assets/data
src/app/data.js
View file @
ac1329a8
This diff is collapsed.
Click to expand it.
src/app/main/components/deputes/deputes.controller.js
View file @
ac1329a8
'
use strict
'
;
angular
.
module
(
'
soussurveillance
'
)
.
controller
(
'
DeputesCtrl
'
,
function
(
$scope
,
$http
,
_
,
Circonscriptions
,
Groupes
,
DeputesInfos
)
{
.
controller
(
'
DeputesCtrl
'
,
function
(
$scope
,
$http
,
_
,
Circonscriptions
,
Groupes
)
{
var
deputes
=
[];
$scope
.
search
=
{
'
name
'
:
''
,
...
...
@@ -25,18 +25,20 @@ angular.module('soussurveillance')
$scope
.
Circonscriptions
=
Circonscriptions
;
$scope
.
Groupes
=
Groupes
;
$scope
.
DeputesInfos
=
DeputesInfos
;
$http
.
get
(
'
assets/data/deputes_infos.json
'
).
success
(
function
(
deputesInfos
){
$http
.
get
(
'
assets/data/deputes_en_mandat.json
'
).
success
(
function
(
data
){
deputes
=
data
.
deputes
;
$scope
.
deputes
=
_
.
shuffle
(
data
.
deputes
);
for
(
var
i
=
0
;
i
<
$scope
.
deputes
.
length
;
i
++
)
{
var
slug
=
$scope
.
deputes
[
i
].
depute
.
slug
;
$scope
.
deputes
[
i
].
infos
=
deputesInfos
[
slug
];
$scope
.
deputes
[
i
].
show
=
false
;
}
$scope
.
totalItems
=
data
.
deputes
.
length
;
$scope
.
applyPaginate
();
});
$http
.
get
(
'
assets/data/deputes_en_mandat.json
'
).
success
(
function
(
data
){
deputes
=
data
.
deputes
;
$scope
.
deputes
=
_
.
shuffle
(
data
.
deputes
);
for
(
var
i
=
0
;
i
<
$scope
.
deputes
.
length
;
i
++
)
{
var
slug
=
$scope
.
deputes
[
i
].
depute
.
slug
;
$scope
.
deputes
[
i
].
infos
=
DeputesInfos
[
slug
];
$scope
.
deputes
[
i
].
show
=
false
;
}
$scope
.
totalItems
=
data
.
deputes
.
length
;
$scope
.
applyPaginate
();
});
$scope
.
selectDepute
=
function
selectDepute
(
depute
)
{
...
...
@@ -92,7 +94,7 @@ angular.module('soussurveillance')
};
$scope
.
colorMask
=
function
colorMask
(
depute
)
{
var
status
=
D
epute
sI
nfos
[
depute
.
depute
.
slug
]
.
position
;
var
status
=
d
epute
.
i
nfos
.
position
;
if
(
status
===
0
)
{
return
'
unknown-mask
'
;
}
else
if
(
status
===
1
)
{
...
...
src/assets/data/deputes.json
deleted
100644 → 0
View file @
c99d6b96
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/assets/data/deputes_en_mandat.json
deleted
100644 → 0
View file @
c99d6b96
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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