Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home upload #149

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
2007d92
update gitignore
Landeers Mar 23, 2016
7346339
update npm/bower dependencies
Landeers Mar 23, 2016
3328f95
update profil users html page
Landeers Mar 23, 2016
65f5860
update html utilisateurs
Landeers Mar 23, 2016
d936b33
update user controller
Landeers Mar 23, 2016
c508325
set node version 0.10.25
Landeers Mar 23, 2016
87819ab
update angular version
Landeers Mar 23, 2016
030ee7e
remove session tests
Landeers Mar 24, 2016
eb8b8f6
new page for upload files
Landeers Mar 24, 2016
8cdaea6
add files
Landeers Mar 24, 2016
47fdfb9
update new upload page
Landeers Apr 4, 2016
5780320
Change Scille logo
touilleMan Apr 4, 2016
d4dd0b4
update uploader (not finish)
Landeers Apr 7, 2016
c6224b7
update uploader (not working yet)
Landeers Apr 7, 2016
87a97f3
test new post method...
Landeers Apr 7, 2016
b1dfd7b
update angular-ui-select version
Landeers Apr 8, 2016
48b013c
comment test
Landeers Apr 8, 2016
1345f99
update uploader (not working yet)
Landeers Apr 8, 2016
7675a8e
add parallele upload to uploaders
Landeers Apr 8, 2016
ca66e11
relaunch new upload after error
Landeers Apr 8, 2016
578cb96
end of uploader for now
Landeers Apr 8, 2016
95e3cc3
use good method to cancel interval
Landeers Apr 8, 2016
c89e510
Merge branch 'master' of github.com:Scille/vigiechiro-front
Landeers Apr 8, 2016
a6e9bee
Merge branch 'upload'
Landeers Apr 8, 2016
149bb36
remove some e2e test
Landeers Apr 8, 2016
606c842
continue remove e2e test
Landeers Apr 8, 2016
a13b4ad
add version and rename button to upload files
Landeers Apr 20, 2016
8743e31
put autostart on
Landeers Apr 20, 2016
03d0aa7
remove some e2e tests
Landeers Apr 20, 2016
fff86a5
remove even more e2e test
Landeers Apr 20, 2016
6d41f74
remove test for valisateur e2e test
Landeers Apr 20, 2016
5abca9d
Fix redirection on site creation
touilleMan May 12, 2016
15d2eed
Correct upload for folders
touilleMan May 14, 2016
6eff4d3
Add {version} in footer (should be updated dynamically on release)
touilleMan May 14, 2016
1666582
Fix fileuploader participation resolution
touilleMan May 14, 2016
f8196f1
fix test fileUploader and folderUploader
Landeers May 18, 2016
ea01375
fix site creation bug
Landeers May 18, 2016
6bf1ad8
all points of route rest dragabble
Landeers May 18, 2016
1c90717
add button to first launch participation
Landeers May 19, 2016
48045d9
make new home upload
Landeers May 26, 2016
dba3cee
try to send s3
Landeers May 26, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ venv/

**/__pycache__
*.py[cod]

npm-debug.log
test/e2e/webdriver.log
42 changes: 21 additions & 21 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@
# use this if you want to recursively match all subfolders:
# 'test/spec/**/*.js'
module.exports = (grunt) ->

# Load grunt tasks automatically
require("load-grunt-tasks") grunt

# Time how long tasks take. Can help when optimizing build times
require("time-grunt") grunt

# Configurable paths for the application
appConfig =
app: require("./bower.json").appPath or "app"
dist: "dist"

grunt.loadNpmTasks "grunt-protractor-runner"

# Define the configuration for all the tasks
grunt.initConfig

# Project settings
yeoman: appConfig

# Watches files for changes and runs tasks based on the changed files
watch:
bower:
Expand Down Expand Up @@ -64,7 +64,7 @@ module.exports = (grunt) ->
"<%= yeoman.app %>/images/**/*.{png,jpg,jpeg,gif,webp,svg}"
]


# The actual grunt server settings
connect:
options:
Expand Down Expand Up @@ -99,7 +99,7 @@ module.exports = (grunt) ->
open: true
base: "<%= yeoman.dist %>"


# Make sure code styles are up to par and there are no obvious mistakes
jshint:
options:
Expand All @@ -109,7 +109,7 @@ module.exports = (grunt) ->
all:
src: ["Gruntfile.js"]


# Empties folders to start fresh
clean:
dist:
Expand Down Expand Up @@ -138,14 +138,14 @@ module.exports = (grunt) ->
dest: ".tmp/styles/"
]


# Automatically inject Bower components into the app
wiredep:
app:
src: ["<%= yeoman.app %>/index.html"]
ignorePath: /\.\.\//


# Compiles CoffeeScript to JavaScript
coffee:
options:
Expand All @@ -170,7 +170,7 @@ module.exports = (grunt) ->
ext: ".js"
]


