-
Notifications
You must be signed in to change notification settings - Fork 640
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1816 Add the possibility to update the value of a freetag
- Loading branch information
Showing
6 changed files
with
77 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
(function() { | ||
'use strict'; | ||
angular.module('theHiveDirectives') | ||
.directive('updatableTag', function(UtilsSrv) { | ||
return { | ||
'restrict': 'E', | ||
'link': UtilsSrv.updatableLink, | ||
'templateUrl': 'views/directives/updatable-tag.html', | ||
'scope': { | ||
'value': '=?', | ||
'colour': '<?', | ||
'onUpdate': '&' | ||
} | ||
}; | ||
}); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<div class="updatable-input updatable-input-text"> | ||
<span class="updatable-input-value-wrapper pb-xxxs" ng-hide="updatable.updating" ng-click="edit()"> | ||
<span ng-if="value!==null && value !==''" class="updatable-value"><tag-item value="value" colour="colour"></tag-item></span> | ||
<span ng-if="value===null || value ===''" class="updatable-value text-warning"><em>Not Specified</em></span> | ||
|
||
<small class="updatable-input-icon"> | ||
<i class="glyphicon glyphicon-pencil"></i> | ||
</small> | ||
</span> | ||
|
||
<form ng-submit="update()" ng-show="updatable.updating"> | ||
<div class="input-group input-group-sm"> | ||
|
||
<input type="text" class="form-control input-sm" ng-model="value" autofocus="autofocus" required> | ||
|
||
<span class="input-group-btn"> | ||
<button class="btn btn-sm btn-default" type="submit" ng-disabled="!value"> | ||
<i class="text-success glyphicon glyphicon-ok"></i> | ||
</button> | ||
<button class="btn btn-sm btn-default" type="button" ng-click="cancel()"> | ||
<i class="text-danger glyphicon glyphicon-remove"></i> | ||
</button> | ||
</span> | ||
</div> | ||
</form> | ||
</div> |