WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/24/2008 05:03:51 PM (14 years ago)
Author:
ryan
Message:

Few css fixes for the media uploader, confirm delete of attachments from the library tab. Props azaozz. fixes #7033

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r7979 r7988  
    127127<title><?php bloginfo('name') ?> &rsaquo; <?php _e('Uploads'); ?> &#8212; <?php _e('WordPress'); ?></title>
    128128<?php
    129 wp_admin_css( 'global' );
    130 wp_admin_css();
    131 wp_admin_css( 'colors' );
     129wp_enqueue_style( 'global' );
     130wp_enqueue_style( 'wp-admin' );
     131wp_enqueue_style( 'colors' );
    132132if ( 0 === strpos( $content_func, 'media' ) )
    133     wp_admin_css( 'media' );
     133    wp_enqueue_style( 'media' );
    134134
    135135?>
     
    140140</script>
    141141<?php
     142do_action('admin_print_styles');
    142143do_action('admin_print_scripts');
    143 do_action('admin_print_styles');
    144144do_action('admin_head');
    145145if ( is_string($content_func) )
     
    673673        $send = "<input type='submit' class='button' name='send[$attachment_id]' value='" . attribute_escape( __( 'Insert into Post' ) ) . "' />";
    674674    if ( $delete )
    675         $delete = "<a href='$delete_href' id='del[$attachment_id]' disabled='disabled' class='delete'>" . __('Delete') . "</button>";
     675        $delete = "<a href=\"#\" class=\"del-link\" onclick=\"document.getElementById('del_attachment_$attachment_id').style.display='block';return false;\">" . __('Delete') . "</a>";
    676676    if ( ( $send || $delete ) && !isset($form_fields['buttons']) )
    677         $form_fields['buttons'] = array('tr' => "\t\t<tr class='submit'><td></td><td class='savesend'>$send $delete</td></tr>\n");
     677        $form_fields['buttons'] = array('tr' => "\t\t<tr class='submit'><td></td><td class='savesend'>$send $delete
     678        <div id=\"del_attachment_$attachment_id\" class=\"del-attachment\" style=\"display:none;\">" . sprintf(__("You are about to delete <strong>%s</strong>."), $filename) . " <a href=\"$delete_href\" id=\"del[$attachment_id]\" class=\"delete\">" . __('Continue') . "</a>
     679        <a href=\"#\" class=\"del-link\" onclick=\"this.parentNode.style.display='none';return false;\">" . __('Cancel') . "</a></div></td></tr>\n");
    678680
    679681    $hidden_fields = array();
Note: See TracChangeset for help on using the changeset viewer.