Changeset 26366
- Timestamp:
- 11/24/2013 10:06:13 PM (11 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/wp-admin.css
r26338 r26366 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, … … 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; … … 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; … … 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; … … 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; … … 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 } -
trunk/src/wp-admin/js/widgets.js
r26306 r26366 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'), … … 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() { … … 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) { … … 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 ); … … 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 }); -
trunk/src/wp-admin/widgets.php
r26293 r26366 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">
Note: See TracChangeset
for help on using the changeset viewer.