# HG changeset patch # User ymh # Date 1478616481 -3600 # Node ID 0a5eef6ad2fedaf99d82f512e9a2ea4a4a0efdb9 # Parent cbd92ebb8c6743a534f184567805b970bfb9f9c0 correction, change colors for discourse categories, add loding spinner diff -r cbd92ebb8c67 -r 0a5eef6ad2fe cms/app-client/app/components/discourses-component.js --- a/cms/app-client/app/components/discourses-component.js Tue Nov 08 14:20:57 2016 +0100 +++ b/cms/app-client/app/components/discourses-component.js Tue Nov 08 15:48:01 2016 +0100 @@ -24,7 +24,7 @@ didRender: function() { var self = this; var baseURL = (ENV.APP.backRootURL || ENV.rootURL).replace(/\/$/,"")+'/api/v1/stats'; - var url = URI(baseURL+"/stats/discourses").search(this.get('filter').get('queryParamsValuesURI')); + var url = URI(baseURL+"/discourses").search(this.get('filter').get('queryParamsValuesURI')); d3.json(url.href(), function(data) { var discourses = data['discourses']; diff -r cbd92ebb8c67 -r 0a5eef6ad2fe cms/app-client/app/components/playlist-component.js --- a/cms/app-client/app/components/playlist-component.js Tue Nov 08 14:20:57 2016 +0100 +++ b/cms/app-client/app/components/playlist-component.js Tue Nov 08 15:48:01 2016 +0100 @@ -7,6 +7,8 @@ filter: Ember.inject.service(), player: Ember.inject.service(), + isLoading: false, + model: [], documents: Ember.computed('model', 'filter.location', 'filter.language', 'filter.discourse', 'filter.date', 'filter.theme', function() { return this.get('model'); diff -r cbd92ebb8c67 -r 0a5eef6ad2fe cms/app-client/app/controllers/application.js --- a/cms/app-client/app/controllers/application.js Tue Nov 08 14:20:57 2016 +0100 +++ b/cms/app-client/app/controllers/application.js Tue Nov 08 15:48:01 2016 +0100 @@ -7,6 +7,8 @@ filter: Ember.inject.service(), constants: Ember.inject.service(), + isLoading: false, + page: 1, limit: Ember.computed(function() { return this.get('constants').DOCUMENTS_PAGINATION_PERPAGE; diff -r cbd92ebb8c67 -r 0a5eef6ad2fe cms/app-client/app/routes/application.js --- a/cms/app-client/app/routes/application.js Tue Nov 08 14:20:57 2016 +0100 +++ b/cms/app-client/app/routes/application.js Tue Nov 08 15:48:01 2016 +0100 @@ -64,6 +64,13 @@ }), actions: { + loading(transition) { + let controller = this.controllerFor('application'); + controller.set('isLoading', true); + transition.promise.finally(function() { + controller.set('isLoading', false); + }); + }, didTransition: function() { // Append body classname depending on the route diff -r cbd92ebb8c67 -r 0a5eef6ad2fe cms/app-client/app/services/constants.js --- a/cms/app-client/app/services/constants.js Tue Nov 08 14:20:57 2016 +0100 +++ b/cms/app-client/app/services/constants.js Tue Nov 08 15:48:01 2016 +0100 @@ -61,20 +61,20 @@ const DISCOURSE_CATEGORY_VALUES = { "cat1": { - "fill": "#777777", - "stroke": "#777777" + "fill": "#4FC1FE", + "stroke": "#4FC1FE" }, "cat2": { - "fill": "#606060", - "stroke": "#606060" + "fill": "#0AA9FF", + "stroke": "#0AA9FF" }, "cat3": { - "fill": "#4A4A4A", - "stroke": "#4A4A4A" + "fill": "#005684", + "stroke": "#005684" }, "cat4":{ - "fill": "#333333", - "stroke": "#333333" + "fill": "#01283E", + "stroke": "#01283E" } }; diff -r cbd92ebb8c67 -r 0a5eef6ad2fe cms/app-client/app/styles/components/player-component.scss --- a/cms/app-client/app/styles/components/player-component.scss Tue Nov 08 14:20:57 2016 +0100 +++ b/cms/app-client/app/styles/components/player-component.scss Tue Nov 08 15:48:01 2016 +0100 @@ -224,3 +224,7 @@ .player-component #audio .controls.extra i.fa-compress::before { font-size: 19px; } + +.player-component .player-language-list span { + display: inline; +} diff -r cbd92ebb8c67 -r 0a5eef6ad2fe cms/app-client/app/styles/components/playlist-component.scss --- a/cms/app-client/app/styles/components/playlist-component.scss Tue Nov 08 14:20:57 2016 +0100 +++ b/cms/app-client/app/styles/components/playlist-component.scss Tue Nov 08 15:48:01 2016 +0100 @@ -116,7 +116,7 @@ border-radius: 100%; width: 22px; margin-left: 10px; - + } .playlist-component ul li button, @@ -218,7 +218,7 @@ } .playlist-component ul li .fa-text-height { - + } .playlist-component ul li .fa-text-height::before { @@ -234,4 +234,8 @@ pointer-events: none; cursor: default; color: inherit; -} \ No newline at end of file +} + +.playlist-component .document-spinner { + margin-left: 1em; +} diff -r cbd92ebb8c67 -r 0a5eef6ad2fe cms/app-client/app/templates/application.hbs --- a/cms/app-client/app/templates/application.hbs Tue Nov 08 14:20:57 2016 +0100 +++ b/cms/app-client/app/templates/application.hbs Tue Nov 08 15:48:01 2016 +0100 @@ -19,7 +19,7 @@
{{ filter-component }} - {{ playlist-component model=model page=page limit=limit pageAction='setPageQueryparams' }} + {{ playlist-component model=model page=page limit=limit pageAction='setPageQueryparams' isLoading=isLoading }}
\ No newline at end of file diff -r cbd92ebb8c67 -r 0a5eef6ad2fe cms/app-client/app/templates/components/player-component.hbs --- a/cms/app-client/app/templates/components/player-component.hbs Tue Nov 08 14:20:57 2016 +0100 +++ b/cms/app-client/app/templates/components/player-component.hbs Tue Nov 08 15:48:01 2016 +0100 @@ -1,47 +1,49 @@
-
- Précédent - {{#if player.playing}} - Pause - {{else}} - Lecture - {{/if}} - Suivant -
-
- {{to-minutes head}} - - - {{to-minutes remaining}} -
-
- {{#if player.model.video}} - {{#if player.videoscreen}} - Hide video - {{else}} - Show video - {{/if}} - {{/if}} - {{#if player.transcript}} - Transcript - {{/if}} -
-
-

- {{ item.title }} - {{#each item.languages as |lang index|}}{{if index ", "}}{{doc-language url=lang class="language"}}{{/each}} -

-

- {{item.publishers_disp}} - {{short-date item.issued}} -

-
+
+ Précédent + {{#if player.playing}} + Pause + {{else}} + Lecture + {{/if}} + Suivant +
+
+ {{to-minutes head}} + + - {{to-minutes remaining}} +
+
+ {{#if player.model.video}} + {{#if player.videoscreen}} + Hide video + {{else}} + Show video + {{/if}} + {{/if}} + {{#if player.transcript}} + Transcript + {{/if}} +
+
+

+ {{ item.title }} +

+ {{#each item.languages as |lang index|}}{{if index ", "}}{{doc-language url=lang class="language"}}{{/each}} +
+

+

+ {{item.publishers_disp}} + {{short-date item.issued}} +

+
- +
\ No newline at end of file diff -r cbd92ebb8c67 -r 0a5eef6ad2fe cms/app-client/app/templates/components/playlist-component.hbs --- a/cms/app-client/app/templates/components/playlist-component.hbs Tue Nov 08 14:20:57 2016 +0100 +++ b/cms/app-client/app/templates/components/playlist-component.hbs Tue Nov 08 15:48:01 2016 +0100 @@ -1,5 +1,5 @@
-

Résultat ({{ model.meta.total }})

+

Résultat ({{ model.meta.total }}){{#if isLoading}}{{/if}}