Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
aselbie committed Dec 10, 2015
1 parent 55a7fa0 commit d0825b7
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 58 deletions.
65 changes: 30 additions & 35 deletions dist/example.css

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions dist/lib.css

Large diffs are not rendered by default.

82 changes: 69 additions & 13 deletions dist/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -41168,7 +41168,7 @@ $templateCache.put("views/simple-countdown.directive.html","<p>{{vm.timeRemainin
'use strict';
var dir;

dir = function($window) {
dir = function($window, $timeout) {
var elements, link, lockHeight;
elements = [];
lockHeight = function($element) {
Expand Down Expand Up @@ -41216,7 +41216,20 @@ $templateCache.put("views/simple-countdown.directive.html","<p>{{vm.timeRemainin
link = function(scope, element, attrs) {
elements.push($(element[0]));
return element.ready(function() {
return lockHeight($(element[0]));
var timeoutSet;
lockHeight($(element[0]));
timeoutSet = false;
return scope.$watch(function() {
var callback;
if (!timeoutSet) {
callback = function() {
timeoutSet = false;
return lockHeight($(element[0]));
};
$timeout(callback, 0, false);
return timeoutSet = true;
}
});
});
};
return {
Expand All @@ -41230,7 +41243,7 @@ $templateCache.put("views/simple-countdown.directive.html","<p>{{vm.timeRemainin
};
};

dir.$inject = ['$window'];
dir.$inject = ['$window', '$timeout'];

angular.module('appirio-tech-ng-ui-components').directive('lockHeight', dir);

Expand Down Expand Up @@ -41596,7 +41609,7 @@ $templateCache.put("views/simple-countdown.directive.html","<p>{{vm.timeRemainin
sendResetEmail = function(email) {
return $http({
method: 'GET',
url: API_URL + "/v3/users/resetToken?&email=" + email
url: API_URL + "/v3/users/resetToken?email=" + email + "&source=connect"
});
};
resetPassword = function(handle, token, password) {
Expand Down Expand Up @@ -41970,7 +41983,8 @@ $templateCache.put("views/simple-countdown.directive.html","<p>{{vm.timeRemainin
name: file.fileName,
path: file.filePath,
size: file.fileSize,
type: file.fileType
type: file.fileType,
url: file.preSignedURL
}, {
newFile: false,
});
Expand Down Expand Up @@ -42076,7 +42090,12 @@ $templateCache.put("views/simple-countdown.directive.html","<p>{{vm.timeRemainin
file.createRecord = options.createRecord || null;
file.removeRecord = options.removeRecord || null;

if (!file.newFile) {

if (file.newFile) {
getDataUrl(data).then(function(src) {
file.data.src = src;
})
} else {
file.uploading = false;
file.hasErrors = false;
}
Expand Down Expand Up @@ -42120,7 +42139,7 @@ $templateCache.put("views/simple-countdown.directive.html","<p>{{vm.timeRemainin

file.onCaptionChange({
caption: file.data.caption,
id: file.data.id,
id: file.data.id,
name: file.data.name,
path: file.data.path,
size: file.data.size,
Expand Down Expand Up @@ -42183,12 +42202,12 @@ $templateCache.put("views/simple-countdown.directive.html","<p>{{vm.timeRemainin
};

File.prototype._onProgress = function(e) {
this.progress = Math.round(e.lengthComputable ? e.loaded * 100 / e.total : 0);
var progress = Math.round(e.lengthComputable ? e.loaded * 100 / e.total : 0);
this.onProgress(progress);
};

File.prototype._failed = function(err) {
var file = this;
console.log(err);
file.hasErrors = true;
file.uploading = false;
file.onFailure(err);
Expand Down Expand Up @@ -42347,6 +42366,23 @@ $templateCache.put("views/simple-countdown.directive.html","<p>{{vm.timeRemainin
};
}

function getDataUrl(fileData) {
var deferred = $q.defer();
var reader = new FileReader();

reader.onload = function(){
deferred.resolve(reader.result);
};

reader.onerror = function() {
deferred.reject();
}

reader.readAsDataURL(fileData);

return deferred.promise;
}

return File;

}
Expand Down Expand Up @@ -42487,13 +42523,33 @@ $templateCache.put("views/simple-countdown.directive.html","<p>{{vm.timeRemainin
vm.file = $scope.file;
vm.allowCaptions = vm.file.allowCaptions;
vm.caption = '';
vm.progress = 0;

var setSrc = function() {
var src = vm.file.data.src || vm.file.data.url

if (src && vm.file.data.type.match('image.*')) {
vm.hasImage = true;
}

vm.src = src || '/images/icon-document.svg';
}

$scope.$watch('vm.file.data.src', setSrc);

setSrc();

vm.setCaption = function () {
if (vm.caption.length) {
vm.file.setCaption(vm.caption);
vm.caption = '';
}
}

vm.file.onProgress = function(progress) {
$scope.$apply(function() {
vm.progress = progress;
})
}
}

})();
Expand All @@ -42516,9 +42572,9 @@ $templateCache.put("views/simple-countdown.directive.html","<p>{{vm.timeRemainin

}).call(this);

angular.module("ap-file-upload").run(["$templateCache", function($templateCache) {$templateCache.put("views/file.directive.html","<div ng-class=\"{\'failed\': vm.file.hasErrors}\" class=\"uploader\"><main ng-class=\"{ end: vm.file.uploading}\" class=\"flex column middle center\"><img ng-src=\"/images/icon-document.svg\" ng-hide=\"vm.file.hasErrors || vm.file.uploading\"/><div ng-show=\"vm.file.uploading\" class=\"progress-house\"><progress value=\"{{vm.file.progress}}\" max=\"100\">{{ vm.file.progress }}%</progress></div><div ng-show=\"vm.file.hasErrors\" class=\"failed flex column center\"><img ng-src=\"/images/icon-alert-red.svg\"/><button ng-click=\"vm.file.retry()\" type=\"button\" class=\"clean\">retry</button></div></main><footer class=\"flex space-between\"><p class=\"file-name\">{{ vm.file.data.name }}</p><button ng-show=\"!vm.file.uploading\" ng-click=\"vm.file.remove()\" type=\"button\" class=\"clean\"><div class=\"icon cross\"></div></button></footer><textarea ng-if=\"vm.allowCaptions\" ng-model=\"vm.file.data.caption\" ng-blur=\"vm.setCaption()\" placeholder=\"enter a caption\"></textarea></div>");
$templateCache.put("views/uploaded-files.directive.html","<ul class=\"flex wrap\"><li ng-repeat=\"file in files\"><ap-file file=\"file\"></ap-file></li></ul>");
$templateCache.put("views/uploader.directive.html","<div ng-if=\"vm.config\"><uploaded-files files=\"vm.uploader.files\" ng-show=\"vm.uploader.files.length\"></uploaded-files><input ng-if=\"vm.config.allowMultiple\" multiple=\"\" type=\"file\" on-file-change=\"vm.uploader.add(fileList)\" class=\"choose-files\"/><input ng-if=\"!vm.config.allowMultiple\" type=\"file\" on-file-change=\"vm.uploader.add(fileList)\" class=\"choose-files\"/></div>");}]);
angular.module("ap-file-upload").run(["$templateCache", function($templateCache) {$templateCache.put("views/file.directive.html","<div ng-class=\"{\'failed\': vm.file.hasErrors}\" class=uploader><main ng-class=\"{ end: vm.file.uploading}\" class=\"flex column middle center\"><div ng-if=!vm.file.hasErrors style=\"background-image: url({{ vm.src }})\" ng-class=\"{ img: vm.hasImage, icon: !vm.hasImage }\" class=fitted></div><div ng-show=vm.file.uploading class=progress-house><progress value={{vm.progress}} max=100>{{ vm.progress }}%</progress></div><div ng-show=vm.file.hasErrors class=\"failed flex column center\"><img ng-src=/images/icon-alert-red.svg class=icon><button ng-click=vm.file.retry() type=button class=clean>retry</button></div></main><footer class=\"flex space-between\"><p class=file-name>{{ vm.file.data.name }}</p><button ng-show=!vm.file.uploading ng-click=vm.file.remove() type=button class=clean><div class=\"icon cross\"></div></button></footer><textarea ng-if=vm.allowCaptions ng-model=vm.caption ng-blur=vm.setCaption() placeholder=\"enter a caption\"></textarea></div>");
$templateCache.put("views/uploaded-files.directive.html","<ul class=\"flex wrap\"><li ng-repeat=\"file in files\"><ap-file file=file></ap-file></li></ul>");
$templateCache.put("views/uploader.directive.html","<div ng-if=vm.config><uploaded-files files=vm.uploader.files ng-show=vm.uploader.files.length></uploaded-files><input ng-if=vm.config.allowMultiple multiple type=file on-file-change=vm.uploader.add(fileList) class=choose-files><input ng-if=!vm.config.allowMultiple type=file on-file-change=vm.uploader.add(fileList) class=choose-files></div>");}]);
(function() {
'use strict';
var dependencies;
Expand Down
Loading

0 comments on commit d0825b7

Please sign in to comment.