Skip to content

Commit

Permalink
fixed form
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Wilson committed Apr 27, 2013
1 parent 6e419b0 commit 48744ac
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngUpload",
"version": "0.3.3",
"version": "0.3.4",
"main": "ng-upload.js",
"ignore": [
"**/.*",
Expand Down
5 changes: 3 additions & 2 deletions examples/nodejs/libs/js/ng-upload.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Version 0.3.2
// Version 0.3.3
// AngularJS simple file upload directive
// this directive uses an iframe as a target
// to enable the uploading of files without
Expand Down Expand Up @@ -38,7 +38,7 @@ angular.module('ngUpload', [])
options.enableControls = attrs.uploadOptionsEnableControls;

// submit the form - requires jQuery
var form = angular.element(element.parents('form[ng-upload]')) || angular.element(element.parents('form.ng-upload'));
var form = angular.element(element).parents('form');

// Retrieve the callback function
var fn = $parse(attrs.uploadSubmit);
Expand All @@ -49,6 +49,7 @@ angular.module('ngUpload', [])
}

element.bind('click', function($event) {

// prevent default behavior of click
if ($event) {
$event.preventDefault = true;
Expand Down
4 changes: 2 additions & 2 deletions ng-upload.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Version 0.3.2
// Version 0.3.4
// AngularJS simple file upload directive
// this directive uses an iframe as a target
// to enable the uploading of files without
Expand Down Expand Up @@ -38,7 +38,7 @@ angular.module('ngUpload', [])
options.enableControls = attrs.uploadOptionsEnableControls;

// submit the form - requires jQuery
var form = angular.element(element.parents('form[ng-upload]')) || angular.element(element.parents('form.ng-upload'));
var form = angular.element(element).parents('form');

// Retrieve the callback function
var fn = $parse(attrs.uploadSubmit);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngUpload",
"version": "0.3.3",
"version": "0.3.4",
"description": "An AngularJS Upload File Directive",
"main": "index.js",
"directories": {
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ please use the following style guidelines
## Contributors

* ADEBISI Foluso A. (https://github.com/adebisi-fa)
* Hassan Alqaraguli (https://github.com/HassanAlqaraguli)

## Thanks

Expand Down

0 comments on commit 48744ac

Please sign in to comment.