From ed81fc576a94ae43d7ecce3062696f5fd16dfe99 Mon Sep 17 00:00:00 2001 From: Athou Date: Tue, 25 Nov 2014 10:30:14 +0100 Subject: [PATCH] fix tagging issues --- src/main/app/js/directives.js | 2 +- src/main/app/js/services.js | 1 + src/main/app/templates/_tags.html | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/app/js/directives.js b/src/main/app/js/directives.js index 463877c5..eef070be 100644 --- a/src/main/app/js/directives.js +++ b/src/main/app/js/directives.js @@ -72,7 +72,7 @@ module.directive('tags', function() { tags : [] }; if (newValue) { - data.tags = newValue.split(','); + data.tags = newValue; } EntryService.tag(data); } diff --git a/src/main/app/js/services.js b/src/main/app/js/services.js index c4807b4d..57fc7e34 100644 --- a/src/main/app/js/services.js +++ b/src/main/app/js/services.js @@ -298,6 +298,7 @@ module.factory('EntryService', ['$resource', '$http', function($resource, $http) $http.get('rest/entry/tags').success(function(data) { res.tags = []; res.tags.push.apply(res.tags, data); + res.tags.sort(); }); }; var oldTag = res.tag; diff --git a/src/main/app/templates/_tags.html b/src/main/app/templates/_tags.html index dd1d20e4..31923388 100644 --- a/src/main/app/templates/_tags.html +++ b/src/main/app/templates/_tags.html @@ -7,6 +7,6 @@ {{tag}} - + \ No newline at end of file