Update jQuery to 1.6.4, update jQuery UI to 1.8.16, add the rest of UI, add workaround for a regression in UI Draggable, see #17952

git-svn-id: http://svn.automattic.com/wordpress/trunk@18757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz
2011-09-23 05:03:31 +00:00
parent 39d6c8e659
commit e7e4ceed22
41 changed files with 668 additions and 246 deletions

View File

@@ -5,7 +5,7 @@ wpWidgets = {
init : function() {
var rem, sidebars = $('div.widgets-sortables'), isRTL = !! ( 'undefined' != typeof isRtl && isRtl ),
margin = ( isRtl ? 'marginRight' : 'marginLeft' );
margin = ( isRtl ? 'marginRight' : 'marginLeft' ), the_id;
$('#widgets-right').children('.widgets-holder-wrap').children('.sidebar-name').click(function(){
var c = $(this).siblings('.widgets-sortables'), p = $(this).parent();
@@ -80,14 +80,14 @@ wpWidgets = {
zIndex: 5,
containment: 'document',
start: function(e,ui) {
wpWidgets.fixWebkit(1);
ui.helper.find('div.widget-description').hide();
the_id = this.id;
},
stop: function(e,ui) {
if ( rem )
$(rem).hide();
rem = '';
wpWidgets.fixWebkit();
}
});
@@ -99,7 +99,6 @@ wpWidgets = {
distance: 2,
containment: 'document',
start: function(e,ui) {
wpWidgets.fixWebkit(1);
ui.item.children('.widget-inside').hide();
ui.item.css({margin:'', 'width':''});
},
@@ -119,11 +118,12 @@ wpWidgets = {
sb = $(this).attr('id');
ui.item.css({margin:'', 'width':''});
wpWidgets.fixWebkit();
if ( add ) {
if ( 'multi' == add ) {
ui.item.html( ui.item.html().replace(/<[^<>]+>/g, function(m){ return m.replace(/__i__|%i%/g, n); }) );
ui.item.attr( 'id', id.replace(/__i__|%i%/g, n) );
ui.item.attr( 'id', the_id.replace('__i__', n) );
the_id = '';
n++;
$('div#' + id).find('input.multi_number').val(n);
} else if ( 'single' == add ) {
@@ -267,15 +267,7 @@ wpWidgets = {
});
},
fixWebkit : function(n) {
n = n ? 'none' : '';
$('body').css({
WebkitUserSelect: n,
KhtmlUserSelect: n
});
},
fixLabels : function(widget) {
fixLabels : function(widget) {
widget.children('.widget-inside').find('label').each(function(){
var f = $(this).attr('for');
if ( f && f == $('input', this).attr('id') )
@@ -283,7 +275,7 @@ wpWidgets = {
});
},
close : function(widget) {
close : function(widget) {
widget.children('.widget-inside').slideUp('fast', function(){
widget.css({'width':'', margin:''});
});

File diff suppressed because one or more lines are too long