Plugin Directory

Changeset 518854


Ignore:
Timestamp:
03/14/2012 10:36:13 AM (14 years ago)
Author:
ihacklog
Message:

changed image preload from css to js.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • hacklog-remote-image-autosave/trunk/handle.php

    r517176 r518854  
    1919?>
    2020<style type="text/css" media="screen">
    21 .hack-ok {
    22     background-image: url(<?php echo WP_PLUGIN_URL . '/hacklog-remote-image-autosave/images/ok_24.png';
    23 ?>);}
    24 .hack-downloading {
    25     background-image: url(<?php echo WP_PLUGIN_URL . '/hacklog-remote-image-autosave/images/downloading.gif';
    26 ?>);}
    2721.error {
    2822    color:#F00;
    2923}
    3024</style>
     25
     26<script type="text/javascript">
     27//Preload images
     28(new Image()).src = "<?php echo WP_PLUGIN_URL . '/hacklog-remote-image-autosave/images/ok_24.png';
     29    ?>";
     30(new Image()).src = "<?php echo WP_PLUGIN_URL . '/hacklog-remote-image-autosave/images/downloading.gif';
     31    ?>";   
     32</script>
     33
    3134<script type="text/javascript">
    3235    var hacklog_ria_debug = false;
     
    211214                $('#image-list').html(html);
    212215                $('#img-cnt').val( data.images.length );
     216                var post_id = $('#post_id').val();
    213217                for(var i=0;i<data.images.length;++i)
    214218                {
    215219                    var id =  data.images[i].id;
    216                     var post_id = $('#post_id').val();
    217220                    down_single_img(id,post_id, data.images[i].url);
    218 
    219221                }   
    220222                setTimeout("check_down();",check_down_interval);
     
    241243    {
    242244        $('#hacklog-ria-form').show();
    243         //alert(mce.getContent({format : 'text'}));
    244         //mce.setContent(mce.getContent({format : 'text'})+'<a href="#aaa">aaa</a>',{format : 'text'});
    245245        get_images();
    246246    }
    247247});
    248 //alert(parent.location.href);
    249 //parent.document.getElementById('content').value = parent.document.getElementById('content').value + '<a href="#test">test</a>';
    250 //alert( parent.document.getElementById('content').value );
    251248</script>
    252 <div style="visibility:hidden;">
    253 <span class="hack-downloading"></span>
    254 <span class="hack-ok"></span>
    255 </div>
     249
    256250<h3 id="all-done" style="display:none;color:#57d;margin:15px auto 0 40px;">All remote images has been downloaded.Have fun -_-.</h3>
    257251<form id="hacklog-ria-form" action="" method="post" accept-charset="utf-8" style="display:none;margin: 0 auto 8px; padding: 10px;">
Note: See TracChangeset for help on using the changeset viewer.