Final fixes to taginput
This commit is contained in:
@@ -326,7 +326,7 @@ app.directive('tagInput', function () {
|
||||
},
|
||||
link: function ($scope, element, attrs) {
|
||||
$scope.defaultWidth = 200;
|
||||
$scope.tagText = '';
|
||||
$scope.tagText = ''; // current tag being edited
|
||||
$scope.placeholder = attrs.placeholder;
|
||||
$scope.tagArray = function () {
|
||||
if ($scope.inputTags === undefined) {
|
||||
@@ -387,12 +387,12 @@ app.directive('tagInput', function () {
|
||||
});
|
||||
},
|
||||
template:
|
||||
'<div class="tag-input-ctn">' +
|
||||
'<div class="tag-input-container">' +
|
||||
'<div class="input-tag" data-ng-repeat="tag in tagArray()">' +
|
||||
'{{tag}}' +
|
||||
'<div class="delete-tag" data-ng-click="deleteTag($index)">×</div>' +
|
||||
'</div>' +
|
||||
'<input type="text" data-ng-style="{width: inputWidth}" data-ng-model="tagText" placeholder="{{placeholder}}"/>' +
|
||||
'<input type="text" data-ng-model="tagText" placeholder="{{placeholder}}"/>' +
|
||||
'</div>'
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1060,14 +1060,7 @@ $graphs-success-alt: lighten(#27CE65, 20%);
|
||||
// ----------------------------
|
||||
// https://codepen.io/webmatze/pen/isuHh
|
||||
|
||||
.tag-input-ctn {
|
||||
border: 1px solid #ccc;
|
||||
padding: 2px 3px;
|
||||
display: inline-block;
|
||||
width: 500px;
|
||||
border-radius: 3px;
|
||||
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.075);
|
||||
|
||||
.tag-input-container {
|
||||
input {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
@@ -1077,7 +1070,7 @@ $graphs-success-alt: lighten(#27CE65, 20%);
|
||||
line-height: 18px;
|
||||
color: black;
|
||||
border: 0px;
|
||||
margin: 2px;
|
||||
margin: 1px;
|
||||
&:focus {
|
||||
outline: 0;
|
||||
box-shadow: 0px;
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" ng-model="useredit.aliases" name="aliases" placeholder="Separate aliases by comma">
|
||||
</div>
|
||||
<tag-input placeholder='Separate aliases by comma' taglist='listtwo'></tag-input>
|
||||
<tag-input class="form-group form-control" placeholder='Separate aliases by comma' taglist='useredit.aliases'></tag-input>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="form-group" ng-hide="isMe(useredit.userInfo)">
|
||||
|
||||
Reference in New Issue
Block a user