Skip to content
Browse files

- fine tuning ... countdown is running

  • Loading branch information...
1 parent 248e943 commit 8e6716c73fb6cb544b76161de6d87cbae5ec687a Harald Kirschner committed Apr 30, 2009
View
0 assets/progress.gif → assets/progress-bar/progress-green.gif
File renamed without changes
View
6 meta.md
@@ -1,7 +1,7 @@
Previous Version {#big-important-note}
-------------------
-If you missed the link above, the previous FancyUpload for [MooTools 1.11](http://mootools.net) is still [available](/project/fancyupload/1-0/) including example code and minor updates.
+If you missed the link above, the previous FancyUpload for [MooTools 1.11](http://mootools.net) is still [available](/project/fancyupload/1-0/) including example code and minor updates. It is not maintained anymore.
Features {#features}
-------------------
@@ -269,8 +269,8 @@ Complete ActionScript/JavaScript source, documentation and showcases are availab
### Packages
-* [**Working FancyUpload Installation**]() - The package that everybody waited for, a working FancyUpload to unpack and start play.
-* [**Sources including Showcases**]() - The source and all showcases from this page in one package, the package for *web craftsmen* ;).
+* [**Working FancyUpload Installation**](http://cloud.github.com/downloads/digitarald/digitarald-fancyupload/working-fancyupload-photoqueue.rar) - The package that everybody waited for, a working FancyUpload to unpack and start play.
+* [**Sources including Showcases**](http://cloud.github.com/downloads/digitarald/digitarald-fancyupload/fancyupload-complete-source.rar) - The source and all showcases from this page in one package, the package for *web craftsmen* ;).
### Single Files
View
1 showcase/all-inclusive/meta.json
@@ -1,5 +1,6 @@
{
"title": "All Inclusive",
+ "locked": true,
"script_php": "../script.php",
"files": [
"http://ajax.googleapis.com/ajax/libs/mootools/1.2.2/mootools.js",
View
1 showcase/attach-a-file/meta.json
@@ -1,5 +1,6 @@
{
"title": "Attach a File",
+ "locked": true,
"script_php": "../script.php",
"files": [
"http://ajax.googleapis.com/ajax/libs/mootools/1.2.2/mootools.js",
View
1 showcase/iframe-queue/meta.json
@@ -1,5 +1,6 @@
{
"title": "Attach a File with IFrames",
+ "locked": true,
"script_php": "../script.php",
"files": [
"http://ajax.googleapis.com/ajax/libs/mootools/1.2.2/mootools.js",
View
19 showcase/photoqueue/script.js
@@ -10,15 +10,24 @@ window.addEvent('domready', function() { // wait for the content
// our uploader instance
- var up = new FancyUpload2($('demo-status'), $('demo-list'), {
+ var up = new FancyUpload2($('demo-status'), $('demo-list'), { // options object
+ // we console.log infos, remove that in production!!
+ verbose: true,
+
+ // url is read from the form, so you just have to change one place
url: $('form-demo').action,
+
+ // path to the SWF file
path: '../../source/Swiff.Uploader.swf',
+
// remove that line to select all files, or edit it, add more items
typeFilter: {
'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'
},
- verbose: true,
+
+ // this is our browse button, *target* is overlayed with the Flash movie
target: 'demo-browse',
+
// graceful degradation, onLoad is only called if all went well with Flash
onLoad: function() {
$('demo-status').removeClass('hide'); // we show the actual UI
@@ -83,14 +92,14 @@ window.addEvent('domready', function() { // wait for the content
* to send something else than JSON or different items).
*/
onFileSuccess: function(file, response) {
- var json = $H(JSON.decode(response, true) || {});
+ var json = new Hash(JSON.decode(response, true) || {});
if (json.get('status') == '1') {
file.element.addClass('file-success');
- file.info.set('html', json.get('width') + ' x ' + json.get('height') + 'px ' + json.get('mime'));
+ file.info.set('html', 'Image was uploaded (' + json.get('width') + ' x ' + json.get('height') + 'px, <em>' + json.get('mime') + '</em>)');
} else {
file.element.addClass('file-failed');
- file.info.set('html', json.get('error') || response);
+ file.info.set('html', 'An error occured ' + (json.get('error') ? (json.get('error') + ' #' + json.get('code')) : response));
}
},
View
1 showcase/simple-button/meta.json
@@ -1,5 +1,6 @@
{
"title": "Simple Button",
+ "locked": true,
"script_php": "../script.php",
"files": [
"http://ajax.googleapis.com/ajax/libs/mootools/1.2.2/mootools.js",
View
9 source/FancyUpload2.js
@@ -199,10 +199,9 @@ FancyUpload2.File = new Class({
var error = MooTools.lang.get('FancyUpload', 'fileError').substitute(this);
- var info = MooTools.lang.get('FancyUpload', 'errors')[this.response.error] || (this.response.error + ' #' + this.response.code);
- info = info.substitute(this).substitute(this.response);
-
- this.info.set('html', '<strong>' + error + ':</strong> ' + info);
+ var info = MooTools.lang.get('FancyUpload', 'errors')[this.response.error] || ('{error} #{code}');
+
+ this.info.set('html', '<strong>' + error + ':</strong> ' + info.substitute(this).substitute(this.response));
},
onRemove: function() {
@@ -230,7 +229,7 @@ FancyUpload2.File = new Class({
'fileListSizeMax': 'File <em>{name}</em> is too big, overall filesize exceeded limit.'
},
'errors': {
- 'httpError': 'Server returned HTTP-Status #{code}',
+ 'httpStatus': 'Server returned HTTP-Status #{code}',
'securityError': 'Security error occured ({text})',
'ioError': 'Error caused a send or load operation to fail ({text})'
}

0 comments on commit 8e6716c

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