~ubuntu-branches/ubuntu/utopic/moodle/utopic

« back to all changes in this revision

Viewing changes to lib/yuilib/3.9.1/build/uploader/uploader.js

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (36.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140512161038-puyqf65k4e0s8ytz
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* YUI 3.9.1 (build 5852) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */
2
 
YUI.add('uploader', function (Y, NAME) {
3
 
 
4
 
/**
5
 
* Provides UI for selecting multiple files and functionality for
6
 
* uploading multiple files to the server with support for either
7
 
* html5 or Flash transport mechanisms, automatic queue management,
8
 
* upload progress monitoring, and error events.
9
 
* @module uploader
10
 
* @main uploader
11
 
* @since 3.5.0
12
 
*/
13
 
 
14
 
/**
15
 
* `Y.Uploader` serves as an alias for either <a href="UploaderFlash.html">`Y.UploaderFlash`</a>
16
 
* or <a href="UploaderHTML5.html">`Y.UploaderHTML5`</a>, depending on the feature set available
17
 
* in a specific browser. If neither HTML5 nor Flash transport layers are available, `Y.Uploader.TYPE`
18
 
* static property is set to `"none"`.
19
 
*
20
 
* @class Uploader
21
 
*/
22
 
 
23
 
/**
24
 
* The static property reflecting the type of uploader that `Y.Uploader`
25
 
* aliases. The possible values are:
26
 
* <ul>
27
 
* <li><strong>`"html5"`</strong>: Y.Uploader is an alias for <a href="UploaderHTML5.html">Y.UploaderHTML5</a></li>
28
 
* <li><strong>`"flash"`</strong>: Y.Uploader is an alias for <a href="UploaderFlash.html">Y.UploaderFlash</a></li>
29
 
* <li><strong>`"none"`</strong>: Neither Flash not HTML5 are available, and Y.Uploader does
30
 
* not reference an actual implementation.</li>
31
 
* </ul>
32
 
*
33
 
* @property TYPE
34
 
* @type {String}
35
 
* @static
36
 
*/
37
 
 
38
 
var Win = Y.config.win;
39
 
 
40
 
if (Win && Win.File && Win.FormData && Win.XMLHttpRequest) {
41
 
    Y.Uploader = Y.UploaderHTML5;
42
 
}
43
 
 
44
 
else if (Y.SWFDetect.isFlashVersionAtLeast(10,0,45)) {
45
 
    Y.Uploader = Y.UploaderFlash;
46
 
}
47
 
 
48
 
else {
49
 
    Y.namespace("Uploader");
50
 
    Y.Uploader.TYPE = "none";
51
 
}
52
 
 
53
 
}, '3.9.1', {"requires": ["uploader-html5", "uploader-flash"]});