aboutsummaryrefslogtreecommitdiffstats
path: root/library/jqupload/js/app.js
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-10-23 00:12:36 +0000
committerMario <mario@mariovavti.com>2018-10-23 13:23:18 +0200
commit506ea713025ecec89dafea47125678201ea85cf6 (patch)
treedf82c7e1104a2155b4afa92ddafa3b8d47c46612 /library/jqupload/js/app.js
parentc7ebb4b009857159d77b71675336ab97016b99e8 (diff)
downloadvolse-hubzilla-506ea713025ecec89dafea47125678201ea85cf6.tar.gz
volse-hubzilla-506ea713025ecec89dafea47125678201ea85cf6.tar.bz2
volse-hubzilla-506ea713025ecec89dafea47125678201ea85cf6.zip
for whatever reason there were two of these
(cherry picked from commit 7ed197f46b189601ac043f4bfeab41204a43488b)
Diffstat (limited to 'library/jqupload/js/app.js')
-rw-r--r--library/jqupload/js/app.js101
1 files changed, 0 insertions, 101 deletions
diff --git a/library/jqupload/js/app.js b/library/jqupload/js/app.js
deleted file mode 100644
index 47b4f923b..000000000
--- a/library/jqupload/js/app.js
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * jQuery File Upload Plugin Angular JS Example 1.2.1
- * https://github.com/blueimp/jQuery-File-Upload
- *
- * Copyright 2013, Sebastian Tschan
- * https://blueimp.net
- *
- * Licensed under the MIT license:
- * http://www.opensource.org/licenses/MIT
- */
-
-/* jshint nomen:false */
-/* global window, angular */
-
-(function () {
- 'use strict';
-
- var isOnGitHub = window.location.hostname === 'blueimp.github.io',
- url = isOnGitHub ? '//jquery-file-upload.appspot.com/' : 'server/php/';
-
- angular.module('demo', [
- 'blueimp.fileupload'
- ])
- .config([
- '$httpProvider', 'fileUploadProvider',
- function ($httpProvider, fileUploadProvider) {
- delete $httpProvider.defaults.headers.common['X-Requested-With'];
- fileUploadProvider.defaults.redirect = window.location.href.replace(
- /\/[^\/]*$/,
- '/cors/result.html?%s'
- );
- if (isOnGitHub) {
- // Demo settings:
- angular.extend(fileUploadProvider.defaults, {
- // Enable image resizing, except for Android and Opera,
- // which actually support image resizing, but fail to
- // send Blob objects via XHR requests:
- disableImageResize: /Android(?!.*Chrome)|Opera/
- .test(window.navigator.userAgent),
- maxFileSize: 5000000,
- acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i
- });
- }
- }
- ])
-
- .controller('DemoFileUploadController', [
- '$scope', '$http', '$filter', '$window',
- function ($scope, $http) {
- $scope.options = {
- url: url
- };
- if (!isOnGitHub) {
- $scope.loadingFiles = true;
- $http.get(url)
- .then(
- function (response) {
- $scope.loadingFiles = false;
- $scope.queue = response.data.files || [];
- },
- function () {
- $scope.loadingFiles = false;
- }
- );
- }
- }
- ])
-
- .controller('FileDestroyController', [
- '$scope', '$http',
- function ($scope, $http) {
- var file = $scope.file,
- state;
- if (file.url) {
- file.$state = function () {
- return state;
- };
- file.$destroy = function () {
- state = 'pending';
- return $http({
- url: file.deleteUrl,
- method: file.deleteType
- }).then(
- function () {
- state = 'resolved';
- $scope.clear(file);
- },
- function () {
- state = 'rejected';
- }
- );
- };
- } else if (!file.$cancel && !file._index) {
- file.$cancel = function () {
- $scope.clear(file);
- };
- }
- }
- ]);
-
-}());