-
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 Update wording in case details pane and add boolean updatable input
- Loading branch information
Showing
8 changed files
with
61 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(function() { | ||
'use strict'; | ||
angular.module('theHiveDirectives') | ||
.directive('updatableBoolean', function(UtilsSrv) { | ||
return { | ||
'restrict': 'E', | ||
'link': UtilsSrv.updatableLink, | ||
'templateUrl': 'views/directives/updatable-boolean.html', | ||
'scope': { | ||
'inputType': '@', | ||
'value': '=?', | ||
'onUpdate': '&', | ||
'active': '=?', | ||
'placeholder': '@', | ||
'trueText': '@?', | ||
'falseText': '@?' | ||
} | ||
}; | ||
}); | ||
})(); |
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 ? trueText || 'True' : falseText || 'False'}}</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> | ||
<span ng-hide="active"> </span> | ||
</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 [true, false]" 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