Ticket #25821: 25821.7.patch
File 25821.7.patch, 4.8 KB (added by , 11 years ago) |
---|
-
src/wp-admin/css/wp-admin.css
889 889 input[type="checkbox"]:focus, 890 890 input[type="radio"]:focus, 891 891 select:focus, 892 #widgets-chooser ul,892 .widgets-chooser ul, 893 893 #widgets-left .widget-in-question .widget-top, 894 894 #available-widgets .widget-top:hover, 895 895 div#widgets-right .widget-top:hover { … … 10392 10392 pointer-events: auto; 10393 10393 } 10394 10394 10395 #widgets-chooser ul.widgets-chooser-sidebars {10395 .widgets-chooser ul.widgets-chooser-sidebars { 10396 10396 margin: 0; 10397 10397 list-style-type: none; 10398 10398 max-height: 300px; … … 10399 10399 overflow: auto; 10400 10400 } 10401 10401 10402 #widgets-chooser {10402 .widgets-chooser { 10403 10403 display: none; 10404 10404 } 10405 10405 10406 #widgets-chooser ul {10406 .widgets-chooser ul { 10407 10407 border: 1px solid #ccc; 10408 10408 } 10409 10409 10410 #widgets-chooser li {10410 .widgets-chooser li { 10411 10411 padding: 10px 15px 10px 35px; 10412 10412 border-bottom: 1px solid #ccc; 10413 10413 background: #fff; … … 10418 10418 transition: background: 0.2s ease-in-out; 10419 10419 } 10420 10420 10421 #widgets-chooser li:hover,10422 #widgets-chooser li:focus {10421 .widgets-chooser li:hover, 10422 .widgets-chooser li:focus { 10423 10423 background: rgba(255,255,255,0.7); 10424 10424 } 10425 10425 10426 #widgets-chooser li:focus:before {10426 .widgets-chooser li:focus:before { 10427 10427 content: '\f147'; 10428 10428 display: block; 10429 10429 -webkit-font-smoothing: antialiased; … … 10434 10434 left: 5px; 10435 10435 } 10436 10436 10437 #widgets-chooser li:last-child {10437 .widgets-chooser li:last-child { 10438 10438 border: none; 10439 10439 } 10440 10440 10441 #widgets-chooser li.widgets-chooser-selected {10441 .widgets-chooser li.widgets-chooser-selected { 10442 10442 background: #2ea2cc; 10443 10443 color: #fff; 10444 10444 } 10445 10445 10446 #widgets-chooser li.widgets-chooser-selected:before,10447 #widgets-chooser li.widgets-chooser-selected:focus:before {10446 .widgets-chooser li.widgets-chooser-selected:before, 10447 .widgets-chooser li.widgets-chooser-selected:focus:before { 10448 10448 content: '\f147'; 10449 10449 display: block; 10450 10450 -webkit-font-smoothing: antialiased; … … 10455 10455 left: 5px; 10456 10456 } 10457 10457 10458 #widgets-chooser .widgets-chooser-actions {10458 .widgets-chooser .widgets-chooser-actions { 10459 10459 padding: 10px 0 12px 0; 10460 10460 text-align: center; 10461 10461 } 10462 10462 10463 #widgets-chooser button {10463 .widgets-chooser button { 10464 10464 margin-right: 5px; 10465 10465 } 10466 10466 -
src/wp-admin/js/widgets.js
7 7 init : function() { 8 8 var rem, the_id, 9 9 self = this, 10 chooser = $(' #widgets-chooser'),10 chooser = $('.widgets-chooser'), 11 11 selectSidebar = chooser.find('.widgets-chooser-sidebars'), 12 12 sidebars = $('div.widgets-sortables'), 13 13 isRTL = !! ( 'undefined' !== typeof isRtl && isRtl ); … … 82 82 helper: 'clone', 83 83 zIndex: 100, 84 84 containment: 'document', 85 start: function(e,ui) { 85 start: function( event, ui ) { 86 var chooser = $(this).find('.widgets-chooser'); 87 86 88 ui.helper.find('div.widget-description').hide(); 87 89 the_id = this.id; 90 91 if ( chooser.length ) { 92 // Hide the chooser and move it out of the widget 93 $( '#wpbody-content' ).append( chooser.hide() ); 94 // Delete the cloned chooser from the drag helper 95 ui.helper.find('.widgets-chooser').remove(); 96 self.clearWidgetSelection(); 97 } 88 98 }, 89 99 stop: function() { 90 100 if ( rem ) { … … 103 113 distance: 2, 104 114 containment: 'document', 105 115 start: function(e,ui) { 106 ui.item.children('.widget-inside').hide(); 116 var inside = ui.item.children('.widget-inside'); 117 118 if ( inside.css('display') === 'block' ) { 119 inside.hide(); 120 $(this).sortable('refreshPositions'); 121 } 107 122 }, 108 123 stop: function(e,ui) { 109 124 if ( ui.item.hasClass('ui-draggable') && ui.item.data('draggable') ) { … … 203 218 // Open the chooser 204 219 self.clearWidgetSelection(); 205 220 $( '#widgets-left' ).addClass( 'chooser' ); 206 widget.addClass( 'widget-in-question' ) .draggable('disable');221 widget.addClass( 'widget-in-question' ); 207 222 208 223 widget.find( '.widget-description' ).after( chooser ); 209 224 chooser.slideDown( 300, function() { … … 386 401 closeChooser: function() { 387 402 var self = this; 388 403 389 $( ' #widgets-chooser' ).slideUp( 200, function() {404 $( '.widgets-chooser' ).slideUp( 200, function() { 390 405 $( '#wpbody-content' ).append( this ); 391 $( '#widgets-left .widget-in-question' ).draggable('enable');392 406 self.clearWidgetSelection(); 393 407 }); 394 408 }, -
src/wp-admin/widgets.php
428 428 <br class="clear" /> 429 429 </div> 430 430 431 <div id="widgets-chooser">431 <div class="widgets-chooser"> 432 432 <ul class="widgets-chooser-sidebars"></ul> 433 433 <div class="widgets-chooser-actions"> 434 434 <button class="button-secondary"><?php _e( 'Cancel' ); ?></button>