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
# Conflicts:
#	client/js/version.js
  • Loading branch information
rnicholus committed Feb 17, 2017
2 parents e7930e7 + e3e90b8 commit 9bc3dc3
Show file tree
Hide file tree
Showing 16 changed files with 3,796 additions and 58 deletions.
6 changes: 0 additions & 6 deletions .github/CONTRIBUTING.md

This file was deleted.

62 changes: 45 additions & 17 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,67 @@
## Type of issue [REQUIRED]
{Choose one: "bug" or "feature request"}
## Type of issue
- [ ] Bug report
- [ ] Feature request
- [ ] Support request

## Uploader type [REQUIRED]
{Choose at least one: "traditional", "S3", "Azure"}
## Uploader type
- [ ] Traditional
- [ ] S3
- [ ] Azure


## Bug details [DELETE EVERYTHING IN THIS SECTION IF THIS IS A FEATURE REQUEST]

### Fine Uploader version [REQUIRED]

<details>
<summary>Bug Report</summary>

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

### Browsers where the bug is reproducible [REQUIRED]
#### Browsers where the bug is reproducible
{example: "Firefox" and "IE11"}

### Operating systems where the bug is reproducible [REQUIRED]
{example: "iOS 9.1.0" and "Windows 8.1"
#### Operating systems where the bug is reproducible
{example: "iOS 9.1.0" and "Windows 8.1"}

### Exact steps required to reproduce the issue [REQUIRED]
#### Exact steps required to reproduce the issue
For example:
1. Select 3 files
2. Pause the 2nd file before it completes, but after it has started.
3. Attempt to resume the paused file.

### All of your Fine Uploader initialization JavaScript code [REQUIRED]
#### All relevant Fine Uploader-related code that you have written
{simply copy and paste the JS used to control Fine Uploader browsers-ide}
{also include your template HTML if related to a UI issue}

### Your Fine Uploader template markup (if using Fine Uploader UI and the issue is UI-related)
#### Your Fine Uploader template markup (if using Fine Uploader UI and the issue is UI-related)
{simply copy and paste your template markup}

### Detailed explanation of the problem [REQUIRED]
{please describe the bug here}
#### Detailed explanation of the problem
{describe the bug here}
</details>




<details>
<summary>Feature Request</summary>

#### Feature request details
{why is this feature important, not just for you, but for many others?}
</details>

## Feature request details [DELETE EVERYTHING IN THIS SECTION IF THIS IS A BUG REPORT]

### Detailed description of the feature
{also include why this feature is necessary and what problems it solves}


<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>
14 changes: 5 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
## Brief description of the changes [REQUIRED]
{also describe what problem(s) these changes solve}
## Brief description of the changes
{also describe what problem(s) these changes solve & reference any related issues/PRs}


## What browsers and operating systems have you tested these changes on? [REQUIRED]
## What browsers and operating systems have you tested these changes on?
{example: Safari on iOS 9.1.0 and IE11 on Windows 8.1}


## Are all automated tests passing? [REQUIRED]
{Choose one: "yes" or "no". If "no", then why not?}


## Is this pull request against develop or some other non-master branch? [REQUIRED]
{Choose one: "yes" or "no". If "no", then why not?}
## Have you written unit tests? If not, explain why.
{unit tests should accompany almost all PRs, unless the change is to documentation}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ bin/
src

npm-debug.log
Vagrantfile

test/dev/handlers/s3/composer.lock
test/dev/handlers/traditional/files
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ version=$(shell node -pe "require('./package.json').version")
dist-out-dir = _dist
pub-dir = $(dist-out-dir)/$(version)

npm-bin = $(shell npm bin)

# properly get npm-bin in cygwin (Eg. CYGWIN_NT-10.0)
platform = $(shell uname -s)
ifeq ($(findstring _NT,$(platform)),_NT)
npm-bin = $(shell cygpath -u $(shell npm bin))
else
npm-bin = $(shell npm bin)
endif

build-out-dir = _build
src-dir = client
Expand Down Expand Up @@ -357,6 +364,7 @@ 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)/typescript $(pub-dir)/

