latest changes

This commit is contained in:
Dobie Wollert
2015-07-19 21:31:10 -04:00
parent 4496b9c240
commit 24f4acc1d3
15 changed files with 671 additions and 13 deletions

View File

@ -807,7 +807,8 @@ angular.module('biomed.directives', [])
return {
scope: {
dropzone: '=',
existing: '='
existing: '=',
prefix: '@'
},
controller: function($scope, $element, $attrs) {
var config, dropzone;
@ -821,13 +822,16 @@ angular.module('biomed.directives', [])
$scope.$watch('existing', function() {
var existing = $scope.existing;
console.log(dropzone);
var prefix = "http://atlanticbiomedical.com/images/";
if ($scope.prefix) {
prefix = prefix + $scope.prefix;
}
if (existing) {
for (var i = 0; i < existing.length; i++) {
var file = { name: existing[i], size: 0, accepted: true, filename: existing[i] };
dropzone.options.addedfile.call(dropzone, file);
dropzone.options.thumbnail.call(dropzone, file, "http://atlanticbiomedical.com/images/" + existing[i]);
dropzone.options.thumbnail.call(dropzone, file, prefix + existing[i]);
dropzone.files.push(file);
}
}