diff --git a/frontend/app/index.html b/frontend/app/index.html index 4768bf07e1..d244e6bc19 100644 --- a/frontend/app/index.html +++ b/frontend/app/index.html @@ -254,6 +254,7 @@ + @@ -276,6 +277,7 @@ + @@ -297,6 +299,7 @@ + diff --git a/frontend/app/scripts/directives/updatableTagList.js b/frontend/app/scripts/directives/updatableTagList.js new file mode 100644 index 0000000000..516de74754 --- /dev/null +++ b/frontend/app/scripts/directives/updatableTagList.js @@ -0,0 +1,91 @@ +(function() { + 'use strict'; + angular.module('theHiveDirectives') + .controller('UpdatableTagListModalCtrl', function($uibModalInstance, taxonomies) { + var self = this; + + this.taxonomies = angular.copy(taxonomies); + + this.formData = { + selectedTaxonomy: null, + selectedTags: null + }; + + this.addSelectedTags = function() { + if (!self.formData.selectedTaxonomy) { + return; + } + + var selection = _.filter(self.formData.selectedTaxonomy.tags, function(tag) { + return tag.selected; + }); + + if (selection.length === 0) { + return; + } + + $uibModalInstance.close(selection); + }; + + this.cancel = function() { + $uibModalInstance.dismiss(); + }; + }) + .directive('updatableTagList', function(UtilsSrv, $uibModal, $filter, NotificationSrv, TaxonomyCacheSrv) { + return { + restrict: 'E', + link: UtilsSrv.updatableLink, + templateUrl: 'views/directives/updatable-tag-list.html', + scope: { + value: '=?', + onUpdate: '&', + active: '=?', + source: '=', + clearable: ' + + + + diff --git a/frontend/app/views/directives/updatable-tag-list.html b/frontend/app/views/directives/updatable-tag-list.html new file mode 100644 index 0000000000..83a59e3e15 --- /dev/null +++ b/frontend/app/views/directives/updatable-tag-list.html @@ -0,0 +1,37 @@ +
+ + Not Specified + + {{tag.text}} + + + + + + + +
+ + + +
+
+ + + +
+ +
+ +
+
+
diff --git a/frontend/app/views/partials/case/case.details.html b/frontend/app/views/partials/case/case.details.html index bb252c4fd4..c1f873355e 100644 --- a/frontend/app/views/partials/case/case.details.html +++ b/frontend/app/views/partials/case/case.details.html @@ -71,7 +71,7 @@

Basic Information

Tags
- +