copy-build-to-dist:
mkdir -p $(pub-dir)/$(PUB-SUBDIR)
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
[![Build Status](https://travis-ci.org/FineUploader/fine-uploader.svg?branch=master)](https://travis-ci.org/FineUploader/fine-uploader)
[![npm](https://img.shields.io/npm/v/fine-uploader.svg)](https://www.npmjs.com/package/fine-uploader)
[![license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)
[![Stackoverflow](https://img.shields.io/badge/ask-on%20stack%20overflow-brightgreen.svg)](http://stackoverflow.com/questions/tagged/fine-uploader)
[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/fineuploader.svg?style=social&label=Follow%20%40FineUploader)](https://twitter.com/fineuploader)

[**Documentation**](http://docs.fineuploader.com) |
[**Examples**](http://fineuploader.com/demos) |
[**Support**](http://fineuploader.com/support.html) |
[**Support**](../../issues) |
[**Blog**](http://blog.fineuploader.com/) |
[**Changelog**](../../releases)

Expand Down
80 changes: 64 additions & 16 deletions client/js/uploader.basic.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@
return false;
},

removeFileRef: function(id) {
this._handler.expunge(id);
},

reset: function() {
this.log("Resetting uploader...");

Expand Down Expand Up @@ -393,6 +397,35 @@
return this._uploadData.uuidChanged(id, newUuid);
},

/**
* Expose the internal status of a file id to the public api for manual state changes
* @public
*
* @param {Number} id,
* @param {String} newStatus
*
* @todo Implement the remaining methods
*/
setStatus: function(id, newStatus) {
var fileRecord = this.getUploads({id: id});
if (!fileRecord) {
throw new qq.Error(id + " is not a valid file ID.");
}

switch (newStatus) {
case qq.status.DELETED:
this._onDeleteComplete(id, null, false);
break;
case qq.status.DELETE_FAILED:
this._onDeleteComplete(id, null, true);
break;
default:
var errorMessage = "Method setStatus called on '" + name + "' not implemented yet for " + newStatus;
this.log(errorMessage);
throw new qq.Error(errorMessage);
}
},

uploadStoredFiles: function() {
if (this._storedIds.length === 0) {
this._itemError("noFilesError");
Expand Down Expand Up @@ -1063,6 +1096,35 @@
});
},

_handleDeleteSuccess: function(id) {
if (this.getUploads({id: id}).status !== qq.status.DELETED) {
var name = this.getName(id);

this._netUploadedOrQueued--;
this._netUploaded--;
this._handler.expunge(id);
this._uploadData.setStatus(id, qq.status.DELETED);
this.log("Delete request for '" + name + "' has succeeded.");
}
},

_handleDeleteFailed: function(id, xhrOrXdr) {
var name = this.getName(id);

this._uploadData.setStatus(id, qq.status.DELETE_FAILED);
this.log("Delete request for '" + name + "' has failed.", "error");

// Check first if xhrOrXdr is actually passed or valid
// For error reporting, we only have access to the response status if this is not
// an `XDomainRequest`.
if (!xhrOrXdr || xhrOrXdr.withCredentials === undefined) {
this._options.callbacks.onError(id, name, "Delete request failed", xhrOrXdr);
}
else {
this._options.callbacks.onError(id, name, "Delete request failed with response code " + xhrOrXdr.status, xhrOrXdr);
}
},

// Creates an extra button element
_initExtraButton: function(spec) {
var button = this._createUploadButton({
Expand Down Expand Up @@ -1416,24 +1478,10 @@
var name = this.getName(id);

if (isError) {
this._uploadData.setStatus(id, qq.status.DELETE_FAILED);
this.log("Delete request for '" + name + "' has failed.", "error");

// For error reporting, we only have access to the response status if this is not
// an `XDomainRequest`.
if (xhrOrXdr.withCredentials === undefined) {
this._options.callbacks.onError(id, name, "Delete request failed", xhrOrXdr);
}
else {
this._options.callbacks.onError(id, name, "Delete request failed with response code " + xhrOrXdr.status, xhrOrXdr);
}
this._handleDeleteFailed(id, xhrOrXdr);
}
else {
this._netUploadedOrQueued--;
this._netUploaded--;
this._handler.expunge(id);
this._uploadData.setStatus(id, qq.status.DELETED);
this.log("Delete request for '" + name + "' has succeeded.");
this._handleDeleteSuccess(id);
}
},

Expand Down
2 changes: 1 addition & 1 deletion client/js/version.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/*global qq */
qq.version = "5.13.0";
qq.version = "5.14.0";
Loading

0 comments on commit 9bc3dc3

Please sign in to comment.