wpWidgets = {
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(){
var c = $(this).siblings('.widgets-sortables'), p = $(this).parent();
if ( w > 250 && inside.closest('div.widgets-sortables').length ) {
css['width'] = w + 30 + 'px';
if ( inside.closest('div.widget-liquid-right').length )
- css['marginLeft'] = 235 - w + 'px';
+ css[margin] = 235 - w + 'px';
widget.css(css);
}
wpWidgets.fixLabels(widget);
inside.slideDown('fast');
} else {
inside.slideUp('fast', function() {
- widget.css({'width':'','marginLeft':''});
+ widget.css({'width':'', margin:''});
});
}
return false;
start: function(e,ui) {
wpWidgets.fixWebkit(1);
ui.item.children('.widget-inside').hide();
- ui.item.css({'marginLeft':'','width':''});
+ ui.item.css({margin:'', 'width':''});
},
stop: function(e,ui) {
if ( ui.item.hasClass('ui-draggable') && ui.item.data('draggable') )
id = ui.item.attr('id'),
sb = $(this).attr('id');
- ui.item.css({'marginLeft':'','width':''});
+ ui.item.css({margin:'', 'width':''});
wpWidgets.fixWebkit();
if ( add ) {
if ( 'multi' == add ) {
close : function(widget) {
widget.children('.widget-inside').slideUp('fast', function(){
- widget.css({'width':'','marginLeft':''});
+ widget.css({'width':'', margin:''});
});
}
};