# Renames files for browser caching purposes
filerev:
dist:
Expand All @@ -181,7 +181,7 @@ module.exports = (grunt) ->
"<%= yeoman.dist %>/styles/fonts/*"
]


# Reads HTML for usemin blocks to enable smart builds that automatically
# concat, minify and revision files. Creates configurations in memory so
# additional tasks can operate on them
Expand All @@ -200,7 +200,7 @@ module.exports = (grunt) ->

post: {}


# Performs rewrites based on filerev and the useminPrepare configuration
usemin:
html: ["<%= yeoman.dist %>/**/*.html"]
Expand All @@ -211,7 +211,7 @@ module.exports = (grunt) ->
"<%= yeoman.dist %>/images"
]


# The following *-min tasks will produce minified files in the dist folder
# By default, your `index.html`'s <!-- Usemin block --> will take care of
# minification. These next options are pre-configured if you do not wish
Expand Down Expand Up @@ -277,7 +277,7 @@ module.exports = (grunt) ->
dest: "<%= yeoman.dist %>"
]


# ng-annotate tries to make the code safe for minification automatically
# by using the Angular long form for dependency injection.
ngAnnotate:
Expand All @@ -292,13 +292,13 @@ module.exports = (grunt) ->
dest: ".tmp/concat/scripts"
]


# Replace Google CDN references
cdnify:
dist:
html: ["<%= yeoman.dist %>/*.html"]


# Copies remaining files to places other tasks can use
copy:
dist:
Expand Down Expand Up @@ -343,7 +343,7 @@ module.exports = (grunt) ->
dest: ".tmp/styles/"
src: "**/*.css"


# Run some tasks in parallel to speed up the build process
concurrent:
server: [
Expand All @@ -361,7 +361,7 @@ module.exports = (grunt) ->
"svgmin"
]


# Test settings
karma:
options:
Expand All @@ -373,7 +373,7 @@ module.exports = (grunt) ->
server:
singleRun: false


# E2e test settings
protractor:
options:
Expand Down
Binary file modified app/images/logo-scille.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<link rel="stylesheet" href="bower_components/datatables/media/css/jquery.dataTables.css" />
<link rel="stylesheet" href="bower_components/angular-datatables/dist/plugins/bootstrap/datatables.bootstrap.css" />
<link rel="stylesheet" href="bower_components/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.css" />
<link rel="stylesheet" href="bower_components/sc-toggle-switch/release/css/toggle_switch.css" />
<!-- endbower -->
<!-- endbuild -->
<!-- build:css(.tmp) styles/main.css -->
Expand Down Expand Up @@ -46,7 +47,9 @@
<footer class="footer">
<div class="container">
<a href="http://scille.eu" target="_blank">
<img src="images/logo-scille.png" width="20">&nbsp;Scille</a> vigiechiro
<img src="images/logo-scille.png" width="20">&nbsp;Scille
</a>
vigiechiro {version}
</div>
</footer>
</content-directive>
Expand Down Expand Up @@ -82,7 +85,7 @@
<script src="bower_components/angular-animate/angular-animate.js"></script>
<script src="bower_components/angular-touch/angular-touch.js"></script>
<script src="bower_components/angular-route/angular-route.js"></script>
<script src="bower_components/lodash/dist/lodash.compat.js"></script>
<script src="bower_components/lodash/lodash.js"></script>
<script src="bower_components/restangular/dist/restangular.js"></script>
<script src="bower_components/flow.js/dist/flow.js"></script>
<script src="bower_components/ng-flow/dist/ng-flow.js"></script>
Expand Down Expand Up @@ -117,6 +120,8 @@
<script src="bower_components/angular-bootstrap-switch/dist/angular-bootstrap-switch.js"></script>
<script src="bower_components/moment/moment.js"></script>
<script src="bower_components/angular-moment/angular-moment.js"></script>
<script src="bower_components/sc-toggle-switch/release/scripts/toggle_switch.js"></script>
<script src="bower_components/sc-toggle-switch/release/scripts/populate_template_cache.js"></script>
<!-- endbower -->
<script src="bower_components/moment/locale/fr.js"></script>
<!-- endbuild -->
Expand Down Expand Up @@ -145,6 +150,7 @@
<script src="scripts/views/participation/modal/modal_participation.js"></script>
<script src="scripts/views/actualite/actualite_ctrl.js"></script>
<script src="scripts/views/donnee/donnee_ctrl.js"></script>
<script src="scripts/views/participation_upload/upload_ctrl.js"></script>

<script src="scripts/xin/tools.js"></script>
<script src="scripts/xin/services/geolocation_srv.js"></script>
Expand Down
5 changes: 4 additions & 1 deletion app/scripts/app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ angular
'siteViews'
'participationViews',
'actualiteViews',
'donneeViews'
'donneeViews',
'uploadParticipationViews'
])

