Вход Регистрация
Файл: module-assets/admin/plupload/examples/jquery/jquery_ui_widget.html
Строк: 86
<?php
<!DOCTYPE html>
<
html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<
head>
<
meta http-equiv="content-type" content="text/html; charset=UTF-8"/>

<
title>Plupload jQuery UI Widget</title>

<
link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/base/jquery-ui.css" type="text/css" />
<
link rel="stylesheet" href="../../js/jquery.ui.plupload/css/jquery.ui.plupload.css" type="text/css" />

<
script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<
script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>

<!-- 
production -->
<
script type="text/javascript" src="../../js/plupload.full.min.js"></script>
<
script type="text/javascript" src="../../js/jquery.ui.plupload/jquery.ui.plupload.js"></script>

<!-- 
debug 
<script type="text/javascript" src="../../js/moxie.js"></script>
<
script type="text/javascript" src="../../js/plupload.js"></script>
<
script type="text/javascript" src="../../js/jquery.ui.plupload/jquery.ui.plupload.js"></script>
-->

</
head>
<
body style="font:13px Verdana;background:url(../bg.jpg);color:#333">

<
h1>jQuery UI Widget</h1>

<
p>You can see this example with different themes on the <a href="http://plupload.com/example_jquery_ui.php">www.plupload.com</awebsite.</p>

<
form id="form" method="post" action="dump.php">
    <
div id="uploader">
        <
p>Your browser doesn't have Flash, Silverlight or HTML5 support.</p>
    </div>
    <br />
    <input type="submit" value="Submit" />
</form>

<script type="text/javascript">
// Initialize the widget when the DOM is ready
$(function() {
    $("#uploader").plupload({
        // General settings
        runtimes : '
html5,flash,silverlight,html4',
        url : '
../upload.php',

        // Select multiple files at once
        multi_selection: false, // if set to true, html4 will always fail, since it can'
t select multiple files

        
// Maximum file size
        
max_file_size '1000mb',

        
// User can upload no more then 20 files in one go (sets multiple_queues to false)
        
max_file_count20,
        
        
chunks : {
            
size'1mb',
            
send_chunk_numberfalse // set this to true, to send chunk and total chunk numbers instead of offset and total bytes
        
},

        
// Resize images on clientside if we can
        
resize : {
            
width 200
            
height 200
            
quality 90,
            
croptrue // crop to exact dimensions
        
},

        
// Specify what files to browse for
        
filters : [
            {
title "Image files"extensions "jpg,gif,png"},
            {
title "Zip files"extensions "zip,avi"}
        ],

        
// Rename files by clicking on their titles
        
renametrue,
        
        
// Sort files
        
sortabletrue,

        
// Enable ability to drag'n'drop files onto the widget (currently only HTML5 supports that)
        
dragdroptrue,

        
// Views to activate
        
views: {
            list: 
true,
            
thumbstrue// Show thumbs
            
active'thumbs'
        
},

        
// Flash settings
        
flash_swf_url '../../js/Moxie.swf',

        
// Silverlight settings
        
silverlight_xap_url '../../js/Moxie.xap'
    
});


    
// Handle the case when form was submitted before uploading has finished
    
$('#form').submit(function(e) {
        
// Files in queue upload them first
        
if ($('#uploader').plupload('getFiles').length 0) {

            
// When all files are uploaded submit form
            
$('#uploader').on('complete', function() {
                $(
'#form')[0].submit();
            });

            $(
'#uploader').plupload('start');
        } else {
            
alert("You must have at least one file in the queue.");
        }
        return 
false// Keep the form from submitting
    
});
});
</
script>
</
body>
</
html>
?>
Онлайн: 2
Реклама