Plugin Directory

Changeset 1354796


Ignore:
Timestamp:
02/20/2016 04:22:42 PM (10 years ago)
Author:
derekheld
Message:

Added progress bar to Copy to Azure ability.

Location:
blue-storage/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • blue-storage/trunk/blue-storage-settings.php

    r1354793 r1354796  
    8383                if( !empty($query_results) )
    8484                {
     85                    echo '<br/><br/><div id="blue-storage-upload-progress"></div>';
     86                    echo '<div id="blue-storage-upload-information"></div>';
     87                    $count = 0;
    8588                    foreach ($query_results as $attachment) {
    8689                        $metadata = get_post_meta($attachment->ID,'_wp_attachment_metadata')[0];
     
    100103                            }
    101104                        }
     105
     106                        //Update progress of uploads
     107                        $count += 1;
     108                        $percent = intval(($count/$limit) * 100).'%';
     109                        echo '<script language="javascript">
     110                            document.getElementById("progress").innerHTML="<div style=\"width:'.$percent.';background-color:#ddd;\">&nbsp;</div>";
     111                            document.getElementById("information").innerHTML="'.$count.' images uploaded.";
     112                            </script>';
     113                        echo str_repeat(' ',1024*64);
     114                        ob_flush();
     115                        flush();
    102116                    }
    103117                    echo '<p id="blue-storage-notice">' . 'Finished copying files to "' . $selected_container_name . '" container on Azure.</p><br/>';
  • blue-storage/trunk/css/blue-storage.css

    r1312897 r1354796  
    2222    font-weight: bold;
    2323}
     24
     25#blue-storage-upload-progress {
     26    width:500px;
     27    border:1px solid #ccc;
     28}
     29
     30#blue-storage-upload-information {
     31
     32}
Note: See TracChangeset for help on using the changeset viewer.