Widgets RTL fixes, props yoavf, fixes #16082
git-svn-id: https://develop.svn.wordpress.org/trunk@18095 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d66facad6c
commit
aa91987639
|
@ -1 +1 @@
|
||||||
#widget-list .widget,#wp_inactive_widgets .widget{float:right;}ul#widget-list li.widget-list-item div.widget-description{margin:0 200px 0 0;padding:0 4em 0 0;}.widget-control-save,.widget-control-remove{margin-right:0;margin-left:8px;float:right;}
|
div.widget-liquid-left{float:right;clear:right;margin-right:0;margin-left:-325px;}div#widgets-left{margin-right:5px;margin-left:325px;}div.widget-liquid-right{float:left;clear:left;}#wp_inactive_widgets .widget{float:right;}div.sidebar-name h3{font-family:Tahoma,Arial,sans-serif;}#widget-list .widget{float:right;}#wp_inactive_widgets .widget-placeholder{float:right;}.widget-top .widget-title-action{float:left;}.widget-control-edit{padding:0 0 0 8px;}.sidebar-name-arrow{float:left;}
|
|
@ -1,14 +1,47 @@
|
||||||
#widget-list .widget,
|
/* 2 column liquid layout */
|
||||||
|
div.widget-liquid-left {
|
||||||
|
float: right;
|
||||||
|
clear: right;
|
||||||
|
margin-right: 0;
|
||||||
|
margin-left: -325px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#widgets-left {
|
||||||
|
margin-right: 5px;
|
||||||
|
margin-left: 325px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.widget-liquid-right {
|
||||||
|
float: left;
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
|
||||||
#wp_inactive_widgets .widget {
|
#wp_inactive_widgets .widget {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
ul#widget-list li.widget-list-item div.widget-description {
|
|
||||||
margin: 0 200px 0 0;
|
div.sidebar-name h3 {
|
||||||
padding: 0 4em 0 0;
|
font-family: Tahoma, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
.widget-control-save,
|
|
||||||
.widget-control-remove {
|
#widget-list .widget {
|
||||||
margin-right: 0;
|
|
||||||
margin-left: 8px;
|
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#wp_inactive_widgets .widget-placeholder {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-top .widget-title-action {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-control-edit {
|
||||||
|
padding: 0 0 0 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.sidebar-name-arrow {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,8 @@ var wpWidgets;
|
||||||
wpWidgets = {
|
wpWidgets = {
|
||||||
|
|
||||||
init : function() {
|
init : function() {
|
||||||
var rem, sidebars = $('div.widgets-sortables');
|
var rem, sidebars = $('div.widgets-sortables'), isRTL = !! ( 'undefined' != typeof isRtl && isRtl ),
|
||||||
|
margin = ( isRtl ? 'marginRight' : 'marginLeft' );
|
||||||
|
|
||||||
$('#widgets-right').children('.widgets-holder-wrap').children('.sidebar-name').click(function(){
|
$('#widgets-right').children('.widgets-holder-wrap').children('.sidebar-name').click(function(){
|
||||||
var c = $(this).siblings('.widgets-sortables'), p = $(this).parent();
|
var c = $(this).siblings('.widgets-sortables'), p = $(this).parent();
|
||||||
|
@ -34,14 +35,14 @@ wpWidgets = {
|
||||||
if ( w > 250 && inside.closest('div.widgets-sortables').length ) {
|
if ( w > 250 && inside.closest('div.widgets-sortables').length ) {
|
||||||
css['width'] = w + 30 + 'px';
|
css['width'] = w + 30 + 'px';
|
||||||
if ( inside.closest('div.widget-liquid-right').length )
|
if ( inside.closest('div.widget-liquid-right').length )
|
||||||
css['marginLeft'] = 235 - w + 'px';
|
css[margin] = 235 - w + 'px';
|
||||||
widget.css(css);
|
widget.css(css);
|
||||||
}
|
}
|
||||||
wpWidgets.fixLabels(widget);
|
wpWidgets.fixLabels(widget);
|
||||||
inside.slideDown('fast');
|
inside.slideDown('fast');
|
||||||
} else {
|
} else {
|
||||||
inside.slideUp('fast', function() {
|
inside.slideUp('fast', function() {
|
||||||
widget.css({'width':'','marginLeft':''});
|
widget.css({'width':'', margin:''});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -97,7 +98,7 @@ wpWidgets = {
|
||||||
start: function(e,ui) {
|
start: function(e,ui) {
|
||||||
wpWidgets.fixWebkit(1);
|
wpWidgets.fixWebkit(1);
|
||||||
ui.item.children('.widget-inside').hide();
|
ui.item.children('.widget-inside').hide();
|
||||||
ui.item.css({'marginLeft':'','width':''});
|
ui.item.css({margin:'', 'width':''});
|
||||||
},
|
},
|
||||||
stop: function(e,ui) {
|
stop: function(e,ui) {
|
||||||
if ( ui.item.hasClass('ui-draggable') && ui.item.data('draggable') )
|
if ( ui.item.hasClass('ui-draggable') && ui.item.data('draggable') )
|
||||||
|
@ -114,7 +115,7 @@ wpWidgets = {
|
||||||
id = ui.item.attr('id'),
|
id = ui.item.attr('id'),
|
||||||
sb = $(this).attr('id');
|
sb = $(this).attr('id');
|
||||||
|
|
||||||
ui.item.css({'marginLeft':'','width':''});
|
ui.item.css({margin:'', 'width':''});
|
||||||
wpWidgets.fixWebkit();
|
wpWidgets.fixWebkit();
|
||||||
if ( add ) {
|
if ( add ) {
|
||||||
if ( 'multi' == add ) {
|
if ( 'multi' == add ) {
|
||||||
|
@ -271,7 +272,7 @@ wpWidgets = {
|
||||||
|
|
||||||
close : function(widget) {
|
close : function(widget) {
|
||||||
widget.children('.widget-inside').slideUp('fast', function(){
|
widget.children('.widget-inside').slideUp('fast', function(){
|
||||||
widget.css({'width':'','marginLeft':''});
|
widget.css({'width':'', margin:''});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -373,7 +373,7 @@ function wp_default_scripts( &$scripts ) {
|
||||||
$scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox' ), '20110425' );
|
$scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox' ), '20110425' );
|
||||||
$scripts->add_data( 'media-upload', 'group', 1 );
|
$scripts->add_data( 'media-upload', 'group', 1 );
|
||||||
|
|
||||||
$scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), '20110506' );
|
$scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), '20110601' );
|
||||||
$scripts->add_data( 'admin-widgets', 'group', 1 );
|
$scripts->add_data( 'admin-widgets', 'group', 1 );
|
||||||
|
|
||||||
$scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array( 'jquery' ), '20110515' );
|
$scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array( 'jquery' ), '20110515' );
|
||||||
|
@ -500,7 +500,7 @@ function wp_default_styles( &$styles ) {
|
||||||
$styles->add( 'ms', "/wp-admin/css/ms$suffix.css", array(), '20110601' );
|
$styles->add( 'ms', "/wp-admin/css/ms$suffix.css", array(), '20110601' );
|
||||||
$styles->add( 'global', "/wp-admin/css/global$suffix.css", array(), '20110511g' );
|
$styles->add( 'global', "/wp-admin/css/global$suffix.css", array(), '20110511g' );
|
||||||
$styles->add( 'media', "/wp-admin/css/media$suffix.css", array(), '20110519' );
|
$styles->add( 'media', "/wp-admin/css/media$suffix.css", array(), '20110519' );
|
||||||
$styles->add( 'widgets', "/wp-admin/css/widgets$suffix.css", array(), '20110511b' );
|
$styles->add( 'widgets', "/wp-admin/css/widgets$suffix.css", array(), '20110601' );
|
||||||
$styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css", array(), '20110511c' );
|
$styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css", array(), '20110511c' );
|
||||||
$styles->add( 'install', "/wp-admin/css/install$suffix.css", array(), '20110506' ); // Readme as well
|
$styles->add( 'install', "/wp-admin/css/install$suffix.css", array(), '20110506' ); // Readme as well
|
||||||
$styles->add( 'theme-editor', "/wp-admin/css/theme-editor$suffix.css", array(), '20110506' );
|
$styles->add( 'theme-editor', "/wp-admin/css/theme-editor$suffix.css", array(), '20110506' );
|
||||||
|
|
Loading…
Reference in New Issue