app/assets/javascripts/applicious_utils/Plupload/examples/custom.html in applicious_utils-0.1.70 vs app/assets/javascripts/applicious_utils/Plupload/examples/custom.html in applicious_utils-0.1.71
- old
+ new
@@ -27,35 +27,33 @@
<!-- <script type="text/javascript" src="http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js"></script> -->
</head>
<body>
-<form id="submit-form" method="post" action="dump.php">
- <h1>Custom example</h1>
+<h1>Custom example</h1>
- <p>Shows you how to use the core plupload API.</p>
+<p>Shows you how to use the core plupload API.</p>
- <div>
- <div id="filelist">No runtime found.</div>
- <br />
- <a id="pickfiles" href="javascript:;">[Select files]</a>
- <a id="uploadfiles" href="javascript:;">[Upload files]</a>
- </div>
-
- <input type="submit" />
-</form>
+<div id="container">
+ <div id="filelist">No runtime found.</div>
+ <br />
+ <a id="pickfiles" href="javascript:;">[Select files]</a>
+ <a id="uploadfiles" href="javascript:;">[Upload files]</a>
+</div>
+
<script type="text/javascript">
// Custom example logic
function $(id) {
return document.getElementById(id);
}
var uploader = new plupload.Uploader({
runtimes : 'gears,html5,flash,silverlight,browserplus',
browse_button : 'pickfiles',
+ container: 'container',
max_file_size : '10mb',
url : 'upload.php',
resize : {width : 320, height : 240, quality : 90},
flash_swf_url : '../js/plupload.flash.swf',
silverlight_xap_url : '../js/plupload.silverlight.xap',
@@ -71,13 +69,9 @@
uploader.bind('FilesAdded', function(up, files) {
for (var i in files) {
$('filelist').innerHTML += '<div id="' + files[i].id + '">' + files[i].name + ' (' + plupload.formatSize(files[i].size) + ') <b></b></div>';
}
-});
-
-uploader.bind('UploadFile', function(up, file) {
- $('submit-form').innerHTML += '<input type="hidden" name="file-' + file.id + '" value="' + file.name + '" />';
});
uploader.bind('UploadProgress', function(up, file) {
$(file.id).getElementsByTagName('b')[0].innerHTML = '<span>' + file.percent + "%</span>";
});
\ No newline at end of file