Skip to content

Commit

Permalink
Refactored last merge to fix HTML5 data-attributes handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
blueimp committed Feb 12, 2014
1 parent 592c73f commit 0f386a9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion blueimp-file-upload.jquery.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blueimp-file-upload",
"version": "9.5.5",
"version": "9.5.6",
"title": "jQuery File Upload",
"author": {
"name": "Sebastian Tschan",
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blueimp-file-upload",
"version": "9.5.5",
"version": "9.5.6",
"title": "jQuery File Upload",
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.",
"keywords": [
Expand Down
11 changes: 7 additions & 4 deletions js/jquery.fileupload.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery File Upload Plugin 5.40.0
* jQuery File Upload Plugin 5.40.1
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
Expand Down Expand Up @@ -1307,13 +1307,16 @@

_initDataAttributes: function () {
var that = this,
options = this.options;
options = this.options,
clone = $(this.element[0].cloneNode(false));
// Initialize options set via HTML5 data-attributes:
var clone = $(this.element[0].cloneNode(false));
$.each(
clone.data(),
function (key, value) {
if (clone[0].getAttribute('data-'+key)) {
var dataAttributeName = 'data-' +
// Convert camelCase to hyphen-ated key:
key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
if (clone.attr(dataAttributeName)) {
if (that._isRegExpOption(key, value)) {
value = that._getRegExp(value);
}
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": "blueimp-file-upload",
"version": "9.5.5",
"version": "9.5.6",
"title": "jQuery File Upload",
"description": "File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.",
"keywords": [
Expand Down

0 comments on commit 0f386a9

Please sign in to comment.