only show url-button on url-field

Signed-off-by: fnuesse <felix.nuesse@t-online.de>
This commit is contained in:
fnuesse 2019-01-11 23:29:34 +01:00
parent 216c8ff8b5
commit 78fcc58775
No known key found for this signature in database
GPG key ID: 2089A3431243E819
2 changed files with 4 additions and 3 deletions

View file

@ -37,6 +37,7 @@
secret: '=secret',
inputField: '=useInput',
inputFieldplaceholder: '=inputPlaceholder',
isURLFIELD: '=url',
},
restrict: 'A',
replace: 'true',
@ -49,8 +50,8 @@
'</div>' +
'<div class="tools">' +
'<div class="cell" ng-if="toggle" tooltip="tggltxt" ng-click="toggleVisibility()"><i class="fa" ng-class="{\'fa-eye\': !valueVisible, \'fa-eye-slash\': valueVisible }"></i></div>' +
'<div class="cell" ng-if="isLink"><a ng-href="{{value}}" target="_blank" rel="nofollow noopener noreferrer"><i tooltip="\'Open in new window\'" class="link fa fa-external-link"></i></a></div>' +
'<div class="cell" ng-if="isPartialLink"><a ng-href="//{{value}}" target="_blank" rel="nofollow noopener noreferrer"><i tooltip="\'Open in new window\'" class="link fa fa-external-link"></i></a></div>' +
'<div class="cell" ng-if="url && isLink"><a ng-href="{{value}}" target="_blank" rel="nofollow noopener noreferrer"><i tooltip="\'Open in new window\'" class="link fa fa-external-link"></i></a></div>' +
'<div class="cell" ng-if="url && isPartialLink"><a ng-href="//{{value}}" target="_blank" rel="nofollow noopener noreferrer"><i tooltip="\'Open in new window\'" class="link fa fa-external-link"></i></a></div>' +
'<div class="cell" ngclipboard-success="onSuccess(e);" ngclipboard-error="onError(e);" ngclipboard data-clipboard-text="{{value}}"><i tooltip="copy_msg" class="fa fa-files-o"></i></div>' +
'</div></span>',
link: function (scope) {

View file

@ -39,7 +39,7 @@
<div class="row" ng-show="credential.url">
<div class="col-xs-4 col-md-3 col-lg-3">{{ 'url' | translate}}</div>
<div class="col-xs-8 col-md-9 col-lg-9">
<span credential-field value="credential.url"></span>
<span credential-field value="credential.url" url="true"></span>
</div>
</div>