Skip to content
This repository
Browse code

Plupload: Staighten comments a bit. Build: Add wiki building task.

  • Loading branch information...
commit 5cf650d50b7ca2f9cb62587772c7b966d63cb8b7 1 parent c213c39
Davit Barbakadze jayarjo authored
2  .gitignore
... ... @@ -1,10 +1,12 @@
1 1 js
2 2 examples/uploads/*
3 3 tmp
  4 +libs
4 5 jslint.xml
5 6 .settings
6 7 .project
7 8 docs
  9 +wiki
8 10 jscoverage
9 11 *~
10 12 *.diff
11 Jakefile.js
@@ -9,6 +9,8 @@ var yuidoc = tools.yuidoc;
9 9 var jshint = tools.jshint;
10 10 var zip = tools.zip;
11 11
  12 +var wiki = require('./build/wiki');
  13 +
12 14 function exit(message) {
13 15 if (message) {
14 16 console.info(message);
@@ -91,7 +93,14 @@ task("minifyjs", ["moxie"], function (params) {
91 93
92 94 desc("Generate documentation using YUIDoc");
93 95 task("yuidoc", [], function (params) {
94   - yuidoc("src", "docs");
  96 + yuidoc("src", "docs", {
  97 + norecurse: true
  98 + });
  99 +});
  100 +
  101 +desc("Generate wiki pages");
  102 +task("wiki", [], function() {
  103 + wiki("git@github.com:moxiecode/plupload.wiki.git", "wiki", "docs");
95 104 });
96 105
97 106 desc("Runs JSHint on source files");
78 build/utils.js
... ... @@ -0,0 +1,78 @@
  1 +
  2 +var extend = function(target) {
  3 + each(arguments, function(arg, i) {
  4 + if (i > 0) {
  5 + each(arg, function(value, key) {
  6 + if (value !== undefined) {
  7 + if (typeof(target[key]) === 'object' && typeof(value) === 'object') { // arrays also count
  8 + extend(target[key], value);
  9 + } else {
  10 + target[key] = value;
  11 + }
  12 + }
  13 + });
  14 + }
  15 + });
  16 + return target;
  17 +};
  18 +
  19 +var each = function(obj, callback) {
  20 + var length, key, i;
  21 +
  22 + if (obj) {
  23 + try {
  24 + length = obj.length;
  25 + } catch(ex) {
  26 + length = undefined;
  27 + }
  28 +
  29 + if (length === undefined) {
  30 + // Loop object items
  31 + for (key in obj) {
  32 + if (obj.hasOwnProperty(key)) {
  33 + if (callback(obj[key], key) === false) {
  34 + return;
  35 + }
  36 + }
  37 + }
  38 + } else {
  39 + // Loop array items
  40 + for (i = 0; i < length; i++) {
  41 + if (callback(obj[i], i) === false) {
  42 + return;
  43 + }
  44 + }
  45 + }
  46 + }
  47 +};
  48 +
  49 +var inSeries = function(queue, cb) {
  50 + var i = 0, length = queue.length;
  51 +
  52 + if (typeof(cb) !== 'function') {
  53 + cb = function() {};
  54 + }
  55 +
  56 + function callNext(i) {
  57 + if (typeof(queue[i]) === 'function') {
  58 + queue[i](function(error) {
  59 + ++i < length && !error ? callNext(i) : cb(error);
  60 + });
  61 + }
  62 + }
  63 + callNext(i);
  64 +};
  65 +
  66 +var color = function(s,c){return (color[c].toLowerCase()||'')+ s + color.reset;};
  67 +color.reset = '\033[39m';
  68 +color.red = '\033[31m';
  69 +color.yellow = '\033[33m';
  70 +color.green = '\033[32m';
  71 +
  72 +
  73 +module.exports = {
  74 + extend: extend,
  75 + each: each,
  76 + inSeries: inSeries,
  77 + color: color
  78 +};
186 build/wiki.js
... ... @@ -0,0 +1,186 @@
  1 +var fs = require("fs");
  2 +var utils = require("./utils");
  3 +
  4 +var wiki = function(githubRepo, dir, YUIDocDir) {
  5 +
  6 + function parseYUIDoc() {
  7 + var types = {
  8 + method: "## Methods\n\n",
  9 + property: "## Properties\n\n",
  10 + event: "## Events\n\n"
  11 + };
  12 +
  13 + var formatArguments = function(args, level) {
  14 + var result = !level ? "\n__Arguments__\n\n" : "";
  15 +
  16 + level = level || 0;
  17 +
  18 + utils.each(args, function(param) {
  19 + var name;
  20 + if (param.type) {
  21 + if (param.optional) {
  22 + name = param.optdefault ? "[" + param.name + "=" + param.optdefault + "]" : "[" + param.name + "]";
  23 + } else {
  24 + name = param.name;
  25 + }
  26 + // indent level times
  27 + for (var i = 0; i < level; i++) {
  28 + result += "\t";
  29 + }
  30 + // put it together finally
  31 + result += "* **" + name + "** _(" + param.type.replace(/\|/g, '/') + ")_ " + param.description + "\n";
  32 +
  33 + // if param has sub-properties
  34 + if (param.props) {
  35 + result += formatArguments(param.props, level + 1);
  36 + }
  37 + }
  38 + });
  39 + return result;
  40 + };
  41 +
  42 +
  43 + var formatItem = function(item) {
  44 + var delimiter = '\n---------------------------------------\n\n'
  45 + , codeUrl = "/" + githubRepo.replace(/^[\s\S]+?github\.com[:\/]([\s\S]+?)\.wiki[\s\S]+$/, '$1') + "/blob/master/"
  46 + , title = item.is_constructor ? '# '+item.name : '<a name="'+item.name+'" />\n### '+item.name
  47 + , line = '_Defined at: ['+item.file+':'+item.line+']('+codeUrl+item.file+'#L'+item.line+')_\n\n\n'
  48 + , description = item.description + "\n"
  49 + ;
  50 +
  51 + // add arguments listing if item is method
  52 + if (('method' === item.itemtype || item.is_constructor) && item.params) {
  53 + var titleArgs = [];
  54 + var args = "\n__Arguments__\n\n";
  55 + utils.each(item.params, function(param) {
  56 + var name;
  57 + if (param.type) {
  58 + if (param.optional) {
  59 + name = param.optdefault ? "[" + param.name + "=" + param.optdefault + "]" : "[" + param.name + "]";
  60 + } else {
  61 + name = param.name;
  62 + }
  63 + titleArgs.push(name);
  64 + args += "* **" + name + "** _(" + param.type.replace(/\|/g, '/') + ")_ " + param.description + "\n";
  65 +
  66 + // append sub-properties if any
  67 + if (param.props) {
  68 + args += formatArguments(param.props, 1);
  69 + }
  70 + }
  71 + });
  72 + // add arguments
  73 + title += "(" + (titleArgs.length ? titleArgs.join(", ") : "") + ")";
  74 + description += args;
  75 + }
  76 +
  77 + // add example
  78 + if (item.example) {
  79 + description += "\n__Examples__\n\n"
  80 + utils.each(item.example, function(example) {
  81 + var type = /<\w+>/.test(example) ? 'html' : 'javascript';
  82 + description += "```" + type + example.replace(/^\xA0+/, '') + "\n```\n";
  83 + });
  84 + }
  85 +
  86 + return title + "\n" + line + description + (!item.is_constructor ? delimiter : '\n');
  87 + };
  88 +
  89 + if (!fs.existsSync(dir) || !fs.existsSync(YUIDocDir + "/data.json")) {
  90 + console.info(YUIDocDir + "/data.json cannot be found.");
  91 + process.exit(1);
  92 + }
  93 +
  94 + var data = fs.readFileSync(YUIDocDir + "/data.json").toString();
  95 + if (data == '') {
  96 + console.info(YUIDocDir + "/data.json seems to be empty.");
  97 + process.exit(1);
  98 + }
  99 +
  100 + // read YUIDoc exported data in json
  101 + data = eval("("+data+")");
  102 +
  103 + // Clear previous versions
  104 + var apiDir = dir + "/API";
  105 + if (fs.existsSync(apiDir)) {
  106 + jake.rmRf(apiDir);
  107 + }
  108 + fs.mkdirSync(apiDir, 0755);
  109 +
  110 +
  111 + // generate TOC page
  112 + var toc = '## Table of Contents\n\n';
  113 + utils.each(data.classes, function(item) {
  114 + if (!item.access || item.access == 'public') {
  115 + toc += "* [[" + item.name + "|" + item.name + "]]\n";
  116 + }
  117 + });
  118 + fs.writeFileSync(apiDir + "/" + "API.md", toc);
  119 +
  120 + // generate pages
  121 + var pages = {};
  122 + utils.each(data.classitems, function(item) {
  123 + var className, page;
  124 +
  125 + // bypass private and protected
  126 + if (item.access && item.access != 'public') {
  127 + return true;
  128 + }
  129 +
  130 + if (!~['method', 'property', 'event'].indexOf(item.itemtype)) {
  131 + return true;
  132 + }
  133 +
  134 + className = item.class;
  135 +
  136 + if (!pages[className]) {
  137 + pages[className] = utils.extend({}, data.classes[className], {
  138 + toc: {
  139 + property: "",
  140 + method: "",
  141 + event: ""
  142 + },
  143 + content: {
  144 + property: "",
  145 + method: "",
  146 + event: ""
  147 + }
  148 + });
  149 + }
  150 + page = pages[className];
  151 +
  152 + // put a link in the TOC
  153 + page.toc[item.itemtype] += "* [%name%](#%name%)".replace(/%name%/g, item.name) + "\n";
  154 +
  155 + page.content[item.itemtype] += formatItem(item);
  156 + });
  157 +
  158 + utils.each(pages, function(page, name) {
  159 + var toc = "", body = "", header = "";
  160 +
  161 + header += formatItem(page);
  162 +
  163 + utils.each(["property", "method", "event"], function(type) {
  164 + if (page.toc[type] != "") {
  165 + toc += types[type] + page.toc[type] + "\n";
  166 + }
  167 +
  168 + if (page.content[type] != "") {
  169 + body += types[type] + page.content[type] + "\n";
  170 + }
  171 + });
  172 +
  173 + fs.writeFileSync(apiDir + "/" + name + ".md", header + toc + body);
  174 + });
  175 + }
  176 +
  177 + if (!fs.existsSync(dir)) {
  178 + exec("git clone " + githubRepo + " ./" + dir, function(error, stdout, stderr) {
  179 + parseYUIDoc();
  180 + });
  181 + } else {
  182 + parseYUIDoc();
  183 + }
  184 +};
  185 +
  186 +module.exports = wiki;
293 src/plupload.js
... ... @@ -1,10 +1,19 @@
1 1 ;(function(window, o, undef) {
2 2
3 3 var delay = window.setTimeout;
4   -
  4 +
  5 +/**
  6 + * @module plupload
  7 + * @static
  8 + */
