Skip to content

Commit

Permalink
Allowing preview on main published view for new projects
Browse files Browse the repository at this point in the history
  • Loading branch information
xirdneh committed May 23, 2017
1 parent fab162f commit 8e6103d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,40 +35,45 @@
$scope.imageHref = data.postit;
});
});

$scope.browser.listing.permissions = 'READ';
if ($scope.browser.listing.projectId){
_.each($scope.browser.listing.eventsList, function(evt){
evt.files = _.map(evt.fileObjs, function(f){
f.system = 'designsafe.storage.published';
f.path = $scope.browser.listing.projectId + f.path;
f.permissions = 'READ';
return FileListing.init(f);
});
});
_.each($scope.browser.listing.modelConfigs, function(mcf){
mcf.files = _.map(mcf.fileObjs, function(f){
f.system = 'designsafe.storage.published';
f.path = $scope.browser.listing.projectId + f.path;
f.permissions = 'READ';
return FileListing.init(f);
});
});
_.each($scope.browser.listing.sensorLists, function(slt){
slt.files = _.map(slt.fileObjs, function(f){
f.system = 'designsafe.storage.published';
f.path = $scope.browser.listing.projectId + f.path;
f.permissions = 'READ';
return FileListing.init(f);
});
});
_.each($scope.browser.listing.analysisList, function(anl){
anl.files = _.map(anl.fileObjs, function(f){
f.system = 'designsafe.storage.published';
f.path = $scope.browser.listing.projectId + f.path;
f.permissions = 'READ';
return FileListing.init(f);
});
});
_.each($scope.browser.listing.reportsList, function(rep){
rep.files = _.map(rep.fileObjs, function(f){
f.system = 'designsafe.storage.published';
f.path = $scope.browser.listing.projectId + f.path;
f.permissions = 'READ';
return FileListing.init(f);
});
});
Expand Down

0 comments on commit 8e6103d

Please sign in to comment.