WordPress.org

Make WordPress Core

Changeset 11445


Ignore:
Timestamp:
05/24/2009 03:46:09 PM (10 years ago)
Author:
azaozz
Message:

Delete widgets when dragged back to Available Widgets, add ui.droppable.js and ui.selectable.js, see #9511

Location:
trunk
Files:
2 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/colors-classic.css

    r11438 r11445  
    16331633}
    16341634
    1635 .sidebar-name:hover {
     1635.sidebar-name:hover,
     1636#removing-widget {
    16361637    color: #d54e21;
     1638}
     1639
     1640#removing-widget span {
     1641    color: black;
    16371642}
    16381643
     
    16451650}
    16461651
    1647 h4 .in-widget-title {
    1648     color: #636363;
    1649 }
     1652.in-widget-title {
     1653    color: #606060;
     1654}
     1655
     1656.deleting .widget-title * {
     1657    color: #aaa;
     1658}
  • trunk/wp-admin/css/colors-fresh.css

    r11438 r11445  
    16221622}
    16231623
    1624 .sidebar-name:hover {
     1624.sidebar-name:hover,
     1625#removing-widget {
    16251626    color: #d54e21;
     1627}
     1628
     1629#removing-widget span {
     1630    color: black;
    16261631}
    16271632
     
    16341639}
    16351640
    1636 h4 .in-widget-title {
    1637     color: #636363;
    1638 }
     1641.in-widget-title {
     1642    color: #606060;
     1643}
     1644
     1645.deleting .widget-title * {
     1646    color: #aaa;
     1647}
  • trunk/wp-admin/css/ie.css

    r11246 r11445  
    377377}
    378378
     379* html #removing-widget .in-widget-title {
     380    display: none;
     381}
     382
    379383#available-widgets .widget-holder {
    380384    padding-bottom: 65px;
  • trunk/wp-admin/css/widgets.css

    r11427 r11445  
    4545    font-size: 13px;
    4646    height: 19px;
     47    overflow: hidden;
     48    white-space: nowrap;
    4749}
    4850
     
    297299}
    298300
    299 h4 .in-widget-title {
     301.widget-title .in-widget-title {
    300302    font-size: 11px;
    301303    white-space: nowrap;
    302304}
     305
     306#removing-widget {
     307    display: none;
     308    font-weight: normal;
     309    padding-left: 15px;
     310    font-size: 12px;
     311}
     312
  • trunk/wp-admin/includes/template.php

    r11383 r11445  
    35833583    return '
    35843584    <p>' . __('Widgets are added and arranged by simple drag &#8217;n&#8217; drop. If you hover your mouse over the titlebar of a widget, you&#8217;ll see a 4-arrow cursor which indicates that the widget is movable.  Click on the titlebar, hold down the mouse button and drag the widget to a sidebar. As you drag, you&#8217;ll see a dotted box that also moves. This box shows where the widget will go once you drop it.') . '</p>
    3585     <p>' . __('To remove a widget from a sidebar, click on the arrow on its titlebar to reveal its settings, and then click Remove.') . '</p>
     3585    <p>' . __('To remove a widget from a sidebar, drag it back to Available Widgets or click on the arrow on its titlebar to reveal its settings, and then click Remove.') . '</p>
    35863586    <p>' . __('To remove a widget from a sidebar <em>and keep its configuration</em>, drag it to Inactive Widgets.') . '</p>
    35873587    <p>' . __('The Inactive Widgets area stores widgets that are configured but not curently used. If you change themes and the new theme has fewer sidebars than the old, all extra widgets will be stored to Inactive Widgets automatically.') . '</p>
  • trunk/wp-admin/includes/widgets.php

    r11383 r11445  
    2222    $sort = $wp_registered_widgets;
    2323    usort( $sort, create_function( '$a, $b', 'return strnatcasecmp( $a["name"], $b["name"] );' ) );
    24     $done = array(); ?>
    25 
    26     <div class="widget-holder">
    27     <p class="description"><?php _e('Drag widgets from here to a sidebar on the right to activate them.'); ?></p>
    28     <div id="widget-list">
    29 <?php
     24    $done = array();
     25
    3026    foreach ( $sort as $widget ) {
    3127        if ( in_array( $widget['callback'], $done, true ) ) // We already showed this multi-widget
     
    5349        $args = wp_list_widget_controls_dynamic_sidebar( array( 0 => $args, 1 => $widget['params'][0] ) );
    5450        call_user_func_array( 'wp_widget_control', $args );
    55     } ?>
    56     </div>
    57     <br class='clear' />
    58     </div>
    59 <?php
     51    }
    6052}
    6153
  • trunk/wp-admin/js/widgets.dev.js

    r11431 r11445  
    3333        $('.widget-error').parents('.widget').find('a.widget-action').click();
    3434
    35         $('#widget-list .widget').draggable({
     35        $('#available-widgets').droppable({
     36            tolerance: 'pointer',
     37            accept: function(o){
     38                return $(o).parent().attr('id') != 'widget-list';
     39            },
     40            drop: function(e,ui) {
     41                ui.draggable.addClass('deleting');
     42                $('#removing-widget').hide().children('span').html('');
     43            },
     44            over: function(e,ui) {
     45                ui.draggable.addClass('deleting');
     46                $('.widget-placeholder').hide();
     47
     48                if ( ui.draggable.hasClass('ui-sortable-helper') )
     49                    $('#removing-widget').show().children('span').html( ui.draggable.find('.widget-title h4').html() );
     50            },
     51            out: function(e,ui) {
     52                ui.draggable.removeClass('deleting');
     53                $('.widget-placeholder').show();
     54                $('#removing-widget').hide().children('span').html('');
     55            }
     56        });
     57
     58        $('#widget-list .widget').draggable({
    3659            connectToSortable: '.widgets-sortables',
    3760            handle: '.widget-title',
     
    5982            cursor: 'move',
    6083            distance: 2,
    61             opacity: 0.65,
    6284            containment: 'document',
    6385            start: function(e,ui) {
     
    6789            },
    6890            stop: function(e,ui) {
     91                if ( ui.item.hasClass('ui-draggable') )
     92                    ui.item.draggable('destroy');
     93
     94                if ( ui.item.hasClass('deleting') ) {
     95                    wpWidgets.save( ui.item, 1, 0, 0, 1 ); // delete widget
     96                    ui.item.remove();
     97                    return;
     98                }
     99
    69100                var add = ui.item.find('input.add_new').val(), n = ui.item.find('input.multi_number').val(), id = ui.item.attr('id'), sb = $(this).attr('id');
     101
    70102                ui.item.css({'marginLeft':'','width':''});
     103                wpWidgets.fixWebkit();
    71104                if ( add ) {
    72105                    if ( 'multi' == add ) {
     
    80113                    }
    81114                    wpWidgets.addEvents(ui.item);
    82                     wpWidgets.save( ui.item.find('form').serialize(), sb, 0, 0 );
     115                    wpWidgets.save( ui.item, 0, 0, 0, 1 );
    83116                    ui.item.find('input.add_new').val('');
    84117                    ui.item.find('a.widget-action').click();
     118                    return;
    85119                }
    86120                wpWidgets.saveOrder(sb);
    87                 wpWidgets.resize();
    88                 wpWidgets.fixWebkit();
    89121            },
    90122            receive: function(e,ui) {
     
    103135
    104136    saveOrder : function(sb) {
    105         $('#' + sb).parents('.widgets-holder-wrap').find('.ajax-feedback').css('visibility', 'visible');
     137        if ( sb )
     138            $('#' + sb).parents('.widgets-holder-wrap').find('.ajax-feedback').css('visibility', 'visible');
    106139
    107140        var a = {
     
    118151            $('.ajax-feedback').css('visibility', 'hidden');
    119152        });
    120     },
    121 
    122     save : function(data, sb, del, t) {
     153        this.resize();
     154    },
     155
     156    save : function(widget, del, close, animate, order) {
     157        var sb = widget.parents('.widgets-sortables').attr('id'), data = widget.find('form').serialize(), a;
     158        widget = $(widget);
    123159        $('#' + sb).parents('.widgets-holder-wrap').find('.ajax-feedback').css('visibility', 'visible');
    124160
    125         var a = {
     161        a = {
    126162            action: 'save-widget',
    127163            savewidgets: $('#_wpnonce_widgets').val(),
     
    135171
    136172        $.post( ajaxurl, data, function(r){
    137             var id, widget;
    138             $('.ajax-feedback').css('visibility', 'hidden');
    139             if ( !t )
    140                 return;
    141 
    142             widget = $(t).parents('.widget');
     173            var id;
    143174
    144175            if ( del ) {
    145                 widget.slideUp('normal', function(){
    146                     $(this).remove();
    147                     wpWidgets.resize();
    148                 });
    149176                if ( !$('.widget_number', widget).val() ) {
    150177                    id = $('.widget-id', widget).val();
     
    154181                    });
    155182                }
    156             } else {
    157                 $(t).parents('.widget-inside').slideUp('normal', function(){
     183
     184                if ( animate ) {
     185                    order = 0;
     186                    widget.slideUp('fast', function(){
     187                        $(this).remove();
     188                        wpWidgets.saveOrder();
     189                    });
     190                } else {
     191                    widget.remove();
     192                    wpWidgets.resize();
     193                }
     194            } else if ( close ) {
     195                widget.find('.widget-inside').slideUp('fast', function(){
    158196                    widget.css({'width':'','marginLeft':''});
    159197                    wpWidgets.appendTitle(widget);
     198                    $('.ajax-feedback').css('visibility', 'hidden');
    160199                });
    161200            }
     201            if ( order )
     202                wpWidgets.saveOrder();
    162203        });
    163204    },
     
    168209            if ( this.id.indexOf('title') != -1 ) {
    169210                title = $(this).val().replace(/<[^<>]+>/g, '').replace(/</g, '&lt;').replace(/>/g, '&gt;');
    170                 $('.widget-title .in-widget-title', widget).html(': ' + title);
     211                if ( title )
     212                    $('.widget-title .in-widget-title', widget).html(': ' + title);
    171213                return false;
    172214            }
     
    201243                    inside.parents('.widget').css(css);
    202244                }
    203                 inside.slideDown('normal');
     245                inside.slideDown('fast');
    204246            } else {
    205                 inside.slideUp('normal', function(){ inside.parents('.widget').css({'width':'','marginLeft':''}); });
     247                inside.slideUp('fast', function(){ inside.parents('.widget').css({'width':'','marginLeft':''}); });
    206248            }
    207249            return false;
    208250        });
    209251        $('.widget-control-save', sc).click(function(){
    210             wpWidgets.save( $(this).parents('form').serialize(), $(this).parents('.widgets-sortables').attr('id'), 0, this );
     252            wpWidgets.save( $(this).parents('.widget'), 0, 1, 1, 0 );
    211253            return false;
    212254        });
    213255        $('.widget-control-remove', sc).click(function(){
    214             wpWidgets.save( $(this).parents('form').serialize(), $(this).parents('.widgets-sortables').attr('id'), 1, this );
     256            wpWidgets.save( $(this).parents('.widget'), 1, 1, 1, 0 );
    215257            return false;
    216258        });
    217259    }
    218 
    219260};
    220261$(document).ready(function(){wpWidgets.init();});
  • trunk/wp-admin/js/widgets.js

    r11431 r11445  
    1 var wpWidgets;(function(a){wpWidgets={init:function(){var b;a("#widgets-right div.sidebar-name").click(function(){var d=a(this).siblings(".widgets-sortables");if(d.is(":visible")){d.sortable("disable");a(this).parent().addClass("closed")}else{a(this).parent().removeClass("closed");d.sortable("enable").sortable("refresh")}});a("#widgets-left div.sidebar-name").click(function(){if(a(this).siblings(".widget-holder").is(":visible")){a(this).parent().addClass("closed")}else{a(this).parent().removeClass("closed")}});a("#widgets-right .widget, #wp_inactive_widgets .widget").each(function(){wpWidgets.appendTitle(this)});this.addEvents();a(".widget-error").parents(".widget").find("a.widget-action").click();a("#widget-list .widget").draggable({connectToSortable:".widgets-sortables",handle:".widget-title",distance:2,helper:"clone",zIndex:5,containment:"document",start:function(d,c){wpWidgets.fixWebkit(1);c.helper.find(".widget-description").hide()},stop:function(d,c){if(b){a(b).hide()}b="";wpWidgets.fixWebkit()}});a(".widgets-sortables").sortable({placeholder:"widget-placeholder",connectWith:".widgets-sortables",items:".widget",handle:".widget-title",cursor:"move",distance:2,opacity:0.65,containment:"document",start:function(d,c){wpWidgets.fixWebkit(1);c.item.find(".widget-inside").hide();c.item.css({marginLeft:"",width:""})},stop:function(f,c){var d=c.item.find("input.add_new").val(),i=c.item.find("input.multi_number").val(),h=c.item.attr("id"),g=a(this).attr("id");c.item.css({marginLeft:"",width:""});if(d){if("multi"==d){c.item.html(c.item.html().replace(/<[^<>]+>/g,function(e){return e.replace(/__i__|%i%/g,i)}));c.item.attr("id",h.replace(/__i__|%i%/g,i));i++;a("div#"+h).find("input.multi_number").val(i)}else{if("single"==d){c.item.attr("id","new-"+h);b="div#"+h}}wpWidgets.addEvents(c.item);wpWidgets.save(c.item.find("form").serialize(),g,0,0);c.item.find("input.add_new").val("");c.item.find("a.widget-action").click()}wpWidgets.saveOrder(g);wpWidgets.resize();wpWidgets.fixWebkit()},receive:function(d,c){if(!a(this).is(":visible")){a(this).sortable("cancel")}}}).not(":visible").sortable("disable");wpWidgets.resize();a(".widget-inside label").each(function(){var c=a(this).attr("for");if(c&&c==a("input",this).attr("id")){a(this).removeAttr("for")}})},saveOrder:function(c){a("#"+c).parents(".widgets-holder-wrap").find(".ajax-feedback").css("visibility","visible");var b={action:"widgets-order",savewidgets:a("#_wpnonce_widgets").val(),sidebars:[]};a(".widgets-sortables").each(function(){b["sidebars["+a(this).attr("id")+"]"]=a(this).sortable("toArray").join(",")});a.post(ajaxurl,b,function(){a(".ajax-feedback").css("visibility","hidden")})},save:function(e,f,c,d){a("#"+f).parents(".widgets-holder-wrap").find(".ajax-feedback").css("visibility","visible");var b={action:"save-widget",savewidgets:a("#_wpnonce_widgets").val(),sidebar:f};if(c){b.delete_widget=1}e+="&"+a.param(b);a.post(ajaxurl,e,function(g){var i,h;a(".ajax-feedback").css("visibility","hidden");if(!d){return}h=a(d).parents(".widget");if(c){h.slideUp("normal",function(){a(this).remove();wpWidgets.resize()});if(!a(".widget_number",h).val()){i=a(".widget-id",h).val();a("#available-widgets .widget-id").each(function(){if(a(this).val()==i){a(this).parents(".widget").show()}})}}else{a(d).parents(".widget-inside").slideUp("normal",function(){h.css({width:"",marginLeft:""});wpWidgets.appendTitle(h)})}})},appendTitle:function(b){a('input[type="text"]',b).each(function(){var c;if(this.id.indexOf("title")!=-1){c=a(this).val().replace(/<[^<>]+>/g,"").replace(/</g,"&lt;").replace(/>/g,"&gt;");a(".widget-title .in-widget-title",b).html(": "+c);return false}})},resize:function(){a(".widgets-sortables").not("#wp_inactive_widgets").each(function(){var c=50,b=a(".widget",this).length;c=c+parseInt(b*48,10);a(this).css("minHeight",c+"px")})},fixWebkit:function(b){b=b?"none":"";a("body").css({WebkitUserSelect:b,KhtmlUserSelect:b})},addEvents:function(b){b=b||document;a("a.widget-action",b).click(function(){var d=parseInt(a(this).parents(".widget").find(".widget-width").val(),10),e={},c=a(this).parents(".widget-top").siblings(".widget-inside");if(c.is(":hidden")){if(d>250&&c.parents(".widgets-sortables").length){e.width=d+30+"px";if(c.parents(".widget-liquid-right").length){e.marginLeft=235-d+"px"}c.parents(".widget").css(e)}c.slideDown("normal")}else{c.slideUp("normal",function(){c.parents(".widget").css({width:"",marginLeft:""})})}return false});a(".widget-control-save",b).click(function(){wpWidgets.save(a(this).parents("form").serialize(),a(this).parents(".widgets-sortables").attr("id"),0,this);return false});a(".widget-control-remove",b).click(function(){wpWidgets.save(a(this).parents("form").serialize(),a(this).parents(".widgets-sortables").attr("id"),1,this);return false})}};a(document).ready(function(){wpWidgets.init()})})(jQuery);
     1var wpWidgets;(function(a){wpWidgets={init:function(){var b;a("#widgets-right div.sidebar-name").click(function(){var d=a(this).siblings(".widgets-sortables");if(d.is(":visible")){d.sortable("disable");a(this).parent().addClass("closed")}else{a(this).parent().removeClass("closed");d.sortable("enable").sortable("refresh")}});a("#widgets-left div.sidebar-name").click(function(){if(a(this).siblings(".widget-holder").is(":visible")){a(this).parent().addClass("closed")}else{a(this).parent().removeClass("closed")}});a("#widgets-right .widget, #wp_inactive_widgets .widget").each(function(){wpWidgets.appendTitle(this)});this.addEvents();a(".widget-error").parents(".widget").find("a.widget-action").click();a("#available-widgets").droppable({tolerance:"pointer",accept:function(c){return a(c).parent().attr("id")!="widget-list"},drop:function(d,c){c.draggable.addClass("deleting");a("#removing-widget").hide().children("span").html("")},over:function(d,c){c.draggable.addClass("deleting");a(".widget-placeholder").hide();if(c.draggable.hasClass("ui-sortable-helper")){a("#removing-widget").show().children("span").html(c.draggable.find(".widget-title h4").html())}},out:function(d,c){c.draggable.removeClass("deleting");a(".widget-placeholder").show();a("#removing-widget").hide().children("span").html("")}});a("#widget-list .widget").draggable({connectToSortable:".widgets-sortables",handle:".widget-title",distance:2,helper:"clone",zIndex:5,containment:"document",start:function(d,c){wpWidgets.fixWebkit(1);c.helper.find(".widget-description").hide()},stop:function(d,c){if(b){a(b).hide()}b="";wpWidgets.fixWebkit()}});a(".widgets-sortables").sortable({placeholder:"widget-placeholder",connectWith:".widgets-sortables",items:".widget",handle:".widget-title",cursor:"move",distance:2,containment:"document",start:function(d,c){wpWidgets.fixWebkit(1);c.item.find(".widget-inside").hide();c.item.css({marginLeft:"",width:""})},stop:function(f,c){if(c.item.hasClass("ui-draggable")){c.item.draggable("destroy")}if(c.item.hasClass("deleting")){wpWidgets.save(c.item,1,0,0,1);c.item.remove();return}var d=c.item.find("input.add_new").val(),i=c.item.find("input.multi_number").val(),h=c.item.attr("id"),g=a(this).attr("id");c.item.css({marginLeft:"",width:""});wpWidgets.fixWebkit();if(d){if("multi"==d){c.item.html(c.item.html().replace(/<[^<>]+>/g,function(e){return e.replace(/__i__|%i%/g,i)}));c.item.attr("id",h.replace(/__i__|%i%/g,i));i++;a("div#"+h).find("input.multi_number").val(i)}else{if("single"==d){c.item.attr("id","new-"+h);b="div#"+h}}wpWidgets.addEvents(c.item);wpWidgets.save(c.item,0,0,0,1);c.item.find("input.add_new").val("");c.item.find("a.widget-action").click();return}wpWidgets.saveOrder(g)},receive:function(d,c){if(!a(this).is(":visible")){a(this).sortable("cancel")}}}).not(":visible").sortable("disable");wpWidgets.resize();a(".widget-inside label").each(function(){var c=a(this).attr("for");if(c&&c==a("input",this).attr("id")){a(this).removeAttr("for")}})},saveOrder:function(c){if(c){a("#"+c).parents(".widgets-holder-wrap").find(".ajax-feedback").css("visibility","visible")}var b={action:"widgets-order",savewidgets:a("#_wpnonce_widgets").val(),sidebars:[]};a(".widgets-sortables").each(function(){b["sidebars["+a(this).attr("id")+"]"]=a(this).sortable("toArray").join(",")});a.post(ajaxurl,b,function(){a(".ajax-feedback").css("visibility","hidden")});this.resize()},save:function(g,d,h,e,b){var i=g.parents(".widgets-sortables").attr("id"),f=g.find("form").serialize(),c;g=a(g);a("#"+i).parents(".widgets-holder-wrap").find(".ajax-feedback").css("visibility","visible");c={action:"save-widget",savewidgets:a("#_wpnonce_widgets").val(),sidebar:i};if(d){c.delete_widget=1}f+="&"+a.param(c);a.post(ajaxurl,f,function(j){var k;if(d){if(!a(".widget_number",g).val()){k=a(".widget-id",g).val();a("#available-widgets .widget-id").each(function(){if(a(this).val()==k){a(this).parents(".widget").show()}})}if(e){b=0;g.slideUp("fast",function(){a(this).remove();wpWidgets.saveOrder()})}else{g.remove();wpWidgets.resize()}}else{if(h){g.find(".widget-inside").slideUp("fast",function(){g.css({width:"",marginLeft:""});wpWidgets.appendTitle(g);a(".ajax-feedback").css("visibility","hidden")})}}if(b){wpWidgets.saveOrder()}})},appendTitle:function(b){a('input[type="text"]',b).each(function(){var c;if(this.id.indexOf("title")!=-1){c=a(this).val().replace(/<[^<>]+>/g,"").replace(/</g,"&lt;").replace(/>/g,"&gt;");if(c){a(".widget-title .in-widget-title",b).html(": "+c)}return false}})},resize:function(){a(".widgets-sortables").not("#wp_inactive_widgets").each(function(){var c=50,b=a(".widget",this).length;c=c+parseInt(b*48,10);a(this).css("minHeight",c+"px")})},fixWebkit:function(b){b=b?"none":"";a("body").css({WebkitUserSelect:b,KhtmlUserSelect:b})},addEvents:function(b){b=b||document;a("a.widget-action",b).click(function(){var d=parseInt(a(this).parents(".widget").find(".widget-width").val(),10),e={},c=a(this).parents(".widget-top").siblings(".widget-inside");if(c.is(":hidden")){if(d>250&&c.parents(".widgets-sortables").length){e.width=d+30+"px";if(c.parents(".widget-liquid-right").length){e.marginLeft=235-d+"px"}c.parents(".widget").css(e)}c.slideDown("fast")}else{c.slideUp("fast",function(){c.parents(".widget").css({width:"",marginLeft:""})})}return false});a(".widget-control-save",b).click(function(){wpWidgets.save(a(this).parents(".widget"),0,1,1,0);return false});a(".widget-control-remove",b).click(function(){wpWidgets.save(a(this).parents(".widget"),1,1,1,0);return false})}};a(document).ready(function(){wpWidgets.init()})})(jQuery);
  • trunk/wp-admin/themes.php

    r11443 r11445  
    4545<?php if ( ! validate_current_theme() ) : ?>
    4646<div id="message1" class="updated fade"><p><?php _e('The active theme is broken.  Reverting to the default theme.'); ?></p></div>
    47 <?php elseif ( isset($_GET['activated']) ) : ?>
    48 <div id="message2" class="updated fade"><p><?php printf(__('New theme activated. <a href="%s">Visit site</a>'), get_bloginfo('url') . '/'); ?></p></div>
    49 <?php elseif ( isset($_GET['deleted']) ) : ?>
     47<?php elseif ( isset($_GET['activated']) ) :
     48        if ( isset($wp_registered_sidebars) && count( (array) $wp_registered_sidebars ) ) { ?>
     49<div id="message2" class="updated fade"><p><?php printf(__('New theme activated. This theme supports widgets, please visit the <a href="%s">widgets settings page</a> to configure them.'), admin_url('widgets.php') ); ?></p></div><?php
     50        } else { ?>
     51<div id="message2" class="updated fade"><p><?php printf(__('New theme activated. <a href="%s">Visit site</a>'), get_bloginfo('url') . '/'); ?></p></div><?php
     52        }
     53    elseif ( isset($_GET['deleted']) ) : ?>
    5054<div id="message3" class="updated fade"><p><?php _e('Theme deleted.') ?></p></div>
    5155<?php endif; ?>
  • trunk/wp-admin/widgets.php

    r11427 r11445  
    328328        <div class="sidebar-name">
    329329        <div class="sidebar-name-arrow"><br /></div>
    330         <h3><?php _e('Available Widgets'); ?></h3></div>
     330        <h3><?php _e('Available Widgets'); ?> <span id="removing-widget"><?php _e('Deactivate'); ?> <span></span></span></h3></div>
     331        <div class="widget-holder">
     332        <p class="description"><?php _e('Drag widgets from here to a sidebar on the right to activate them. Drag widgets back here to deactivate them and delete their settings.'); ?></p>
     333        <div id="widget-list">
    331334        <?php wp_list_widgets(); ?>
     335        </div>
     336        <br class='clear' />
     337        </div>
    332338        <br class="clear" />
    333339    </div>
  • trunk/wp-includes/script-loader.php

    r11439 r11445  
    132132    $scripts->add( 'jquery-ui-draggable', '/wp-includes/js/jquery/ui.draggable.js', array('jquery-ui-core'), '1.7.1' );
    133133    $scripts->add_data( 'jquery-ui-draggable', 'group', 1 );
     134
     135    $scripts->add( 'jquery-ui-droppable', '/wp-includes/js/jquery/ui.droppable.js', array('jquery-ui-core'), '1.7.1' );
     136    $scripts->add_data( 'jquery-ui-droppable', 'group', 1 );
     137
     138    $scripts->add( 'jquery-ui-selectable', '/wp-includes/js/jquery/ui.selectable.js', array('jquery-ui-core'), '1.7.1' );
     139    $scripts->add_data( 'jquery-ui-selectable', 'group', 1 );
    134140
    135141    $scripts->add( 'jquery-ui-resizable', '/wp-includes/js/jquery/ui.resizable.js', array('jquery-ui-core'), '1.7.1' );
     
    327333        $scripts->add_data( 'media-upload', 'group', 1 );
    328334
    329         $scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable' ), '20090522' );
     335        $scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), '20090524' );
    330336        $scripts->add_data( 'admin-widgets', 'group', 1 );
    331337
Note: See TracChangeset for help on using the changeset viewer.