5 9 var plupload = {
6 10 /**
7 11 * Plupload version will be replaced on build.
  12 + *
  13 + * @property VERSION
  14 + * @for Plupload
  15 + * @static
  16 + * @final
8 17 */
9 18 VERSION : '@@version@@',
10 19
@@ -12,6 +21,7 @@ var plupload = {
12 21 * Inital state of the queue and also the state ones it's finished all it's uploads.
13 22 *
14 23 * @property STOPPED
  24 + * @static
15 25 * @final
16 26 */
17 27 STOPPED : 1,
@@ -20,6 +30,7 @@ var plupload = {
20 30 * Upload process is running
21 31 *
22 32 * @property STARTED
  33 + * @static
23 34 * @final
24 35 */
25 36 STARTED : 2,
@@ -28,6 +39,7 @@ var plupload = {
28 39 * File is queued for upload
29 40 *
30 41 * @property QUEUED
  42 + * @static
31 43 * @final
32 44 */
33 45 QUEUED : 1,
@@ -36,6 +48,7 @@ var plupload = {
36 48 * File is being uploaded
37 49 *
38 50 * @property UPLOADING
  51 + * @static
39 52 * @final
40 53 */
41 54 UPLOADING : 2,
@@ -44,6 +57,7 @@ var plupload = {
44 57 * File has failed to be uploaded
45 58 *
46 59 * @property FAILED
  60 + * @static
47 61 * @final
48 62 */
49 63 FAILED : 4,
@@ -52,6 +66,7 @@ var plupload = {
52 66 * File has been uploaded successfully
53 67 *
54 68 * @property DONE
  69 + * @static
55 70 * @final
56 71 */
57 72 DONE : 5,
@@ -62,6 +77,7 @@ var plupload = {
62 77 * Generic error for example if an exception is thrown inside Silverlight.
63 78 *
64 79 * @property GENERIC_ERROR
  80 + * @static
65 81 * @final
66 82 */
67 83 GENERIC_ERROR : -100,
@@ -70,6 +86,7 @@ var plupload = {
70 86 * HTTP transport error. For example if the server produces a HTTP status other than 200.
71 87 *
72 88 * @property HTTP_ERROR
  89 + * @static
73 90 * @final
74 91 */
75 92 HTTP_ERROR : -200,
@@ -78,6 +95,7 @@ var plupload = {
78 95 * Generic I/O error. For exampe if it wasn't possible to open the file stream on local machine.
79 96 *
80 97 * @property IO_ERROR
  98 + * @static
81 99 * @final
82 100 */
83 101 IO_ERROR : -300,
@@ -86,6 +104,7 @@ var plupload = {
86 104 * Generic I/O error. For exampe if it wasn't possible to open the file stream on local machine.
87 105 *
88 106 * @property SECURITY_ERROR
  107 + * @static
89 108 * @final
90 109 */
91 110 SECURITY_ERROR : -400,
@@ -94,6 +113,7 @@ var plupload = {
94 113 * Initialization error. Will be triggered if no runtime was initialized.
95 114 *
96 115 * @property INIT_ERROR
  116 + * @static
97 117 * @final
98 118 */
99 119 INIT_ERROR : -500,
@@ -102,6 +122,7 @@ var plupload = {
102 122 * File size error. If the user selects a file that is too large it will be blocked and an error of this type will be triggered.
103 123 *
104 124 * @property FILE_SIZE_ERROR
  125 + * @static
105 126 * @final
106 127 */
107 128 FILE_SIZE_ERROR : -600,
@@ -110,6 +131,7 @@ var plupload = {
110 131 * File extension error. If the user selects a file that isn't valid according to the filters setting.
111 132 *
112 133 * @property FILE_EXTENSION_ERROR
  134 + * @static
113 135 * @final
114 136 */
115 137 FILE_EXTENSION_ERROR : -601,
@@ -118,6 +140,7 @@ var plupload = {
118 140 * Runtime will try to detect if image is proper one. Otherwise will throw this error.
119 141 *
120 142 * @property IMAGE_FORMAT_ERROR
  143 + * @static
121 144 * @final
122 145 */
123 146 IMAGE_FORMAT_ERROR : -700,
@@ -126,6 +149,7 @@ var plupload = {
126 149 * While working on the image runtime will try to detect if the operation may potentially run out of memeory and will throw this error.
127 150 *
128 151 * @property IMAGE_MEMORY_ERROR
  152 + * @static
129 153 * @final
130 154 */
131 155 IMAGE_MEMORY_ERROR : -701,
@@ -134,6 +158,7 @@ var plupload = {
134 158 * Each runtime has an upper limit on a dimension of the image it can handle. If bigger, will throw this error.
135 159 *
136 160 * @property IMAGE_DIMENSIONS_ERROR
  161 + * @static
137 162 * @final
138 163 */
139 164 IMAGE_DIMENSIONS_ERROR : -702,
@@ -381,8 +406,6 @@ var plupload = {
381 406 return url;
382 407 },
383 408
384   -
385   -
386 409 /**
387 410 * Formats the specified number as a size string for example 1024 becomes 1 KB.
388 411 *
@@ -414,7 +437,6 @@ var plupload = {
414 437 },
415 438
416 439
417   -
418 440 /**
419 441 * Parses the specified size string into a byte value. For example 10kb becomes 10240.
420 442 *
@@ -426,7 +448,128 @@ var plupload = {
426 448 };
427 449
428 450
  451 +/**
  452 + *
  453 + * @class Uploader
  454 + * @constructor
  455 + */
429 456 plupload.Uploader = function(settings) {
  457 + /**
  458 + * Fires when the current RunTime has been initialized.
  459 + *
  460 + * @event Init
  461 + * @param {plupload.Uploader} uploader Uploader instance sending the event.
  462 + */
  463 +
  464 + /**
  465 + * Fires after the init event incase you need to perform actions there.
  466 + *
  467 + * @event PostInit
  468 + * @param {plupload.Uploader} uploader Uploader instance sending the event.
  469 + */
  470 +
  471 + /**
  472 + * Fires when the silverlight/flash or other shim needs to move.
  473 + *
  474 + * @event Refresh
  475 + * @param {plupload.Uploader} uploader Uploader instance sending the event.
  476 + */
  477 +
  478 + /**
  479 + * Fires when the overall state is being changed for the upload queue.
  480 + *
  481 + * @event StateChanged
  482 + * @param {plupload.Uploader} uploader Uploader instance sending the event.
  483 + */
  484 +
  485 + /**
  486 + * Fires when a file is to be uploaded by the runtime.
  487 + *
  488 + * @event UploadFile
  489 + * @param {plupload.Uploader} uploader Uploader instance sending the event.
  490 + * @param {plupload.File} file File to be uploaded.
  491 + */
  492 +
  493 + /**
  494 + * Fires when just before a file is uploaded. This event enables you to override settings
  495 + * on the uploader instance before the file is uploaded.
  496 + *
  497 + * @event BeforeUpload
  498 + * @param {plupload.Uploader} uploader Uploader instance sending the event.
  499 + * @param {plupload.File} file File to be uploaded.
  500 + */
  501 +
  502 + /**
  503 + * Fires when the file queue is changed. In other words when files are added/removed to the files array of the uploader instance.
  504 + *
  505 + * @event QueueChanged
  506 + * @param {plupload.Uploader} uploader Uploader instance sending the event.
  507 + */
  508 +
  509 + /**
  510 + * Fires while a file is being uploaded. Use this event to update the current file upload progress.
  511 + *
  512 + * @event UploadProgress
  513 + * @param {plupload.Uploader} uploader Uploader instance sending the event.
  514 + * @param {plupload.File} file File that is currently being uploaded.
  515 + */
  516 +
  517 + /**
  518 + * Fires while a file was removed from queue.
  519 + *
  520 + * @event FilesRemoved
  521 + * @param {plupload.Uploader} uploader Uploader instance sending the event.
  522 + * @param {Array} files Array of files that got removed.
  523 + */
  524 +
  525 + /**
  526 + * Fires while when the user selects files to upload.
  527 + *
  528 + * @event FilesAdded
  529 + * @param {plupload.Uploader} uploader Uploader instance sending the event.
  530 + * @param {Array} files Array of file objects that was added to queue/selected by the user.
  531 + */
  532 +
  533 + /**
  534 + * Fires when a file is successfully uploaded.
  535 + *
  536 + * @event FileUploaded
  537 + * @param {plupload.Uploader} uploader Uploader instance sending the event.
  538 + * @param {plupload.File} file File that was uploaded.
  539 + * @param {Object} response Object with response properties.
  540 + */
  541 +
  542 + /**
  543 + * Fires when file chunk is uploaded.
  544 + *
  545 + * @event ChunkUploaded
  546 + * @param {plupload.Uploader} uploader Uploader instance sending the event.
  547 + * @param {plupload.File} file File that the chunk was uploaded for.
  548 + * @param {Object} response Object with response properties.
  549 + */
  550 +
  551 + /**
  552 + * Fires when all files in a queue are uploaded.
  553 + *
  554 + * @event UploadComplete
  555 + * @param {plupload.Uploader} uploader Uploader instance sending the event.
  556 + * @param {Array} files Array of file objects that was added to queue/selected by the user.
  557 + */
  558 +
  559 + /**
  560 + * Fires when a error occurs.
  561 + *
  562 + * @event Error
  563 + * @param {plupload.Uploader} uploader Uploader instance sending the event.
  564 + * @param {Object} error Contains code, message and sometimes file and other details.
  565 + */
  566 +
  567 + /**
  568 + * Fires when destroy method is called.
  569 + *
  570 + * @event Destroy
  571 + * @param {plupload.Uploader} uploader Uploader instance sending the event.
  572 + */
430 573 var files = [], events = {}, required_features = [], required_caps = {}, feature2cap = {},
431 574 startTime, total, disabled = false,
432 575 fileInput, fileDrop, xhr;
@@ -1334,142 +1477,18 @@ plupload.Uploader = function(settings) {
1334 1477 // Clean-up after uploader itself
1335 1478 this.unbindAll();
1336 1479 }
1337   -
1338   - /**
1339   - * Fires when the current RunTime has been initialized.
1340   - *
1341   - * @event Init
1342   - * @param {plupload.Uploader} uploader Uploader instance sending the event.
1343   - */
1344   -
1345   - /**
1346   - * Fires after the init event incase you need to perform actions there.
1347   - *
1348   - * @event PostInit
1349   - * @param {plupload.Uploader} uploader Uploader instance sending the event.
1350   - */
1351   -
1352   - /**
1353   - * Fires when the silverlight/flash or other shim needs to move.
1354   - *
1355   - * @event Refresh
1356   - * @param {plupload.Uploader} uploader Uploader instance sending the event.
1357   - */
1358   -
1359   - /**
1360   - * Fires when the overall state is being changed for the upload queue.
1361   - *
1362   - * @event StateChanged
1363   - * @param {plupload.Uploader} uploader Uploader instance sending the event.
1364   - */
1365   -
1366   - /**
1367   - * Fires when a file is to be uploaded by the runtime.
1368   - *
1369   - * @event UploadFile
1370   - * @param {plupload.Uploader} uploader Uploader instance sending the event.
1371   - * @param {plupload.File} file File to be uploaded.
1372   - */
1373   -
1374   - /**
1375   - * Fires when just before a file is uploaded. This event enables you to override settings
1376   - * on the uploader instance before the file is uploaded.
1377   - *
1378   - * @event BeforeUpload
1379   - * @param {plupload.Uploader} uploader Uploader instance sending the event.
1380   - * @param {plupload.File} file File to be uploaded.
1381   - */
1382   -
1383   - /**
1384   - * Fires when the file queue is changed. In other words when files are added/removed to the files array of the uploader instance.
1385   - *
1386   - * @event QueueChanged
1387   - * @param {plupload.Uploader} uploader Uploader instance sending the event.
1388   - */
1389   -
1390   - /**
1391   - * Fires while a file is being uploaded. Use this event to update the current file upload progress.
1392   - *
1393   - * @event UploadProgress
1394   - * @param {plupload.Uploader} uploader Uploader instance sending the event.
1395   - * @param {plupload.File} file File that is currently being uploaded.
1396   - */
1397   -
1398   - /**
1399   - * Fires while a file was removed from queue.
1400   - *
1401   - * @event FilesRemoved
1402   - * @param {plupload.Uploader} uploader Uploader instance sending the event.
1403   - * @param {Array} files Array of files that got removed.
1404   - */
1405   -
1406   - /**
1407   - * Fires while when the user selects files to upload.
1408   - *
1409   - * @event FilesAdded
1410   - * @param {plupload.Uploader} uploader Uploader instance sending the event.
1411   - * @param {Array} files Array of file objects that was added to queue/selected by the user.
1412   - */
1413   -
1414   - /**
1415   - * Fires when a file is successfully uploaded.
1416   - *
1417   - * @event FileUploaded
1418   - * @param {plupload.Uploader} uploader Uploader instance sending the event.
1419   - * @param {plupload.File} file File that was uploaded.
1420   - * @param {Object} response Object with response properties.
1421   - */
1422   -
1423   - /**
1424   - * Fires when file chunk is uploaded.
1425   - *
1426   - * @event ChunkUploaded
1427   - * @param {plupload.Uploader} uploader Uploader instance sending the event.
1428   - * @param {plupload.File} file File that the chunk was uploaded for.
1429   - * @param {Object} response Object with response properties.
1430   - */
1431   -
1432   - /**
1433   - * Fires when all files in a queue are uploaded.
1434   - *
1435   - * @event UploadComplete
1436   - * @param {plupload.Uploader} uploader Uploader instance sending the event.
1437   - * @param {Array} files Array of file objects that was added to queue/selected by the user.
1438   - */
1439   -
1440   - /**
1441   - * Fires when a error occurs.
1442   - *
1443   - * @event Error
1444   - * @param {plupload.Uploader} uploader Uploader instance sending the event.
1445   - * @param {Object} error Contains code, message and sometimes file and other details.
1446   - */
1447   -
1448   - /**
1449   - * Fires when destroy method is called.
1450   - *
1451   - * @event Destroy
1452   - * @param {plupload.Uploader} uploader Uploader instance sending the event.
1453   - */
1454 1480 });
1455 1481 };
1456 1482
1457 1483 /**
1458   - * File instance.
1459   - *
1460   - * @class plupload.File
1461   - * @param {String} name Name of the file.
1462   - * @param {Number} size File size.
1463   - */
1464   -
1465   -/**
1466 1484 * Constructs a new file instance.
1467 1485 *
  1486 + * @class File
1468 1487 * @constructor
1469   - * @method File
1470   - * @param {String} id Unique file id.
1471   - * @param {String} name File name.
1472   - * @param {Number} size File size in bytes.
  1488 + *
  1489 + * @param {Object} file Object containing file properties
  1490 + * @param {String} file.name Name of the file.
  1491 + * @param {Number} file.size File size.
1473 1492 */
1474 1493 plupload.File = (function() {
1475 1494 var filepool = {};
@@ -1552,16 +1571,10 @@ plupload.File = (function() {
1552 1571
1553 1572
1554 1573 /**
1555   - * Runtime class gets implemented by each upload runtime.
1556   - *
1557   - * @class plupload.QueueProgress
1558   - */
1559   -
1560   -/**
1561 1574 * Constructs a queue progress.
1562 1575 *
  1576 + * @class QueueProgress
1563 1577 * @constructor
1564   - * @method QueueProgress
1565 1578 */
1566 1579 plupload.QueueProgress = function() {
1567 1580 var self = this; // Setup alias for self to reduce code size when it's compressed

0 comments on commit 5cf650d

Please sign in to comment.
Something went wrong with that request. Please try again.