Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
rnicholus committed Nov 8, 2017
2 parents 868f4a8 + a3eaa77 commit e6ae625
Show file tree
Hide file tree
Showing 9 changed files with 401 additions and 36 deletions.
19 changes: 1 addition & 18 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
## Type of issue
- [ ] Bug report
- [ ] Feature request
- [ ] Support request

## Uploader type
- [ ] Traditional
- [ ] S3
- [ ] Azure


### Note: Support requests cannot be accepted due to lack of time.


<details>
Expand Down Expand Up @@ -49,19 +48,3 @@ For example:
#### Feature request details
{why is this feature important, not just for you, but for many others?}
</details>




<details>
<summary>Support Request</summary>

#### Fine Uploader version
{example: 5.5.1}

#### Question
{ask your support question here & be as detailed and clear as possible}

#### Related code
{post any code related to your question here}
</details>
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ zip-all:
setup-dist:
mkdir -p $(pub-dir)
cp LICENSE README.md package.json $(pub-dir)
cp -pR $(src-dir)/commonjs/ $(pub-dir)/lib/
cp -pR $(src-dir)/commonJs/ $(pub-dir)/lib/
cp -pR $(src-dir)/typescript $(pub-dir)/

copy-build-to-dist:
Expand Down
17 changes: 13 additions & 4 deletions client/js/dnd.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,10 @@ qq.DragAndDrop = function(o) {
});

disposeSupport.attach(document, "drop", function(e) {
e.preventDefault();
maybeHideDropZones();
if (isFileDrag(e)) {
e.preventDefault();
maybeHideDropZones();
}
});

disposeSupport.attach(document, HIDE_ZONES_EVENT_NAME, maybeHideDropZones);
Expand Down Expand Up @@ -379,12 +381,16 @@ qq.UploadDropZone = function(o) {
isSafari = qq.safari();

// dt.effectAllowed is none in Safari 5
// dt.types.contains check is for firefox

// dt.effectAllowed crashes IE 11 & 10 when files have been dragged from
// the filesystem
effectTest = qq.ie() && qq.supportedFeatures.fileDrop ? true : dt.effectAllowed !== "none";
return dt && effectTest && (dt.files || (!isSafari && dt.types.contains && dt.types.contains("Files")));
return dt && effectTest &&
(
(dt.files && dt.files.length) || // Valid for drop events with files
(!isSafari && dt.types.contains && dt.types.contains("Files")) || // Valid in Chrome/Firefox
(dt.types.includes && dt.types.includes("Files")) // Valid in IE
);
}

function isOrSetDropDisabled(isDisabled) {
Expand Down Expand Up @@ -492,4 +498,7 @@ qq.UploadDropZone = function(o) {
return element;
}
});

this._testing = {};
this._testing.isValidFileDrag = isValidFileDrag;
};
2 changes: 2 additions & 0 deletions client/js/s3/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ qq.s3.util = qq.s3.util || (function() {
"Content-Disposition",
"Content-Encoding",
"Content-MD5",
"x-amz-server-side-encryption",
"x-amz-server-side-encryption-aws-kms-key-id",
"x-amz-server-side-encryption-customer-algorithm",
"x-amz-server-side-encryption-customer-key",
"x-amz-server-side-encryption-customer-key-MD5"
Expand Down
16 changes: 8 additions & 8 deletions client/js/templating.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ qq.Templating = function(spec) {
log,
isEditElementsExist,
isRetryElementExist,
templateHtml,
templateDom,
container,
fileList,
showThumbnails,
Expand Down Expand Up @@ -341,7 +341,7 @@ qq.Templating = function(spec) {
scriptHtml,
fileListNode,
tempTemplateEl,
fileListHtml,
fileListEl,
defaultButton,
dropArea,
thumbnail,
Expand Down Expand Up @@ -452,7 +452,7 @@ qq.Templating = function(spec) {
throw new Error("Could not find the file list container in the template!");
}

fileListHtml = fileListNode.innerHTML;
fileListEl = fileListNode.children[0].cloneNode(true);
fileListNode.innerHTML = "";

// We must call `createElement` in IE8 in order to target and hide any <dialog> via CSS
Expand All @@ -463,8 +463,8 @@ qq.Templating = function(spec) {
log("Template parsing complete");

return {
template: qq.trimStr(tempTemplateEl.innerHTML),
fileTemplate: qq.trimStr(fileListHtml)
template: tempTemplateEl,
fileTemplate: fileListEl
};
},

Expand Down Expand Up @@ -625,7 +625,7 @@ qq.Templating = function(spec) {

container = options.containerEl;
showThumbnails = options.imageGenerator !== undefined;
templateHtml = parseAndGetTemplate();
templateDom = parseAndGetTemplate();

cacheThumbnailPlaceholders();

Expand All @@ -635,7 +635,7 @@ qq.Templating = function(spec) {

generatedThumbnails = 0;

container.innerHTML = templateHtml.template;
container.appendChild(templateDom.template.cloneNode(true));
hide(getDropProcessing());
this.hideTotalProgress();
fileList = options.fileContainerEl || getTemplateEl(container, selectorClasses.list);
Expand All @@ -662,7 +662,7 @@ qq.Templating = function(spec) {
},

addFile: function(id, name, prependInfo, hideForever, batch) {
var fileEl = qq.toElement(templateHtml.fileTemplate),
var fileEl = templateDom.fileTemplate.cloneNode(true),
fileNameEl = getTemplateEl(fileEl, selectorClasses.file),
uploaderEl = getTemplateEl(container, selectorClasses.uploader),
fileContainer = batch ? fileBatch.content : fileList,
Expand Down
2 changes: 2 additions & 0 deletions docs/features/s3.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ following "special" headers:
* Content-Disposition
* Content-Encoding
* Content-MD5
* x-amz-server-side-encryption-aws-kms-key-id
* x-amz-server-side-encryption
* x-amz-server-side-encryption-customer-algorithm
* x-amz-server-side-encryption-customer-key
* x-amz-server-side-encryption-customer-key-MD5
Expand Down
10 changes: 5 additions & 5 deletions docs/quickstart/01-getting-started.jmd
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ Remember, when using the "core" build, you will need to build your own UI and up
<script>
// Some options to pass to the uploader are discussed on the next page
var uploader = new qq.s3.FineUploader({
element: getElementById("uploader")
element: document.getElementById("uploader")
})
</script>
</body>
Expand Down Expand Up @@ -648,7 +648,7 @@ Remember, when using the "core" build, you will need to build your own UI and up
<script>
// Some options to pass to the uploader are discussed on the next page
var uploader = new qq.azure.FineUploader({
element: getElementById("uploader")
element: document.getElementById("uploader")
})
</script>
</body>
Expand Down Expand Up @@ -786,19 +786,19 @@ Remember, when using the "core" build, you will need to build your own UI and up
// For a traditional endpoint instance:
// Some options to pass to the uploader are discussed on the next page
var traditionalUploader = new qq.FineUploader({
element: getElementById("traditional-uploader")
element: document.getElementById("traditional-uploader")
})

// For an S3 endpoint instance:
// Some options to pass to the uploader are discussed on the next page
var s3Uploader = new qq.s3.FineUploader({
element: getElementById("s3-uploader")
element: document.getElementById("s3-uploader")
})

// For an Azure endpoint instance:
// Some options to pass to the uploader are discussed on the next page
var azureUploader = new qq.azure.FineUploader({
element: getElementById("azure-uploader")
element: document.getElementById("azure-uploader")
})
</script>
</body>
Expand Down
Loading

0 comments on commit e6ae625

Please sign in to comment.