Created
August 14, 2009 18:00
-
-
Save revelation/167993 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$.fn.video_uploader = function(options) { | |
YAHOO.widget.Uploader.SWFURL = "/uploader.swf"; | |
return this.each(function() { | |
var video_uploader_div = $(this); | |
var video_uploader = new YAHOO.widget.Uploader(uploader_ui.attr('id'), '/images/uploadButton.png'); | |
function onUploadError(event) { | |
var error_text = "There was an error with the upload: <br/>" + event.type + "<br/>" + event.status; | |
Revelation.videos.display_error(video_uploader_div, error_text); | |
}; | |
video_uploader.addListener('uploadError', onUploadError); | |
}); | |
} | |
})(jQuery); | |
if (typeof Revelation == "undefined" || !Revelation) { | |
var Revelation = {}; | |
} | |
Revelation.video = { | |
display_error: function(error_div, error_message) { | |
error_div.append("<br/>" + error_message); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment