Permalink
Browse files

Fixed #783 #764 #777 #766 #763 #761 #721 #687 #650 #710 #784 #768 #789

  • Loading branch information...
1 parent ce3dc15 commit 39fa7849438844ead68119f968234abd08a6556b Danial Farid committed Jun 4, 2015
Showing with 10,675 additions and 4,999 deletions.
  1. +8 −3 .gitignore
  2. +29 −0 .jshintrc
  3. +124 −103 Gruntfile.js
  4. +0 −9 demo/.buildpath
  5. +0 −8 demo/.classpath
  6. +0 −50 demo/.project
  7. +98 −0 demo/pom.xml
  8. 0 demo/src/{ → main/java}/com/df/angularfileupload/CORSFilter.java
  9. 0 demo/src/{ → main/java}/com/df/angularfileupload/FileUpload.java
  10. +5 −6 demo/src/{ → main/java}/com/df/angularfileupload/S3Signature.java
  11. +2 −2 demo/src/{ → main/resources}/META-INF/jdoconfig.xml
  12. 0 demo/src/{ → main/resources}/META-INF/persistence.xml
  13. 0 demo/src/{ → main/resources}/log4j.properties
  14. 0 demo/{war → src/main/webapp}/WEB-INF/appengine-web.xml
  15. 0 demo/{war → src/main/webapp}/WEB-INF/logging.properties
  16. 0 demo/{war → src/main/webapp}/WEB-INF/web.xml
  17. +16 −11 demo/{war → src/main/webapp}/common.css
  18. 0 demo/{war → src/main/webapp}/crossdomain.xml
  19. 0 demo/{war → src/main/webapp}/donate.html
  20. BIN demo/{war → src/main/webapp}/favicon.ico
  21. BIN demo/{war → src/main/webapp}/img/tea.jpg
  22. BIN demo/{war → src/main/webapp}/img/tea.png
  23. +246 −0 demo/src/main/webapp/index.html
  24. BIN demo/{war → src/main/webapp}/js/FileAPI.flash.swf
  25. 0 demo/{war → src/main/webapp}/js/FileAPI.js
  26. +6 −0 demo/src/main/webapp/js/FileAPI.min.js
  27. +1,159 −0 demo/src/main/webapp/js/ng-file-upload-all.js
  28. +2 −0 demo/src/main/webapp/js/ng-file-upload-all.min.js
  29. +423 −0 demo/src/main/webapp/js/ng-file-upload-shim.js
  30. +2 −0 demo/src/main/webapp/js/ng-file-upload-shim.min.js
  31. +735 −0 demo/src/main/webapp/js/ng-file-upload.js
  32. +2 −0 demo/src/main/webapp/js/ng-file-upload.min.js
  33. +230 −0 demo/src/main/webapp/js/upload.js
  34. +0 −1 demo/war/.idea/.name
  35. +0 −14 demo/war/.idea/misc.xml
  36. +0 −8 demo/war/.idea/modules.xml
  37. +0 −6 demo/war/.idea/vcs.xml
  38. +0 −8 demo/war/.idea/war.iml
  39. +0 −519 demo/war/.idea/workspace.xml
  40. +0 −203 demo/war/index.html
  41. +0 −3 demo/war/js/FileAPI.min.js
  42. +0 −1,015 demo/war/js/ng-file-upload-all.js
  43. +0 −377 demo/war/js/ng-file-upload-shim.js
  44. +0 −664 demo/war/js/ng-file-upload.js
  45. +0 −221 demo/war/js/upload.js
  46. +6 −3 dist/FileAPI.min.js
  47. +1,029 −879 dist/ng-file-upload-all.js
  48. +2 −2 dist/ng-file-upload-all.min.js
  49. +392 −346 dist/ng-file-upload-shim.js
  50. +2 −2 dist/ng-file-upload-shim.min.js
  51. +628 −524 dist/ng-file-upload.js
  52. +2 −2 dist/ng-file-upload.min.js
  53. +1 −1 nuget/Package.nuspec
  54. +12 −8 package.json
  55. +1 −1 release.sh
  56. BIN src/FileAPI.flash.swf
  57. +4,308 −0 src/FileAPI.js
  58. +267 −0 src/drop.js
  59. +262 −0 src/select.js
  60. +144 −0 src/shim-elem.js
  61. +61 −0 src/shim-filereader.js
  62. +216 −0 src/shim-upload.js
  63. +204 −0 src/upload.js
  64. +3 −0 test/.bowerrc
  65. +9 −0 test/bower.json
  66. +26 −0 test/index.html
  67. +13 −0 test/spec/test.js
View
@@ -1,3 +1,7 @@
+node_modules
+dist
+.tmp
+bower_components
.settings
.metadata
*.war
@@ -8,11 +12,12 @@ ehthumbs.db
Thumbs.db
.Spotlight-V100
.Trashes
-/target/*
classes/
._*
-/node_modules
*.jar
release-local.sh
npm-debug.log
-/.idea
+.idea/
+target/
+*.iml
+
View
@@ -0,0 +1,29 @@
+{
+ "node": true,
+ "browser": true,
+ "esnext": true,
+ "camelcase": true,
+ "curly": false,
+ "eqeqeq": true,
+ "eqnull": true,
+ "immed": true,
+ "indent": 4,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "quotmark": "single",
+ "undef": true,
+ "unused": true,
+ "trailing": true,
+ "smarttabs": true,
+ "jquery": true,
+ "evil": true,
+ "globals": {
+ "angular":false,
+ "FileAPI":false,
+ "ngFileUpload":true,
+ "FormData":true,
+ "Blob":true,
+ "ActiveXObject":false
+ }
+}
View
@@ -1,108 +1,129 @@
-module.exports = function(grunt) {
- grunt.initConfig({
- pkg : grunt.file.readJSON('package.json'),
+'use strict';
- copy : {
- build : {
- options : {
- processContent : function(content, srcpath) {
- return grunt.template.process(content);
- }
- },
- files : [ {
- expand : true,
- cwd : 'demo/war/js/',
- src : 'ng-file-upload*.js',
- dest : 'dist/',
- flatten : true,
- filter : 'isFile'
- }]
- },
- fileapi: {
- files: [{
- expand : true,
- cwd : 'demo/war/js/',
- src : 'FileAPI.flash.swf',
- dest : 'dist/',
- flatten : true,
- filter : 'isFile'
- }, {
- expand : true,
- cwd : 'demo/war/js/',
- src : 'FileAPI.js',
- dest : 'dist/',
- flatten : true,
- filter : 'isFile'
- } ]
- },
- bower : {
- files : [ {
- expand : true,
- cwd : 'dist/',
- src : '*',
- dest : '../angular-file-upload-bower/',
- flatten : true,
- filter : 'isFile'
- }, {
- expand : true,
- cwd : 'dist/',
- src : '*',
- dest : '../angular-file-upload-shim-bower/',
- flatten : true,
- filter : 'isFile'
- } ]
- }
- },
- concat: {
- dist: {
- options: {
- process: function(content, srcpath) {
- return grunt.template.process(content);
- }
- },
- files: {
- 'demo/war/js/ng-file-upload-all.js':
- ['demo/war/js/ng-file-upload.js',
- 'demo/war/js/ng-file-upload-shim.js']
- }
- }
- },
- uglify : {
- options : {
- banner : '/*! <%= pkg.version %> */\n'
- },
- build : {
- files : [ {
- 'dist/ng-file-upload.min.js' : 'dist/ng-file-upload.js',
- 'dist/ng-file-upload-shim.min.js' : 'dist/ng-file-upload-shim.js',
- 'dist/ng-file-upload-all.min.js' : 'dist/ng-file-upload-all.js',
- 'dist/FileAPI.min.js' : 'dist/FileAPI.js',
- 'demo/war/js/FileAPI.min.js' : 'demo/war/js/FileAPI.js'
- } ]
- }
- },
- replace : {
- version : {
- src: ['nuget/Package.nuspec', '../angular-file-upload-bower/bower.json',
- '../angular-file-upload-shim-bower/bower.json'
- ],
- overwrite: true,
- replacements: [{
- from: /"version" *: *".*"/g,
- to: '"version": "<%= pkg.version %>"'
- }, {
- from: /<version>.*<\/version>/g,
- to: '<version><%= pkg.version %></version>'
- }]
- }
- }
- });
+module.exports = function (grunt) {
+ // Load grunt tasks automatically
+ require('load-grunt-tasks')(grunt);
- grunt.loadNpmTasks('grunt-contrib-copy');
- grunt.loadNpmTasks('grunt-contrib-uglify');
- grunt.loadNpmTasks('grunt-text-replace');
- grunt.loadNpmTasks('grunt-contrib-concat');
+ grunt.initConfig({
+ pkg: grunt.file.readJSON('package.json'),
+ concat: {
+ all: {
+ options: {
+ process: function (content) {
+ return grunt.template.process(content);
+ }
+ },
+ files: {
+ 'dist/ng-file-upload.js': ['src/upload.js', 'src/select.js', 'src/drop.js'],
+ 'dist/ng-file-upload-shim.js': ['src/shim-upload.js', 'src/shim-elem.js', 'src/shim-filereader.js'],
+ 'dist/ng-file-upload-all.js': ['dist/ng-file-upload.js', 'dist/ng-file-upload-shim.js']
+ }
+ }
+ },
+ uglify: {
+ options: {
+ preserveComments: 'some',
+ banner: '/*! <%= pkg.version %> */\n'
+ },
- grunt.registerTask('default', [ 'concat:dist', 'copy:build', 'copy:fileapi', 'uglify', 'copy:bower', 'replace:version' ]);
+ build: {
+ files: [{
+ 'dist/ng-file-upload.min.js': 'dist/ng-file-upload.js',
+ 'dist/ng-file-upload-shim.min.js': 'dist/ng-file-upload-shim.js',
+ 'dist/ng-file-upload-all.min.js': 'dist/ng-file-upload-all.js',
+ 'dist/FileAPI.min.js': 'dist/FileAPI.js'
+ }]
+ }
+ },
+ copy: {
+ build: {
+ files: [{
+ expand: true,
+ cwd: 'dist/',
+ src: '*',
+ dest: 'demo/src/main/webapp/js/',
+ flatten: true,
+ filter: 'isFile'
+ }]
+ },
+ fileapi: {
+ files: {
+ 'dist/FileAPI.flash.swf': 'src/FileAPI.flash.swf',
+ 'dist/FileAPI.js': 'src/FileAPI.js'
+ }
+ },
+ bower: {
+ files: [{
+ expand: true,
+ cwd: 'dist/',
+ src: '*',
+ dest: '../angular-file-upload-bower/',
+ flatten: true,
+ filter: 'isFile'
+ }, {
+ expand: true,
+ cwd: 'dist/',
+ src: '*',
+ dest: '../angular-file-upload-shim-bower/',
+ flatten: true,
+ filter: 'isFile'
+ }]
+ }
+ },
+ serve: {
+ options: {
+ port: 9000
+ },
+ 'path': 'demo/src/main/webapp'
+ },
+ watch: {
+ js: {
+ files: ['src/{,*/}*.js'],
+ tasks: ['jshint:all', 'concat:all', 'uglify', 'copy:build']
+ }
+ },
+ jshint: {
+ options: {
+ jshintrc: '.jshintrc',
+ reporter: require('jshint-stylish')
+ },
+ all: [
+ 'Gruntfile.js',
+ 'src/{,*/}*.js',
+ '!src/FileAPI*.*',
+ 'test/spec/{,*/}*.js'
+ ]
+ },
+ replace: {
+ version: {
+ src: ['nuget/Package.nuspec', '../angular-file-upload-bower/bower.json',
+ '../angular-file-upload-shim-bower/bower.json'
+ ],
+ overwrite: true,
+ replacements: [{
+ from: /"version" *: *".*"/g,
+ to: '"version": "<%= pkg.version %>"'
+ }, {
+ from: /<version>.*<\/version>/g,
+ to: '<version><%= pkg.version %></version>'
+ }]
+ }
+ },
+ clean: {
+ dist: {
+ files: [{
+ dot: true,
+ src: [
+ 'dist',
+ '!dist/.git*'
+ ]
+ }]
+ }
+ }
+ });
+
+ grunt.registerTask('dev', ['jshint:all', 'concat:all', 'uglify', 'copy:build', 'watch']);
+ grunt.registerTask('default', ['jshint:all', 'clean:dist', 'concat:all',
+ 'copy:fileapi', 'uglify', 'copy:build', 'copy:bower', 'replace:version']);
};
View
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<buildpath>
- <buildpathentry kind="src" path="src"/>
- <buildpathentry kind="con" path="org.eclipse.dltk.mod.launching.INTERPRETER_CONTAINER"/>
- <buildpathentry kind="con" path="org.eclipse.vjet.eclipse.core.JSNATIVE_CONTAINER/JS Native Types"/>
- <buildpathentry kind="con" path="org.eclipse.vjet.eclipse.core.BROWSER_CONTAINER/Browser SDK"/>
- <buildpathentry external="true" kind="lib" path="/Applications/eclipse-luna/plugins/com.google.appengine.eclipse.sdkbundle_1.9.10/appengine-java-sdk-1.9.10/lib/shared/appengine-local-runtime-shared.jar"/>
- <buildpathentry external="true" kind="lib" path="/Applications/eclipse-luna/plugins/com.google.appengine.eclipse.sdkbundle_1.9.10/appengine-java-sdk-1.9.10/lib/opt/user/appengine-api-labs/v1/appengine-api-labs.jar"/>
-</buildpath>
View
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="lib" path="war/WEB-INF/lib/commons-fileupload-1.3.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="com.google.appengine.eclipse.core.GAE_CONTAINER/App Engine (4)"/>
- <classpathentry kind="output" path="war/WEB-INF/classes"/>
-</classpath>
View
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>angular-file-upload</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.vjet.eclipse.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.google.appengine.eclipse.core.gaeProjectChangeNotifier</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.google.appengine.eclipse.core.projectValidator</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.google.appengine.eclipse.core.enhancerbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.vjet.core.nature</nature>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>com.google.appengine.eclipse.core.gaeNature</nature>
- </natures>
-</projectDescription>
Oops, something went wrong.

0 comments on commit 39fa784

Please sign in to comment.