Skip to content
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.

Commit

Permalink
Merge branch 'release/0.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
oicr-vchung committed Dec 18, 2015
2 parents fe237e0 + af078cf commit d670f4c
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 18 deletions.
12 changes: 11 additions & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<script src="scripts/libs/highlightjs/highlight.pack.js"></script>

<!-- AddThis (Sharing Icons) -->
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-564e22ffb3fcb698" async="async"></script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-564e22ffb3fcb698&async=1"></script>

<!-- build:js(.) scripts/vendor.js -->
<!-- bower:js -->
Expand Down Expand Up @@ -121,5 +121,15 @@
<script src="scripts/services/formatting.js"></script>
<script src="scripts/filters/hiddentagsfilter.js"></script>
<!-- endbuild -->

<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-34523087-3', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>
13 changes: 11 additions & 2 deletions app/scripts/controllers/containerdetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,19 @@ angular.module('dockstore.ui')
});
};

$scope.refreshContainer = function(containerId) {
$scope.refreshContainer = function(containerId, activeTabIndex) {
$scope.setContainerDetailsError(null);
if ($scope.refreshingContainer) return;
$scope.refreshingContainer = true;
return ContainerService.refreshContainer(containerId)
.then(
function(containerObj) {
$scope.updateContainerObj({containerObj: containerObj});
$scope.updateContainerObj({
containerObj: containerObj,
activeTabIndex: activeTabIndex ? activeTabIndex : null
});
$scope.updateInfoURLs();
$scope.$broadcast('refreshFiles');
return containerObj;
},
function(response) {
Expand Down Expand Up @@ -248,4 +253,8 @@ angular.module('dockstore.ui')
}
});

$scope.$watch('containerToolname', function(newValue, oldValue) {
if (newValue) $scope.updateInfoURLs();
});

}]);
13 changes: 7 additions & 6 deletions app/scripts/controllers/containereditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ angular.module('dockstore.ui')
return ContainerService.refreshUserContainers(userId)
.then(
function(containers) {
$scope.refreshingContainers = false;
$window.location.href = '/my-containers';
return containers;
},
Expand All @@ -66,7 +65,9 @@ angular.module('dockstore.ui')
);
return $q.reject(response);
}
);
).finally(function(response) {
$scope.refreshingContainers = false;
});
};

$scope.sortNSContainers = function(containers, username) {
Expand Down Expand Up @@ -198,9 +199,9 @@ angular.module('dockstore.ui')
);
});

