Skip to content

Commit

Permalink
Release v2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AidasK committed Apr 29, 2014
1 parent 810e41a commit 1f69808
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-flow",
"version": "2.3.2",
"version": "2.4.0",
"ignore": [
"**/.*",
"test",
Expand Down
17 changes: 12 additions & 5 deletions dist/ng-flow-standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,12 @@
* @param {Element|Array.<Element>} domNodes
* @param {boolean} isDirectory Pass in true to allow directories to
* @param {boolean} singleFile prevent multi file upload
* @param {Object} attributes set custom attributes:
* http://www.w3.org/TR/html-markup/input.file.html#input.file-attributes
* eg: accept: 'image/*'
* be selected (Chrome only).
*/
assignBrowse: function (domNodes, isDirectory, singleFile) {
assignBrowse: function (domNodes, isDirectory, singleFile, attributes) {
if (typeof domNodes.length === 'undefined') {
domNodes = [domNodes];
}
Expand Down Expand Up @@ -379,6 +382,9 @@
if (isDirectory) {
input.setAttribute('webkitdirectory', 'webkitdirectory');
}
each(attributes, function (value, key) {
input.setAttribute(key, value);
});
// When new files are added, simply append them to the overall list
var $ = this;
input.addEventListener('change', function (e) {
Expand Down Expand Up @@ -1210,8 +1216,8 @@
if (typeof preprocess === 'function') {
switch (this.preprocessState) {
case 0:
preprocess(this);
this.preprocessState = 1;
preprocess(this);
return;
case 1:
return;
Expand Down Expand Up @@ -1367,7 +1373,7 @@
data.append(this.flowObj.opts.fileParameterName, blob);
}

this.xhr.open(method, target);
this.xhr.open(method, target, true);
this.xhr.withCredentials = this.flowObj.opts.withCredentials;

// Add data from header options
Expand Down Expand Up @@ -1465,7 +1471,7 @@
* Library version
* @type {string}
*/
Flow.version = '2.4.0';
Flow.version = '2.5.0';

if ( typeof module === "object" && module && typeof module.exports === "object" ) {
// Expose Flow as module.exports in loaders that implement the Node
Expand Down Expand Up @@ -1596,7 +1602,8 @@ angular.module('flow.btn', ['flow.init'])
'link': function(scope, element, attrs) {
var isDirectory = attrs.hasOwnProperty('flowDirectory');
var isSingleFile = attrs.hasOwnProperty('flowSingleFile');
scope.$flow.assignBrowse(element, isDirectory, isSingleFile);
var inputAttrs = attrs.hasOwnProperty('flowAttrs') && scope.$eval(attrs.flowAttrs);
scope.$flow.assignBrowse(element, isDirectory, isSingleFile, inputAttrs);
}
};
}]);
Expand Down
4 changes: 2 additions & 2 deletions dist/ng-flow-standalone.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/ng-flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ angular.module('flow.btn', ['flow.init'])
'link': function(scope, element, attrs) {
var isDirectory = attrs.hasOwnProperty('flowDirectory');
var isSingleFile = attrs.hasOwnProperty('flowSingleFile');
scope.$flow.assignBrowse(element, isDirectory, isSingleFile);
var inputAttrs = attrs.hasOwnProperty('flowAttrs') && scope.$eval(attrs.flowAttrs);
scope.$flow.assignBrowse(element, isDirectory, isSingleFile, inputAttrs);
}
};
}]);
Expand Down
4 changes: 2 additions & 2 deletions dist/ng-flow.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-flow",
"version": "2.3.2",
"version": "2.4.0",
"description": "Flow.js html5 file upload extension on angular.js framework",
"scripts": {
"test": "grunt test"
Expand Down

0 comments on commit 1f69808

Please sign in to comment.