.run (Backend, SETTINGS) ->
Expand All @@ -56,6 +57,8 @@ angular
.otherwise
redirectTo: '/404'



.directive 'navbarDirective', (evalCallDefered, $window, $rootScope, $route, SETTINGS, session)->
restrict: 'E'
templateUrl: 'navbar.html'
Expand Down
15 changes: 15 additions & 0 deletions app/scripts/settings.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,19 @@ angular.module('appSettings', [])
.constant 'SETTINGS',
API_DOMAIN: 'http://localhost:8080'
FRONT_DOMAIN: 'http://localhost:9000'
S3_BUCKET_URL: 'https://vigiechiro.s3.amazonaws.com/'
BASE_TITLE: 'Vigiechiro'
USER_FIELDS: [
"pseudo",
"email",
"nom",
"prenom",
"telephone",
"adresse",
"commentaire",
"organisation",
"professionnel",
"donnees_publiques",
"role",
"vitesse_connexion"
]
90 changes: 54 additions & 36 deletions app/scripts/views/participation/display_participation.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,58 @@
<a class="btn btn-default" href="#/protocoles/{{participation.protocole._id}}">
Voir le protocole {{ participation.protocole.titre }}
</a>
<a class="btn btn-default" href="#/sites/{{participation.site._id}}">
Voir le site {{ participation.site.titre }}
</a>
<div class="actionbar">
<a class="btn btn-default" href="#/protocoles/{{participation.protocole._id}}">
Voir le protocole {{ participation.protocole.titre }}
</a>
<a class="btn btn-default" href="#/sites/{{participation.site._id}}">
Voir le site {{ participation.site.titre }}
</a>
<a class="btn btn-primary" href="#/participations/{{participation._id}}/donnees">
Voir les données
</a>
<a class="btn btn-primary" href="#/participations/{{participation._id}}/edition">
Editer la participation
</a>
<a class="btn btn-primary" href="#/participations/{{participation._id}}/telechargement">
Uploader les fichiers
</a>
<sc-button class="btn btn-danger"
ng-click="delete()"
label="'Supprimer la participation'"
wait-for-class=""
cancel-wait-for="">
</sc-button>
<sc-button class="btn btn-primary"
ng-click="getDonnees()"
label="'Recevoir les données par email'"
wait-for-class=""
cancel-wait-for="">
</sc-button>
<sc-button class="btn btn-warning"
ng-click="compute()"
label="'Lancer la participation'"
wait-for-class=""
cancel-wait-for=""
ng-if="isAdmin && !participation.traitement">
</sc-button>
<sc-button class="btn btn-warning"
ng-click="compute()"
label="'Relancer la participation'"
wait-for-class=""
cancel-wait-for=""
ng-if="isAdmin && (participation.traitement.etat == 'FINI' || participation.traitement.etat == 'ERREUR' || participation.traitement.timeout)">
</sc-button>
</div>

<a class="btn btn-danger" href="" ng-click="delete()">
Supprimer la participation
</a>
<div class="alert alert-success" ng-show="isCsvPost">
Demande de réception des données par email : reçue
</div>
<div class="alert alert-danger" ng-show="isCsvPost == false">
Echec de la demande de réception des données par email
</div>
<div ng-show="computeInfo">
<span class="label label-danger" ng-if="computeInfo.error">
La demande de relance de la participation a échoué.
</span>
</div>

<display-participation-directive participation="participation">
</display-participation-directive>
Expand All @@ -17,10 +62,6 @@
<a class="input-group-addon" ng-click="addPost()">Ajouter un message</a>
</div>

<a class="btn btn-primary" href="#/participations/{{participation._id}}/edition">
Editer la participation
</a>

<hr>

<div class="table-responsive">
Expand Down Expand Up @@ -90,32 +131,9 @@ <h4>Bilan de la participation</h4>
Début du traitement : {{ participation.traitement.date_debut | xinDate: 'medium' }}-->
</span>
</div>
<div ng-show="computeInfo">
<span class="label label-danger" ng-if="computeInfo.error">
La demande de relance de la participation a échoué.
</span>
</div>

<!-- Buttons -->
<div>
<a class="btn btn-primary" href="#/participations/{{participation._id}}/donnees">
Voir les données
</a>
<a class="btn btn-primary" href="" ng-click="getDonnees()">
Recevoir les données par email
</a>
<a class="btn btn-warning" href="" ng-click="compute()"
ng-if="isAdmin && (participation.traitement.etat == 'FINI' || participation.traitement.etat == 'ERREUR' || participation.traitement.timeout)">
Relancer la participation
</a>
<span ng-if="participation.logs">
<access-file-directive file="participation.logs"></access-file-directive>
</span>
</div>

<div class="alert alert-success" ng-show="isCsvPost">
Demande de réception des données par email : reçue
</div>
<div class="alert alert-danger" ng-show="isCsvPost == false">
Echec de la demande de réception des données par email
</div>
Loading