Skip to content

Commit 05edcf3

Browse files
committed
Files added
1 parent 871e559 commit 05edcf3

24 files changed

+5065
-0
lines changed

dist/css/demo-ie8.css

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@charset "UTF-8";
2+
/*
3+
* jQuery File Upload Demo CSS Fixes for IE<9
4+
* https://github.com/blueimp/jQuery-File-Upload
5+
*
6+
* Copyright 2013, Sebastian Tschan
7+
* https://blueimp.net
8+
*
9+
* Licensed under the MIT license:
10+
* https://opensource.org/licenses/MIT
11+
*/
12+
13+
.navigation {
14+
list-style: none;
15+
padding: 0;
16+
margin: 1em 0;
17+
}
18+
.navigation li {
19+
display: inline;
20+
margin-right: 10px;
21+
}

dist/css/demo.css

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
@charset "UTF-8";
2+
/*
3+
* jQuery File Upload Demo CSS
4+
* https://github.com/blueimp/jQuery-File-Upload
5+
*
6+
* Copyright 2013, Sebastian Tschan
7+
* https://blueimp.net
8+
*
9+
* Licensed under the MIT license:
10+
* https://opensource.org/licenses/MIT
11+
*/
12+
13+
body {
14+
max-width: 750px;
15+
margin: 0 auto;
16+
padding: 1em;
17+
font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, sans-serif;
18+
font-size: 1em;
19+
line-height: 1.4em;
20+
background: #222;
21+
color: #fff;
22+
-webkit-text-size-adjust: 100%;
23+
-ms-text-size-adjust: 100%;
24+
}
25+
a {
26+
color: orange;
27+
text-decoration: none;
28+
}
29+
img {
30+
border: 0;
31+
vertical-align: middle;
32+
}
33+
h1 {
34+
line-height: 1em;
35+
}
36+
blockquote {
37+
padding: 0 0 0 15px;
38+
margin: 0 0 20px;
39+
border-left: 5px solid #eee;
40+
}
41+
table {
42+
width: 100%;
43+
margin: 10px 0;
44+
}
45+
46+
.fileupload-progress {
47+
margin: 10px 0;
48+
}
49+
.fileupload-progress .progress-extended {
50+
margin-top: 5px;
51+
}
52+
.error {
53+
color: red;
54+
}
55+
56+
@media (min-width: 481px) {
57+
.navigation {
58+
list-style: none;
59+
padding: 0;
60+
}
61+
.navigation li {
62+
display: inline-block;
63+
}
64+
.navigation li:not(:first-child):before {
65+
content: "| ";
66+
}
67+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@charset "UTF-8";
2+
/*
3+
* jQuery File Upload Plugin NoScript CSS
4+
* https://github.com/blueimp/jQuery-File-Upload
5+
*
6+
* Copyright 2013, Sebastian Tschan
7+
* https://blueimp.net
8+
*
9+
* Licensed under the MIT license:
10+
* https://opensource.org/licenses/MIT
11+
*/
12+
13+
.fileinput-button input {
14+
position: static;
15+
opacity: 1;
16+
filter: none;
17+
font-size: inherit !important;
18+
direction: inherit;
19+
}
20+
.fileinput-button span {
21+
display: none;
22+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@charset "UTF-8";
2+
/*
3+
* jQuery File Upload UI Plugin NoScript CSS
4+
* https://github.com/blueimp/jQuery-File-Upload
5+
*
6+
* Copyright 2012, Sebastian Tschan
7+
* https://blueimp.net
8+
*
9+
* Licensed under the MIT license:
10+
* https://opensource.org/licenses/MIT
11+
*/
12+
13+
.fileinput-button i,
14+
.fileupload-buttonbar .delete,
15+
.fileupload-buttonbar .toggle {
16+
display: none;
17+
}

dist/css/jquery.fileupload-ui.css

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
@charset "UTF-8";
2+
/*
3+
* jQuery File Upload UI Plugin CSS
4+
* https://github.com/blueimp/jQuery-File-Upload
5+
*
6+
* Copyright 2010, Sebastian Tschan
7+
* https://blueimp.net
8+
*
9+
* Licensed under the MIT license:
10+
* https://opensource.org/licenses/MIT
11+
*/
12+
13+
.fileupload-buttonbar .btn,
14+
.fileupload-buttonbar .toggle {
15+
margin-bottom: 5px;
16+
}
17+
.progress-animated .progress-bar,
18+
.progress-animated .bar {
19+
background: url("../img/progressbar.gif") !important;
20+
filter: none;
21+
}
22+
.fileupload-process {
23+
float: right;
24+
display: none;
25+
}
26+
.fileupload-processing .fileupload-process,
27+
.files .processing .preview {
28+
display: block;
29+
width: 32px;
30+
height: 32px;
31+
background: url("../img/loading.gif") center no-repeat;
32+
background-size: contain;
33+
}
34+
.files audio,
35+
.files video {
36+
max-width: 300px;
37+
}
38+
39+
@media (max-width: 767px) {
40+
.fileupload-buttonbar .toggle,
41+
.files .toggle,
42+
.files .btn span {
43+
display: none;
44+
}
45+
.files .name {
46+
width: 80px;
47+
word-wrap: break-word;
48+
}
49+
.files audio,
50+
.files video {
51+
max-width: 80px;
52+
}
53+
.files img,
54+
.files canvas {
55+
max-width: 100%;
56+
}
57+
}

dist/css/jquery.fileupload.css

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
@charset "UTF-8";
2+
/*
3+
* jQuery File Upload Plugin CSS
4+
* https://github.com/blueimp/jQuery-File-Upload
5+
*
6+
* Copyright 2013, Sebastian Tschan
7+
* https://blueimp.net
8+
*
9+
* Licensed under the MIT license:
10+
* https://opensource.org/licenses/MIT
11+
*/
12+
13+
.fileinput-button {
14+
position: relative;
15+
overflow: hidden;
16+
display: inline-block;
17+
}
18+
.fileinput-button input {
19+
position: absolute;
20+
top: 0;
21+
right: 0;
22+
margin: 0;
23+
opacity: 0;
24+
-ms-filter: 'alpha(opacity=0)';
25+
font-size: 200px !important;
26+
direction: ltr;
27+
cursor: pointer;
28+
}
29+
30+
/* Fixes for IE < 8 */
31+
@media screen\9 {
32+
.fileinput-button input {
33+
filter: alpha(opacity=0);
34+
font-size: 100%;
35+
height: 100%;
36+
}
37+
}

dist/css/style.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@charset "UTF-8";
2+
/*
3+
* jQuery File Upload Plugin CSS Example
4+
* https://github.com/blueimp/jQuery-File-Upload
5+
*
6+
* Copyright 2013, Sebastian Tschan
7+
* https://blueimp.net
8+
*
9+
* Licensed under the MIT license:
10+
* https://opensource.org/licenses/MIT
11+
*/

dist/img/loading.gif

3.81 KB
Loading

dist/img/progressbar.gif

3.25 KB
Loading

dist/js/app.js

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
/*
2+
* jQuery File Upload Plugin Angular JS Example
3+
* https://github.com/blueimp/jQuery-File-Upload
4+
*
5+
* Copyright 2013, Sebastian Tschan
6+
* https://blueimp.net
7+
*
8+
* Licensed under the MIT license:
9+
* https://opensource.org/licenses/MIT
10+
*/
11+
12+
/* jshint nomen:false */
13+
/* global window, angular */
14+
15+
;(function () {
16+
'use strict';
17+
18+
var isOnGitHub = window.location.hostname === 'blueimp.github.io',
19+
url = isOnGitHub ? '//jquery-file-upload.appspot.com/' : 'server/php/';
20+
21+
angular.module('demo', [
22+
'blueimp.fileupload'
23+
])
24+
.config([
25+
'$httpProvider', 'fileUploadProvider',
26+
function ($httpProvider, fileUploadProvider) {
27+
delete $httpProvider.defaults.headers.common['X-Requested-With'];
28+
fileUploadProvider.defaults.redirect = window.location.href.replace(
29+
/\/[^\/]*$/,
30+
'/cors/result.html?%s'
31+
);
32+
if (isOnGitHub) {
33+
// Demo settings:
34+
angular.extend(fileUploadProvider.defaults, {
35+
// Enable image resizing, except for Android and Opera,
36+
// which actually support image resizing, but fail to
37+
// send Blob objects via XHR requests:
38+
disableImageResize: /Android(?!.*Chrome)|Opera/
39+
.test(window.navigator.userAgent),
40+
maxFileSize: 999000,
41+
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i
42+
});
43+
}
44+
}
45+
])
46+
47+
.controller('DemoFileUploadController', [
48+
'$scope', '$http', '$filter', '$window',
49+
function ($scope, $http) {
50+
$scope.options = {
51+
url: url
52+
};
53+
if (!isOnGitHub) {
54+
$scope.loadingFiles = true;
55+
$http.get(url)
56+
.then(
57+
function (response) {
58+
$scope.loadingFiles = false;
59+
$scope.queue = response.data.files || [];
60+
},
61+
function () {
62+
$scope.loadingFiles = false;
63+
}
64+
);
65+
}
66+
}
67+
])
68+
69+
.controller('FileDestroyController', [
70+
'$scope', '$http',
71+
function ($scope, $http) {
72+
var file = $scope.file,
73+
state;
74+
if (file.url) {
75+
file.$state = function () {
76+
return state;
77+
};
78+
file.$destroy = function () {
79+
state = 'pending';
80+
return $http({
81+
url: file.deleteUrl,
82+
method: file.deleteType
83+
}).then(
84+
function () {
85+
state = 'resolved';
86+
$scope.clear(file);
87+
},
88+
function () {
89+
state = 'rejected';
90+
}
91+
);
92+
};
93+
} else if (!file.$cancel && !file._index) {
94+
file.$cancel = function () {
95+
$scope.clear(file);
96+
};
97+
}
98+
}
99+
]);
100+
101+
}());

0 commit comments

Comments
 (0)