Show setupLink properly

This commit is contained in:
Johannes Zellner
2016-04-04 18:35:38 +02:00
parent 5afb16aa98
commit 9fbbddc3eb
2 changed files with 18 additions and 3 deletions

View File

@@ -241,4 +241,19 @@ app.run(['$route', '$rootScope', '$location', function ($route, $rootScope, $loc
}
return original.apply($location, [path]);
};
}]);
}]);
app.directive('ngClickSelect', function () {
return {
restrict: 'AC',
link: function (scope, element, attrs) {
element.bind('click', function () {
var selection = window.getSelection();
var range = document.createRange();
range.selectNodeContents(this);
selection.removeAllRanges();
selection.addRange(range);
});
}
};
});

View File

@@ -217,9 +217,9 @@
<h4 class="modal-title">Invite Sent</h4>
</div>
<div class="modal-body">
<p>An email has been sent to {{ inviteSent.email }}.</p>
<p>An email has been sent to <b>{{ inviteSent.email }}</b>.</p>
<p>You can also share this invite link directly.</p>
<pre>{{ inviteSent.setupLink }}</pre>
<p ng-click-select>{{ inviteSent.setupLink }}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Ok</button>