-
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.
- Loading branch information
Showing
8 changed files
with
95 additions
and
21 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('updatableColour', function(UtilsSrv) { | ||
return { | ||
'restrict': 'E', | ||
'link': UtilsSrv.updatableLink, | ||
'templateUrl': 'views/directives/updatable-colour.html', | ||
'scope': { | ||
'value': '=?', | ||
'onUpdate': '&', | ||
'active': '=?', | ||
'placeholder': '@', | ||
'clearable': '<?' | ||
} | ||
}; | ||
}); | ||
})(); |
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,31 @@ | ||
<div class="updatable-input updatable-input-select"> | ||
<span class="updatable-input-value-wrapper" ng-hide="updatable.updating" ng-click="edit()"> | ||
<span ng-if="value!==null && value !==''" class="updatable-value"><i class="fa fa-stop" style="color: {{value}};"></i> {{value}}</span> | ||
<span ng-if="value === null || value === undefined || 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" ng-model="value" placeholder="Colour" size="8"> | ||
|
||
<span class="input-group-btn"> | ||
<button colorpicker colorpicker-close-on-select class="btn btn-default" ng-model="value" type="button"> | ||
<i class="fa fa-stop" style="color: {{value}};" ng-class="{'fa-stop': value, 'fa-ellipsis-h': !value}"></i> | ||
</button> | ||
<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> | ||
<button class="btn btn-sm btn-default" type="button" ng-click="clear()" ng-if="clearable === true"> | ||
<i class="text-danger glyphicon glyphicon-erase"></i> | ||
</button> | ||
</span> | ||
</div> | ||
</form> | ||
</div> |