Skip to content

Commit

Permalink
Image and File Editor Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
robcalla committed Oct 10, 2018
1 parent 33bca57 commit e6741cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions IdraPortal/src/main/webapp/catalogues/Catalogue.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
onchange="angular.element(this).scope().imageUpload(this)"
accept=".jpg, .png, .jpeg, .gif, .bmp, .tif, .tiff|images/*">
</span>
<button ng-disabled="imageRead==''" type="button"
<button ng-disabled="imageRead=='' && node.image.imageData==''
" type="button"
class="btn btn-primary btn-xs" style="margin: 0px"
ng-click="openCropModal()">Crop</button>
</div>
Expand Down Expand Up @@ -253,7 +254,7 @@ <h3 class="modal-title">Image Crop</h3>
<script type="text/ng-template" id="DumpEditor.html">
<div class="modal-header">
<button type="button" class="close" aria-hidden="true" ng-click="cancel()">x</button>
<h3 class="modal-title">Dump Editor</h3>
<h3 class="modal-title">File Editor</h3>
</div>
<div class="modal-body row">
<div class="toolbar">
Expand Down
5 changes: 4 additions & 1 deletion IdraPortal/src/main/webapp/catalogues/single_catalogue.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ angular.module("IdraPlatform").controller('CatalogueCtrl',['$scope','$http','con
size: 'lg',
resolve: {
image: function(){
return $scope.imageRead;
if($scope.imageRead!='')
return $scope.imageRead;
else if($scope.node.image.imageData!='')
return $scope.node.image.imageData;
}
}
});
Expand Down

0 comments on commit e6741cc

Please sign in to comment.