cms/app-client/app/controllers/application.js
author Chloe Laisne <chloe.laisne@gmail.com>
Fri, 24 Jun 2016 02:00:50 +0200
changeset 203 2ee21302dc47
parent 202 0446e07981db
child 204 dd969e178944
permissions -rw-r--r--
Set application date property and filter date property observer Add color tags to filter component
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
51
70dff07a76ff add click event on visu-carto and visu-langue and update the url with the selected element as filter parameter
nowmad@nowmads-macbook-pro.local
parents:
diff changeset
     1
import Ember from 'ember';
70dff07a76ff add click event on visu-carto and visu-langue and update the url with the selected element as filter parameter
nowmad@nowmads-macbook-pro.local
parents:
diff changeset
     2
70dff07a76ff add click event on visu-carto and visu-langue and update the url with the selected element as filter parameter
nowmad@nowmads-macbook-pro.local
parents:
diff changeset
     3
export default Ember.Controller.extend({
94
62984937a062 - add params when modal appear so we can come back right on this document modal
nowmad@23.1.168.192.in-addr.arpa
parents: 91
diff changeset
     4
197
7b266ccf6d3d Setup filter service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
     5
    queryParams: ['location', 'date', 'detail', {
7b266ccf6d3d Setup filter service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
     6
        language: 'langue',
7b266ccf6d3d Setup filter service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
     7
        discourse: 'discours',
7b266ccf6d3d Setup filter service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
     8
        theme: 'thematique'
7b266ccf6d3d Setup filter service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
     9
    }],
196
7550cb541901 Filter as a service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 194
diff changeset
    10
7550cb541901 Filter as a service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 194
diff changeset
    11
    date: [],
197
7b266ccf6d3d Setup filter service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    12
    discourse: null,
7b266ccf6d3d Setup filter service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    13
    language: null,
7b266ccf6d3d Setup filter service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    14
    location: null,
7b266ccf6d3d Setup filter service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    15
    theme: null,
7b266ccf6d3d Setup filter service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    16
198
541e26eb356f Display filter IDs
Chloe Laisne <chloe.laisne@gmail.com>
parents: 197
diff changeset
    17
    filter: Ember.inject.service(),
203
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    18
    setFilter: Ember.observer('discourse', 'language', 'location', 'theme', function(sender, key) {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    19
        console.log('propertyDidChange', this.get('queryParams'), this.get('date'), this.get('filter.date'));
197
7b266ccf6d3d Setup filter service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    20
        this.get('filter').set(key, this.get(key));
196
7550cb541901 Filter as a service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 194
diff changeset
    21
    }),
203
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    22
    filterObserver: Ember.observer('filter.discourse', 'filter.language', 'filter.location', 'filter.theme', function(sender, key) {
197
7b266ccf6d3d Setup filter service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    23
        key = key.split('.').pop();
7b266ccf6d3d Setup filter service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 196
diff changeset
    24
        this.set(key, this.get('filter').get(key));
196
7550cb541901 Filter as a service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 194
diff changeset
    25
    }),
7550cb541901 Filter as a service
Chloe Laisne <chloe.laisne@gmail.com>
parents: 194
diff changeset
    26
203
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    27
    setDateFilter: Ember.observer('date', function(sender, key) {
190
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    28
        var intervals = [];
203
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    29
        this.get(key).forEach(function(interval) {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    30
            var interval = interval.split('-');
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    31
            if(interval.length > 1) {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    32
                var array = [];
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    33
                for(var i = interval[0]; i <= interval[1]; i++) {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    34
                    array.push(parseInt(i));
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    35
                }
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    36
                interval = array;
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    37
            } else {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    38
                interval = parseInt(interval);
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    39
            }
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    40
            intervals = intervals.concat(interval);
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    41
        });
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    42
        this.get('filter').set(key, intervals);
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    43
    }),
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    44
    dateFilterObserver: Ember.observer('filter.date', function(sender, key) {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    45
        key = key.split('.').pop();
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    46
        var intervals = [];
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    47
        this.get('filter').get(key).forEach(function(date) {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    48
            var isInterval = false;
190
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    49
            intervals.forEach(function(interval) {
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    50
                if(interval.length && (interval.includes(date + 1) || interval.includes(date - 1))) {
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    51
                    interval.push(date);
203
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    52
                    isInterval = true;
190
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    53
                }
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    54
            });
203
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    55
            if (!isInterval) {
190
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    56
                intervals.push([date]);
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    57
            }
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    58
        });
203
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    59
        intervals.forEach(function(interval, index) {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    60
            if(interval.length > 1) {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    61
               intervals[index] =  interval.shift() + '-' + interval.pop()
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    62
            } else {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    63
               intervals[index] =  interval.toString();
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    64
            }
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    65
        });
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    66
        if(!this.arraysEqual(this.get(key).toArray(), intervals)) {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    67
            this.set(key, intervals);    
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    68
        }
190
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    69
    }),
189
21b30ee23191 /langue endpoint: 1. Date interval 2. Delete date
Chloe Laisne <chloe.laisne@gmail.com>
parents: 126
diff changeset
    70
203
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    71
    arraysEqual: function(a, b) {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    72
        if (a === b) {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    73
            return true;
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    74
        }
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    75
        if (a == null || b == null) {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    76
            return false;
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    77
        }
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    78
        if (a.length != b.length) {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    79
            return false;
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    80
        }
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    81
        for(var i = 0; i < a.length; ++i) {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    82
            if(a[i] !== b[i]) {
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    83
                return false;
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    84
            }
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    85
        }
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    86
        return true;
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    87
    },
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    88
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    89
    detail: null,
2ee21302dc47 Set application date property and filter date property observer
Chloe Laisne <chloe.laisne@gmail.com>
parents: 202
diff changeset
    90
190
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    91
    currentId: null,
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    92
    currentItem: Ember.computed('currentId', function() {
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    93
        Ember.$(".result-item").toggleClass("playing", false);
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    94
        if (this.get('currentId') === null){
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    95
            return null;
189
21b30ee23191 /langue endpoint: 1. Date interval 2. Delete date
Chloe Laisne <chloe.laisne@gmail.com>
parents: 126
diff changeset
    96
        }
192
e1435b37301a Play error quickfix
Chloe Laisne <chloe.laisne@gmail.com>
parents: 190
diff changeset
    97
        Ember.$("div[id='" + this.get('currentId') + "']").toggleClass("playing", true);
194
02c6aa9a99d7 Linting errors / Parenthesis missing / Body classname
Chloe Laisne <chloe.laisne@gmail.com>
parents: 193
diff changeset
    98
        return this.store.findRecord('document', this.get('currentId'));
190
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
    99
    }),
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   100
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   101
    modalItem: Ember.computed('detail', function() {
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   102
        return this.store.findRecord('document', this.get('detail'));
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   103
    }),
189
21b30ee23191 /langue endpoint: 1. Date interval 2. Delete date
Chloe Laisne <chloe.laisne@gmail.com>
parents: 126
diff changeset
   104
190
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   105
    actions: {
58
6c03fafb6b62 Add missing filters to the application controller
nowmad@nowmads-macbook-pro.local
parents: 51
diff changeset
   106
190
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   107
        changeDocument: function(docDirection){
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   108
            var direction = (docDirection === "next") ? 1 : -1;
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   109
            var currentObject = this.get("filteredDocuments").findBy('id', this.get("currentItem").get('id'));
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   110
            if ( currentObject !== 'undefined'){
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   111
                var index = this.get("filteredDocuments").indexOf(currentObject);
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   112
                if ( typeof(this.get("filteredDocuments").objectAt(index+direction)) !== 'undefined'){
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   113
                    return this.set('currentId', this.get("filteredDocuments").objectAt(index+direction).id);
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   114
                }
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   115
            }
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   116
            return this.set('currentId', this.get('filteredDocuments').get('firstObject').id);
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   117
        },
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   118
        play: function(item){
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   119
            this.set("currentId", item.id);
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   120
        },
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   121
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   122
        showMore: function(item){
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   123
            var domItem = Ember.$("#"+item.id.replace( /(:|\.|\[|\]|,)/g, "\\$1" ));
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   124
            if (domItem.hasClass("show-more")){
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   125
                domItem.toggleClass("show-more", false);
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   126
            } else{
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   127
                Ember.$(".result-item").toggleClass("show-more", false);
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   128
                domItem.toggleClass("show-more", true);
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   129
            }
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   130
        },
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   131
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   132
        toggleModal: function(item){
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   133
            if (typeof(item) !== 'undefined'){
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   134
                this.set("detail", item.id);
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   135
            } else {
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   136
                this.set("detail", null);
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   137
            }
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   138
        }
226ae8f2e8e9 JSLinting on /langues endpoint
Chloe Laisne <chloe.laisne@gmail.com>
parents: 189
diff changeset
   139
58
6c03fafb6b62 Add missing filters to the application controller
nowmad@nowmads-macbook-pro.local
parents: 51
diff changeset
   140
    }
51
70dff07a76ff add click event on visu-carto and visu-langue and update the url with the selected element as filter parameter
nowmad@nowmads-macbook-pro.local
parents:
diff changeset
   141
});