$scope.updateContainerObj = function(containerObj) {
$scope.updateContainerObj = function(containerObj, activeTabIndex) {
if (containerObj) {
$scope.replaceContainer(containerObj);
$scope.replaceContainer(containerObj, activeTabIndex);
} else {
/* 'Real-time' */
$scope.updateNSContainersRegistered($scope.selContainerObj);
Expand Down Expand Up @@ -236,7 +237,7 @@ angular.module('dockstore.ui')
$scope.activeTabs[2] = true;
};

$scope.replaceContainer = function(containerObj) {
$scope.replaceContainer = function(containerObj, activeTabIndex) {
for (var i = 0; i < $scope.containers.length; i++) {
if ($scope.containers[i].id === containerObj.id) break;
}
Expand All @@ -247,7 +248,7 @@ angular.module('dockstore.ui')
$scope.quayTokenObj.username : $scope.userObj.username
);
$scope.selectContainer(containerObj.id);
$scope.activeTabs[0] = true;
$scope.activeTabs[activeTabIndex ? activeTabIndex : 0] = true;
};

}]);
2 changes: 1 addition & 1 deletion app/scripts/controllers/containerfileviewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ angular.module('dockstore.ui')
$scope.getDockerFile($scope.containerObj.id, $scope.selTagName);
break;
case 'descriptor':
$scope.expectedFilename = 'Dockstore.cwl descriptor';
$scope.expectedFilename = '*.cwl descriptor';
$scope.getDescriptorFile($scope.containerObj.id, $scope.selTagName);
break;
default:
Expand Down
2 changes: 2 additions & 0 deletions app/scripts/controllers/tageditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ angular.module('dockstore.ui')
.then(
function(versionTags) {
$scope.closeEditTagModal(true);
$scope.$emit('tagEditorRefreshContainer', $scope.containerId);
return versionTags;
},
function(response) {
Expand Down Expand Up @@ -59,6 +60,7 @@ angular.module('dockstore.ui')
break;
}
}
$scope.$emit('tagEditorRefreshContainer', $scope.containerId);
return versionTags;
},
function(response) {
Expand Down
1 change: 1 addition & 0 deletions app/scripts/controllers/versionsgrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ angular.module('dockstore.ui')
.then(
function(response) {
$scope.removeVersionTag(tagId);
$scope.$emit('tagEditorRefreshContainer', $scope.containerObj.id);
},
function(response) {
$scope.setError(
Expand Down
8 changes: 7 additions & 1 deletion app/scripts/directives/containerdetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@ angular.module('dockstore.ui')
controller: 'ContainerDetailsCtrl',
scope: {
containerPath: '=',
containerToolname: '=',
containerObj: '=',
editMode: '=',
activeTabs: '=',
updateContainerObj: '&'
},
templateUrl: 'templates/containerdetails.html'
templateUrl: 'templates/containerdetails.html',
link: function postLink(scope, element, attrs) {
scope.$on('tagEditorRefreshContainer', function(event, containerId) {
scope.refreshContainer(containerId, 2);
});
}
};
});
4 changes: 4 additions & 0 deletions app/scripts/directives/containerfileviewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ angular.module('dockstore.ui')
function(newValues, oldValues) {
scope.refreshDocument();
});
scope.$on('refreshFiles', function(event) {
scope.setDocument();
scope.refreshDocument();
});
}
};
});
2 changes: 1 addition & 1 deletion app/scripts/directives/disquscomments.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ angular.module('dockstore.ui')
return {
restrict: 'AE',
template: '<div id="disqus_thread"></div>',
link: function postLink(scope, element, attrs) {console.log();
link: function postLink(scope, element, attrs) {
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables
Expand Down
2 changes: 1 addition & 1 deletion app/styles/ds-style-fix.scss
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ div.container-source-repos p {
}

div.container-sharing {
width: 144px;
width: 180px;
margin: 0 auto;
div {
line-height: 1em;
Expand Down
7 changes: 4 additions & 3 deletions app/templates/containerdetails.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ <h3>
<div class="col-md-4"
ng-if="editMode">
<h3>
<div class="btn-group pull-right" role="group">
<div class="pull-right">
<button uib-btn-checkbox
type="button"
class="btn btn-primary"
ng-click="setContainerRegistration(containerObj.id, containerEditData.isRegistered)"
ng-model="containerEditData.isRegistered"
ng-class="containerEditData.isRegistered ? 'btn-primary' : 'btn-warning'"
ng-disabled="refreshingContainer">
Register{{ containerEditData.isRegistered ? 'ed' : '' }}
{{ containerEditData.isRegistered ? 'Unpublish' : 'Publish' }}
</button>
<button type="button"
class="btn btn-primary"
Expand Down Expand Up @@ -311,8 +311,9 @@ <h3>Sharing</h3>
<td>
<div class="container-sharing">
<sn-addthis-toolbox
class="addthis_default_style addthis_32x32_style">
class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a href class="addthis_button_twitter"></a>
<a href class="addthis_button_facebook"></a>
<a href class="addthis_button_google_plusone_share"></a>
<a href class="addthis_button_evernote"></a>
<a href class="addthis_button_email"></a>
Expand Down
7 changes: 7 additions & 0 deletions app/templates/tageditor.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ <h4 class="modal-title">{{!editMode ? 'View' : (tagObj.create ? 'Add' : 'Edit')}
</p>
<p class="error-output">{{tagEditError.errorDetails}}</p>
</div>
<div class="alert alert-info"
role="alert"
ng-if="refreshingContainer">
<span class="glyphicon glyphicon-refresh glyphicon-refresh-animate">
</span>
Please wait, retrieving Quay.io and/or Docker Hub container...
</div>
<form name="tagEditorForm"
class="form-horizontal"
ng-submit="tagObj.create ? createTag() : saveTagChanges()"
Expand Down
5 changes: 3 additions & 2 deletions app/views/containereditor.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h3 class="available-containers">
</div>
<div class="pull-right">
<span class="label" ng-class="containerObj.is_registered ? 'label-primary' : 'label-warning'">
{{ containerObj.is_registered ? 'REG' : 'UNREG' }}
{{ containerObj.is_registered ? 'PUB' : 'UNPUB' }}
</span>
</div>
</div>
Expand Down Expand Up @@ -110,10 +110,11 @@ <h3 class="available-containers">
<div class="col-md-9">
<div container-details
container-path="selContainerObj.path"
container-toolname="selContainerObj.toolname"
container-obj="selContainerObj"
edit-mode="true"
active-tabs="activeTabs"
update-container-obj="updateContainerObj(containerObj)"
update-container-obj="updateContainerObj(containerObj, activeTabIndex)"
ng-if="selContainerObj">
</div>
</div>
Expand Down

0 comments on commit d670f4c

Please sign in to comment.