diff --git a/src/views/apps.html b/src/views/apps.html index b70981875..a99057bd8 100644 --- a/src/views/apps.html +++ b/src/views/apps.html @@ -50,6 +50,11 @@ +
+ + +
+ @@ -80,6 +85,11 @@ +
+ + +
+ diff --git a/src/views/apps.js b/src/views/apps.js index 0b3211f63..57822a170 100644 --- a/src/views/apps.js +++ b/src/views/apps.js @@ -94,12 +94,14 @@ angular.module('Application').controller('AppsController', ['$scope', '$translat busy: false, upstreamUri: '', label: '', + tags: '', show: function () { $scope.applinksAdd.error = {}; $scope.applinksAdd.busy = false; $scope.applinksAdd.upstreamUri = ''; $scope.applinksAdd.label = ''; + $scope.applinksAdd.tags = ''; $scope.applinksAddForm.$setUntouched(); $scope.applinksAddForm.$setPristine(); @@ -116,7 +118,8 @@ angular.module('Application').controller('AppsController', ['$scope', '$translat var data = { upstreamUri: $scope.applinksAdd.upstreamUri, - label: $scope.applinksAdd.label + label: $scope.applinksAdd.label, + tags: $scope.applinksAdd.tags.split(' ').map(function (t) { return t.trim(); }).filter(function (t) { return !!t; }) }; Client.addApplink(data, function (error) { @@ -138,6 +141,7 @@ angular.module('Application').controller('AppsController', ['$scope', '$translat id: '', upstreamUri: '', label: '', + tags: '', show: function (applink) { $scope.applinksEdit.error = {}; @@ -147,6 +151,9 @@ angular.module('Application').controller('AppsController', ['$scope', '$translat $scope.applinksEdit.upstreamUri = applink.upstreamUri; $scope.applinksEdit.label = applink.label; + // translate for tag-input + $scope.applinksEdit.tags = applink.tags ? applink.tags.join(' ') : ''; + $scope.applinksEditForm.$setUntouched(); $scope.applinksEditForm.$setPristine(); @@ -160,7 +167,8 @@ angular.module('Application').controller('AppsController', ['$scope', '$translat var data = { upstreamUri: $scope.applinksEdit.upstreamUri, - label: $scope.applinksEdit.label + label: $scope.applinksEdit.label, + tags: $scope.applinksEdit.tags.split(' ').map(function (t) { return t.trim(); }).filter(function (t) { return !!t; }) }; Client.updateApplink($scope.applinksEdit.id, data, function (error) {