--- a/cms/app-client/app/controllers/application.js Wed Jan 20 10:38:09 2016 +0100
+++ b/cms/app-client/app/controllers/application.js Wed Jan 20 13:04:27 2016 +0100
@@ -48,16 +48,18 @@
}),
actions: {
deleteTag: function(query, item){
- var queryParams = {},
- newParams = null;
+ var newParams = null;
+
if (query === 'date'){
- newParams = this.get('date');
- if(newParams.indexOf(item) !== -1) {
- newParams = newParams.splice(newParams.indexOf(item), 1);
- }
+ newParams = [];
+ Ember.$.each(this.get('date'), function(index, elt){
+ if (elt !== item){
+ newParams.push(elt);
+ }
+ });
}
- queryParams[query] = newParams;
- this.transitionToRoute({queryParams: queryParams});
+
+ this.set(query, newParams);
},
changeSong: function(songDirection){
var direction = (songDirection === "next") ? 1 : -1;