-
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.
#12 Add support to custom fields with enumerated list of possible values
- Loading branch information
Showing
12 changed files
with
80 additions
and
15 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,18 @@ | ||
(function() { | ||
'use strict'; | ||
angular.module('theHiveDirectives') | ||
.directive('updatableSelect', function(UtilsSrv) { | ||
return { | ||
'restrict': 'E', | ||
'link': UtilsSrv.updatableLink, | ||
'templateUrl': 'views/directives/updatable-select.html', | ||
'scope': { | ||
'options': '=?', | ||
'value': '=?', | ||
'onUpdate': '&', | ||
'active': '=?', | ||
'placeholder': '@' | ||
} | ||
}; | ||
}); | ||
})(); |
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,25 @@ | ||
<span ng-hide="updatable.updating" ng-init="active = false" ng-mouseenter="active = true" ng-mouseleave="active = false"> | ||
<span ng-if="value!==null && value !==''" style="vertical-align: top; white-space: pre-wrap" class="updatable-value">{{value}}</span> | ||
<span ng-if="value === null || value === undefined" style="vertical-align: top;" class="updatable-value text-warning"><em>Not Specified</em></span> | ||
<small ng-show="active"> | ||
<a href class="clickable" tooltip-popup-delay='500' uib-tooltip="edit"> | ||
<i class="glyphicon glyphicon-pencil" ng-click="edit()"></i> | ||
</a> | ||
</small> | ||
<small ng-hide="active"> </small> | ||
</span> | ||
<span ng-show="updatable.updating" ng-init="updatable.dropdownOpen=false"> | ||
<form ng-submit="update()"> | ||
<div class="input-group input-group-sm"> | ||
<select class="form-control input-sm" ng-model="value" ng-options="v for v in options" ng-change="update()"></select> | ||
<span class="input-group-btn"> | ||
<button class="btn btn-sm btn-default" type="submit"> | ||
<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> | ||
</span> |
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
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