Widget admin layout fixes from mdawaffe. fixes #5997
git-svn-id: http://svn.automattic.com/wordpress/trunk@7086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
67fd73834b
commit
f529aef82d
|
@ -34,6 +34,13 @@ h4.widget-title a {
|
||||||
right: auto;
|
right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
li.widget-list-control-item h4.widget-title a,
|
||||||
|
#dragHelper li.widget-list-control-item h4.widget-title a,
|
||||||
|
#draghelper li.widget-list-control-item h4.widget-title a:visited {
|
||||||
|
right: auto;
|
||||||
|
left: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
li.widget-list-control-item div.widget-control {
|
li.widget-list-control-item div.widget-control {
|
||||||
padding: 0 0 0 10px;
|
padding: 0 0 0 10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ div.widget-liquid-right {
|
||||||
float: right;
|
float: right;
|
||||||
clear: right;
|
clear: right;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* pasitioning etc. */
|
/* pasitioning etc. */
|
||||||
|
@ -95,7 +96,6 @@ li.widget-list-control-item {
|
||||||
}
|
}
|
||||||
|
|
||||||
li.widget-list-control-item h4, #dragHelper li.widget-list-control-item h4 {
|
li.widget-list-control-item h4, #dragHelper li.widget-list-control-item h4 {
|
||||||
position: relative;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
background-color: #2683ae;
|
background-color: #2683ae;
|
||||||
padding: .5em 1em;
|
padding: .5em 1em;
|
||||||
|
@ -113,8 +113,11 @@ h4.widget-title a {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
li.widget-list-control-item h4.widget-title a, li.widget-list-control-item h4.widget-title a:visited {
|
li.widget-list-control-item h4.widget-title a,
|
||||||
|
#dragHelper li.widget-list-control-item h4.widget-title a,
|
||||||
|
#draghelper li.widget-list-control-item h4.widget-title a:visited {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
right: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
li.widget-list-control-item h4.widget-title a:hover {
|
li.widget-list-control-item h4.widget-title a:hover {
|
||||||
|
|
|
@ -63,12 +63,12 @@ function wp_list_widgets( $show = 'all', $_search = false ) {
|
||||||
) ), "add-widget_$widget[id]" );
|
) ), "add-widget_$widget[id]" );
|
||||||
} else {
|
} else {
|
||||||
$action = 'edit';
|
$action = 'edit';
|
||||||
$edit_url = add_query_arg( array(
|
$edit_url = clean_url( add_query_arg( array(
|
||||||
'sidebar' => $sidebar,
|
'sidebar' => $sidebar,
|
||||||
'edit' => $widget['id'],
|
'edit' => $widget['id'],
|
||||||
'key' => array_search( $widget['id'], $sidebars_widgets[$sidebar] ),
|
'key' => array_search( $widget['id'], $sidebars_widgets[$sidebar] ),
|
||||||
) );
|
) ) );
|
||||||
$widget_control_template = '<textarea>' . htmlspecialchars( $widget_control_template ) . '</textarea>';
|
$widget_control_template = '<li><textarea rows="1" cols="1">' . htmlspecialchars( $widget_control_template ) . '</textarea></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$no_widgets_shown = false;
|
$no_widgets_shown = false;
|
||||||
|
|
|
@ -6,20 +6,35 @@ jQuery(function($) {
|
||||||
// Open or close widget control form
|
// Open or close widget control form
|
||||||
var toggleWidget = function( li ) {
|
var toggleWidget = function( li ) {
|
||||||
var width = li.find('input.widget-width').val();
|
var width = li.find('input.widget-width').val();
|
||||||
return li.children('div.widget-control').each( function() {
|
|
||||||
|
// it seems IE chokes on these animations because of the positioning/floating
|
||||||
|
var widgetAnim = $.browser.msie ? function() {
|
||||||
var t = $(this);
|
var t = $(this);
|
||||||
if ( t.is(':visible') ) {
|
if ( t.is(':visible') ) {
|
||||||
t.animate( { height: 'hide' } );
|
li.css( 'marginLeft', 0 );
|
||||||
|
t.siblings('h4').children('a').text( widgetsL10n.edit );
|
||||||
|
} else {
|
||||||
|
if ( width > 250 )
|
||||||
|
li.css( 'marginLeft', ( width - 250 ) * -1 );
|
||||||
|
t.siblings('h4').children('a').text( widgetsL10n.cancel );
|
||||||
|
}
|
||||||
|
t.toggle();
|
||||||
|
} : function() {
|
||||||
|
var t = $(this);
|
||||||
|
|
||||||
|
if ( t.is(':visible') ) {
|
||||||
if ( width > 250 )
|
if ( width > 250 )
|
||||||
li.animate( { marginLeft: 0 } );
|
li.animate( { marginLeft: 0 } );
|
||||||
t.siblings('h4').children('a').text( widgetsL10n.edit );
|
t.siblings('h4').children('a').text( widgetsL10n.edit );
|
||||||
} else {
|
} else {
|
||||||
t.animate( { height: 'show' } );
|
|
||||||
if ( width > 250 )
|
if ( width > 250 )
|
||||||
li.animate( { marginLeft: ( width - 250 ) * -1 } );
|
li.animate( { marginLeft: ( width - 250 ) * -1 } );
|
||||||
t.siblings('h4').children('a').text( widgetsL10n.cancel );
|
t.siblings('h4').children('a').text( widgetsL10n.cancel );
|
||||||
}
|
}
|
||||||
} ).end();
|
t.animate( { height: 'toggle' } );
|
||||||
|
};
|
||||||
|
|
||||||
|
return li.children('div.widget-control').each( widgetAnim ).end();
|
||||||
};
|
};
|
||||||
|
|
||||||
// onclick for edit links
|
// onclick for edit links
|
||||||
|
|
|
@ -8,6 +8,7 @@ wpAjax = {
|
||||||
var q = s.split('?'); if ( q[1] ) { s = q[1]; }
|
var q = s.split('?'); if ( q[1] ) { s = q[1]; }
|
||||||
var pp = s.split('&');
|
var pp = s.split('&');
|
||||||
for ( var i in pp ) {
|
for ( var i in pp ) {
|
||||||
|
if ( $.isFunction(pp.hasOwnProperty) && !pp.hasOwnProperty(i) ) { continue; }
|
||||||
var p = pp[i].split('=');
|
var p = pp[i].split('=');
|
||||||
r[p[0]] = p[1];
|
r[p[0]] = p[1];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue