diff options
author | Max Kostikov <max@kostikov.co> | 2019-11-18 13:00:43 +0100 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-11-18 13:00:43 +0100 |
commit | 498c021aec25d845c67150475294066113de6d20 (patch) | |
tree | c8934c83f6519bf58f27f410683e06cc6615a6a0 /vendor/blueimp/jquery-file-upload/js/app.js | |
parent | 5ee133843f166a58e0c6236e543204be8dae70d3 (diff) | |
parent | ef75d27afbbee4cfe7d4441269e350b8f7f432f9 (diff) | |
download | volse-hubzilla-498c021aec25d845c67150475294066113de6d20.tar.gz volse-hubzilla-498c021aec25d845c67150475294066113de6d20.tar.bz2 volse-hubzilla-498c021aec25d845c67150475294066113de6d20.zip |
Merge branch 'dev' into 'dev'
Dev sync
See merge request kostikov/core!5
Diffstat (limited to 'vendor/blueimp/jquery-file-upload/js/app.js')
-rw-r--r-- | vendor/blueimp/jquery-file-upload/js/app.js | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/vendor/blueimp/jquery-file-upload/js/app.js b/vendor/blueimp/jquery-file-upload/js/app.js deleted file mode 100644 index e6b7bce3e..000000000 --- a/vendor/blueimp/jquery-file-upload/js/app.js +++ /dev/null @@ -1,101 +0,0 @@ -/* - * jQuery File Upload Plugin Angular JS Example - * https://github.com/blueimp/jQuery-File-Upload - * - * Copyright 2013, Sebastian Tschan - * https://blueimp.net - * - * Licensed under the MIT license: - * https://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: 999000, - 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); - }; - } - } - ]); - -}()); |