grim/port-authority

da2bb7b88256
Parents b7d4127fc94a
Children 6a3943520ae7
add some helper stuff to get this clipboard stuff rolling
--- a/html/window.html Tue Dec 09 01:27:53 2014 -0600
+++ b/html/window.html Tue Dec 09 01:32:43 2014 -0600
@@ -29,6 +29,7 @@
</div>
</form>
</div>
+ <div>Clipboard: {{clipboard}}</div>
<div class="listing">
<accordion close-others="true">
<accordion-group data-ng-repeat="repo in repos" data-ng-click="select_repo(repo)">
@@ -42,7 +43,7 @@
<p>{{repo.description}}</p>
<ul>
<li data-ng-repeat="(layer, tags) in tags">
- <span data-ng-repeat="tag in tags"><code>{{tag}}</code><span class="fa fa-clipboard"></span>{{$last ? '' : ', '}}</span>
+ <span data-ng-repeat="tag in tags"><code>{{tag}}</code><span data-ng-click="copy_tag(tag)" class="fa fa-clipboard"></span>{{$last ? '' : ', '}}</span>
</li>
</ul>
</accordion-group>
--- a/js/app.js Tue Dec 09 01:27:53 2014 -0600
+++ b/js/app.js Tue Dec 09 01:32:43 2014 -0600
@@ -44,6 +44,7 @@
$scope.repo = null;
$scope.error = null;
$scope.tags = null;
+ $scope.clipboard = null;
$scope.refresh = function() {
if($scope.registry.indexOf("http://") !== 0 && $scope.registry.indexOf("http://") !== 0) {
@@ -103,4 +104,8 @@
console.log("Failed to get the tag list: " + status);
});
};
+
+ $scope.copy_tag = function(tag) {
+ $scope.clipboard = $scope.registry + "/" + $scope.repo.name + ":" + tag;
+ };
}