Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

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