Replace .attr() with .prop() as per jQuery 1.6.1. Also fixes couple places where the JS wasn't working because attr('some', '') does not remove the HTML property now, see #17311
git-svn-id: http://svn.automattic.com/wordpress/trunk@18027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
51fe428865
commit
65f9c441a7
|
@ -114,7 +114,7 @@ columns = {
|
|||
var that = this;
|
||||
$('.hide-column-tog', '#adv-settings').click( function() {
|
||||
var $t = $(this), column = $t.val();
|
||||
if ( $t.attr('checked') )
|
||||
if ( $t.prop('checked') )
|
||||
that.checked(column);
|
||||
else
|
||||
that.unchecked(column);
|
||||
|
@ -261,13 +261,13 @@ $(document).ready( function() {
|
|||
checks = $( lastClicked ).closest( 'form' ).find( ':checkbox' );
|
||||
first = checks.index( lastClicked );
|
||||
last = checks.index( this );
|
||||
checked = $(this).attr('checked');
|
||||
checked = $(this).prop('checked');
|
||||
if ( 0 < first && 0 < last && first != last ) {
|
||||
checks.slice( first, last ).attr( 'checked', function(){
|
||||
checks.slice( first, last ).prop( 'checked', function(){
|
||||
if ( $(this).closest('tr').is(':visible') )
|
||||
return checked ? 'checked' : '';
|
||||
return checked;
|
||||
|
||||
return '';
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -61,7 +61,7 @@ setCommentsList = function() {
|
|||
el = $('#comment-' + id);
|
||||
note = $('#' + action + '-undo-holder').html();
|
||||
|
||||
el.find('.check-column :checkbox').attr('checked', ''); // Uncheck the row so as not to be affected by Bulk Edits.
|
||||
el.find('.check-column :checkbox').prop('checked', false); // Uncheck the row so as not to be affected by Bulk Edits.
|
||||
|
||||
if ( el.siblings('#replyrow').length && commentReply.cid == id )
|
||||
commentReply.close();
|
||||
|
@ -569,14 +569,14 @@ $(document).ready(function(){
|
|||
|
||||
toggle_all = function() {
|
||||
toggleWithKeyboard = true;
|
||||
$('input:checkbox', '#cb').click().attr('checked', '');
|
||||
$('input:checkbox', '#cb').click().prop('checked', false);
|
||||
toggleWithKeyboard = false;
|
||||
};
|
||||
|
||||
make_bulk = function(value) {
|
||||
return function() {
|
||||
var scope = $('select[name="action"]');
|
||||
$('option[value="' + value + '"]', scope).attr('selected', 'selected');
|
||||
$('option[value="' + value + '"]', scope).prop('selected', true);
|
||||
$('#doaction').click();
|
||||
}
|
||||
};
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,7 @@ imageEdit = {
|
|||
$('input', el).removeAttr('disabled');
|
||||
} else {
|
||||
el.addClass('disabled');
|
||||
$('input', el).attr('disabled', 'disabled');
|
||||
$('input', el).prop('disabled', true);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -178,7 +178,7 @@ imageEdit = {
|
|||
if ( $('#imgedit-history-' + postid).val() && $('#imgedit-undone-' + postid).val() == 0 )
|
||||
$('input.imgedit-submit-btn', '#imgedit-panel-' + postid).removeAttr('disabled');
|
||||
else
|
||||
$('input.imgedit-submit-btn', '#imgedit-panel-' + postid).attr('disabled', 'disabled');
|
||||
$('input.imgedit-submit-btn', '#imgedit-panel-' + postid).prop('disabled', true);
|
||||
|
||||
t.toggleEditor(postid, 0);
|
||||
}).attr('src', ajaxurl + '?' + $.param(data));
|
||||
|
@ -271,7 +271,7 @@ imageEdit = {
|
|||
var data, elem = $('#image-editor-' + postid), head = $('#media-head-' + postid),
|
||||
btn = $('#imgedit-open-btn-' + postid), spin = btn.siblings('img');
|
||||
|
||||
btn.attr('disabled', 'disabled');
|
||||
btn.prop('disabled', true);
|
||||
spin.css('visibility', 'visible');
|
||||
|
||||
data = {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -34,10 +34,10 @@ inlineEditPost = {
|
|||
|
||||
$('#inline-edit .inline-edit-private input[value="private"]').click( function(){
|
||||
var pw = $('input.inline-edit-password-input');
|
||||
if ( $(this).attr('checked') ) {
|
||||
pw.val('').attr('disabled', 'disabled');
|
||||
if ( $(this).prop('checked') ) {
|
||||
pw.val('').prop('disabled', true);
|
||||
} else {
|
||||
pw.attr('disabled', '');
|
||||
pw.prop('disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -94,7 +94,7 @@ inlineEditPost = {
|
|||
$('#bulk-edit').addClass('inline-editor').show();
|
||||
|
||||
$('tbody th.check-column input[type="checkbox"]').each(function(i){
|
||||
if ( $(this).attr('checked') ) {
|
||||
if ( $(this).prop('checked') ) {
|
||||
c = false;
|
||||
var id = $(this).val(), theTitle;
|
||||
theTitle = $('#inline_'+id+' .post_title').text() || inlineEditL10n.notitle;
|
||||
|
@ -109,7 +109,7 @@ inlineEditPost = {
|
|||
$('#bulk-titles a').click(function(){
|
||||
var id = $(this).attr('id').substr(1);
|
||||
|
||||
$('table.widefat input[value="' + id + '"]').attr('checked', '');
|
||||
$('table.widefat input[value="' + id + '"]').prop('checked', false);
|
||||
$('#ttle'+id).remove();
|
||||
});
|
||||
|
||||
|
@ -155,11 +155,11 @@ inlineEditPost = {
|
|||
}
|
||||
|
||||
if ( $('.comment_status', rowData).text() == 'open' )
|
||||
$('input[name="comment_status"]', editRow).attr("checked", "checked");
|
||||
$('input[name="comment_status"]', editRow).prop("checked", true);
|
||||
if ( $('.ping_status', rowData).text() == 'open' )
|
||||
$('input[name="ping_status"]', editRow).attr("checked", "checked");
|
||||
$('input[name="ping_status"]', editRow).prop("checked", true);
|
||||
if ( $('.sticky', rowData).text() == 'sticky' )
|
||||
$('input[name="sticky"]', editRow).attr("checked", "checked");
|
||||
$('input[name="sticky"]', editRow).prop("checked", true);
|
||||
|
||||
// hierarchical taxonomies
|
||||
$('.post_category', rowData).each(function(){
|
||||
|
@ -188,8 +188,8 @@ inlineEditPost = {
|
|||
$('select[name="_status"] option[value="future"]', editRow).remove();
|
||||
|
||||
if ( 'private' == status ) {
|
||||
$('input[name="keep_private"]', editRow).attr("checked", "checked");
|
||||
$('input.inline-edit-password-input').val('').attr('disabled', 'disabled');
|
||||
$('input[name="keep_private"]', editRow).prop("checked", true);
|
||||
$('input.inline-edit-password-input').val('').prop('disabled', true);
|
||||
}
|
||||
|
||||
// remove the current page and children from the parent dropdown
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -29,7 +29,7 @@ jQuery(document).ready( function($) {
|
|||
return;
|
||||
noSyncChecks = true;
|
||||
var th = $(this), c = th.is(':checked'), id = th.val().toString();
|
||||
$('#in-link-category-' + id + ', #in-popular-category-' + id).attr( 'checked', c );
|
||||
$('#in-link-category-' + id + ', #in-popular-category-' + id).prop( 'checked', c );
|
||||
noSyncChecks = false;
|
||||
};
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(document).ready(function(c){var b,a=false,d,e;c("#link_name").focus();postboxes.add_postbox_toggles("link");c("#category-tabs a").click(function(){var f=c(this).attr("href");c(this).parent().addClass("tabs").siblings("li").removeClass("tabs");c(".tabs-panel").hide();c(f).show();if("#categories-all"==f){deleteUserSetting("cats")}else{setUserSetting("cats","pop")}return false});if(getUserSetting("cats")){c('#category-tabs a[href="#categories-pop"]').click()}b=c("#newcat").one("focus",function(){c(this).val("").removeClass("form-input-tip")});c("#category-add-submit").click(function(){b.focus()});d=function(){if(a){return}a=true;var f=c(this),h=f.is(":checked"),g=f.val().toString();c("#in-link-category-"+g+", #in-popular-category-"+g).attr("checked",h);a=false};e=function(g,f){c(f.what+" response_data",g).each(function(){var h=c(c(this).text());h.find("label").each(function(){var j=c(this),l=j.find("input").val(),m=j.find("input")[0].id,i=c.trim(j.text()),k;c("#"+m).change(d);k=c('<option value="'+parseInt(l,10)+'"></option>').text(i)})})};c("#categorychecklist").wpList({alt:"",what:"link-category",response:"category-ajax-response",addAfter:e});c('a[href="#categories-all"]').click(function(){deleteUserSetting("cats")});c('a[href="#categories-pop"]').click(function(){setUserSetting("cats","pop")});if("pop"==getUserSetting("cats")){c('a[href="#categories-pop"]').click()}c("#category-add-toggle").click(function(){c(this).parents("div:first").toggleClass("wp-hidden-children");c('#category-tabs a[href="#categories-all"]').click();c("#newcategory").focus();return false});c(".categorychecklist :checkbox").change(d).filter(":checked").change()});
|
||||
jQuery(document).ready(function(c){var b,a=false,d,e;c("#link_name").focus();postboxes.add_postbox_toggles("link");c("#category-tabs a").click(function(){var f=c(this).attr("href");c(this).parent().addClass("tabs").siblings("li").removeClass("tabs");c(".tabs-panel").hide();c(f).show();if("#categories-all"==f){deleteUserSetting("cats")}else{setUserSetting("cats","pop")}return false});if(getUserSetting("cats")){c('#category-tabs a[href="#categories-pop"]').click()}b=c("#newcat").one("focus",function(){c(this).val("").removeClass("form-input-tip")});c("#category-add-submit").click(function(){b.focus()});d=function(){if(a){return}a=true;var f=c(this),h=f.is(":checked"),g=f.val().toString();c("#in-link-category-"+g+", #in-popular-category-"+g).prop("checked",h);a=false};e=function(g,f){c(f.what+" response_data",g).each(function(){var h=c(c(this).text());h.find("label").each(function(){var j=c(this),l=j.find("input").val(),m=j.find("input")[0].id,i=c.trim(j.text()),k;c("#"+m).change(d);k=c('<option value="'+parseInt(l,10)+'"></option>').text(i)})})};c("#categorychecklist").wpList({alt:"",what:"link-category",response:"category-ajax-response",addAfter:e});c('a[href="#categories-all"]').click(function(){deleteUserSetting("cats")});c('a[href="#categories-pop"]').click(function(){setUserSetting("cats","pop")});if("pop"==getUserSetting("cats")){c('a[href="#categories-pop"]').click()}c("#category-add-toggle").click(function(){c(this).parents("div:first").toggleClass("wp-hidden-children");c('#category-tabs a[href="#categories-all"]').click();c("#newcategory").focus();return false});c(".categorychecklist :checkbox").change(d).filter(":checked").change()});
|
|
@ -144,7 +144,7 @@ window.listTable = {
|
|||
tablenav.find('.first-page, .prev-page').toggleClass('disabled', 1 == $.query.GET('paged'));
|
||||
tablenav.find('.next-page, .last-page').toggleClass('disabled', response.total_pages == $.query.GET('paged'));
|
||||
|
||||
$('th.column-cb :input').attr('checked', false);
|
||||
$('th.column-cb :input').prop('checked', false);
|
||||
|
||||
if ( history.replaceState ) {
|
||||
history.replaceState({}, '', location.pathname + $.query);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -598,7 +598,7 @@ var wpNavMenu;
|
|||
};
|
||||
} else {
|
||||
// Make the post boxes read-only, as they can't be used yet
|
||||
$('#menu-settings-column').find('input,select').attr('disabled', 'disabled').end().find('a').attr('href', '#').unbind('click');
|
||||
$('#menu-settings-column').find('input,select').prop('disabled', true).end().find('a').attr('href', '#').unbind('click');
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -640,7 +640,7 @@ var wpNavMenu;
|
|||
if( items.length === items.filter(':checked').length )
|
||||
items.removeAttr('checked');
|
||||
else
|
||||
items.attr('checked', 'checked');
|
||||
items.prop('checked', true);
|
||||
return false;
|
||||
}
|
||||
} else if ( target.hasClass('submit-add-to-menu') ) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -44,7 +44,7 @@ tagBox = {
|
|||
if ( !thetags.length )
|
||||
return;
|
||||
|
||||
disabled = thetags.attr('disabled');
|
||||
disabled = thetags.prop('disabled');
|
||||
|
||||
current_tags = thetags.val().split(',');
|
||||
tagchecklist.empty();
|
||||
|
@ -294,7 +294,7 @@ jQuery(document).ready( function($) {
|
|||
return;
|
||||
noSyncChecks = true;
|
||||
var th = jQuery(this), c = th.is(':checked'), id = th.val().toString();
|
||||
$('#in-' + taxonomy + '-' + id + ', #in-' + taxonomy + '-category-' + id).attr( 'checked', c );
|
||||
$('#in-' + taxonomy + '-' + id + ', #in-' + taxonomy + '-category-' + id).prop( 'checked', c );
|
||||
noSyncChecks = false;
|
||||
};
|
||||
|
||||
|
@ -331,7 +331,7 @@ jQuery(document).ready( function($) {
|
|||
$('#' + taxonomy + 'checklist li.popular-category :checkbox, #' + taxonomy + 'checklist-pop :checkbox').live( 'click', function(){
|
||||
var t = $(this), c = t.is(':checked'), id = t.val();
|
||||
if ( id && t.parents('#taxonomy-'+taxonomy).length )
|
||||
$('#in-' + taxonomy + '-' + id + ', #in-popular-' + taxonomy + '-' + id).attr( 'checked', c );
|
||||
$('#in-' + taxonomy + '-' + id + ', #in-popular-' + taxonomy + '-' + id).prop( 'checked', c );
|
||||
});
|
||||
|
||||
}); // end cats
|
||||
|
@ -355,7 +355,7 @@ jQuery(document).ready( function($) {
|
|||
function updateVisibility() {
|
||||
var pvSelect = $('#post-visibility-select');
|
||||
if ( $('input:radio:checked', pvSelect).val() != 'public' ) {
|
||||
$('#sticky').attr('checked', false);
|
||||
$('#sticky').prop('checked', false);
|
||||
$('#sticky-span').hide();
|
||||
} else {
|
||||
$('#sticky-span').show();
|
||||
|
@ -413,7 +413,7 @@ jQuery(document).ready( function($) {
|
|||
} else {
|
||||
optPublish.html( postL10n.privatelyPublished );
|
||||
}
|
||||
$('option[value="publish"]', postStatus).attr('selected', true);
|
||||
$('option[value="publish"]', postStatus).prop('selected', true);
|
||||
$('.edit-post-status', '#misc-publishing-actions').hide();
|
||||
} else {
|
||||
if ( $('#original_post_status').val() == 'future' || $('#original_post_status').val() == 'draft' ) {
|
||||
|
@ -452,9 +452,9 @@ jQuery(document).ready( function($) {
|
|||
|
||||
$('.cancel-post-visibility', '#post-visibility-select').click(function () {
|
||||
$('#post-visibility-select').slideUp('fast');
|
||||
$('#visibility-radio-' + $('#hidden-post-visibility').val()).attr('checked', true);
|
||||
$('#visibility-radio-' + $('#hidden-post-visibility').val()).prop('checked', true);
|
||||
$('#post_password').val($('#hidden_post_password').val());
|
||||
$('#sticky').attr('checked', $('#hidden-post-sticky').attr('checked'));
|
||||
$('#sticky').prop('checked', $('#hidden-post-sticky').prop('checked'));
|
||||
$('#post-visibility-display').html(visibility);
|
||||
$('.edit-visibility', '#visibility').show();
|
||||
updateText();
|
||||
|
@ -469,10 +469,10 @@ jQuery(document).ready( function($) {
|
|||
updateText();
|
||||
|
||||
if ( $('input:radio:checked', pvSelect).val() != 'public' ) {
|
||||
$('#sticky').attr('checked', false);
|
||||
$('#sticky').prop('checked', false);
|
||||
} // WEAPON LOCKED
|
||||
|
||||
if ( true == $('#sticky').attr('checked') ) {
|
||||
if ( true == $('#sticky').prop('checked') ) {
|
||||
sticky = 'Sticky';
|
||||
} else {
|
||||
sticky = '';
|
||||
|
@ -556,7 +556,7 @@ jQuery(document).ready( function($) {
|
|||
}, function(data) {
|
||||
$('#edit-slug-box').html(data);
|
||||
b.html(revert_b);
|
||||
real_slug.attr('value', new_slug);
|
||||
real_slug.val(new_slug);
|
||||
makeSlugeditClickable();
|
||||
$('#view-post-btn').show();
|
||||
});
|
||||
|
@ -567,7 +567,7 @@ jQuery(document).ready( function($) {
|
|||
$('#view-post-btn').show();
|
||||
e.html(revert_e);
|
||||
b.html(revert_b);
|
||||
real_slug.attr('value', revert_slug);
|
||||
real_slug.val(revert_slug);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
@ -588,7 +588,7 @@ jQuery(document).ready( function($) {
|
|||
b.children('.cancel').click();
|
||||
return false;
|
||||
}
|
||||
real_slug.attr('value', this.value);
|
||||
real_slug.val(this.value);
|
||||
}).focus();
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -22,13 +22,13 @@ var postboxes;
|
|||
} );
|
||||
$('.postbox a.dismiss').click( function(e) {
|
||||
var hide_id = $(this).parents('.postbox').attr('id') + '-hide';
|
||||
$( '#' + hide_id ).attr('checked', false).triggerHandler('click');
|
||||
$( '#' + hide_id ).prop('checked', false).triggerHandler('click');
|
||||
return false;
|
||||
} );
|
||||
$('.hide-postbox-tog').click( function() {
|
||||
var box = $(this).val();
|
||||
|
||||
if ( $(this).attr('checked') ) {
|
||||
if ( $(this).prop('checked') ) {
|
||||
$('#' + box).show();
|
||||
if ( $.isFunction( postboxes.pbshow ) )
|
||||
postboxes.pbshow( box );
|
||||
|
|
|
@ -1 +1 @@
|
|||
var postboxes;(function($){postboxes={add_postbox_toggles:function(page,args){this.init(page,args);$(".postbox h3, .postbox .handlediv").click(function(){var p=$(this).parent(".postbox"),id=p.attr("id");if("dashboard_browser_nag"==id){return}p.toggleClass("closed");postboxes.save_state(page);if(id){if(!p.hasClass("closed")&&$.isFunction(postboxes.pbshow)){postboxes.pbshow(id)}else{if(p.hasClass("closed")&&$.isFunction(postboxes.pbhide)){postboxes.pbhide(id)}}}});$(".postbox h3 a").click(function(e){e.stopPropagation()});$(".postbox a.dismiss").click(function(e){var hide_id=$(this).parents(".postbox").attr("id")+"-hide";$("#"+hide_id).attr("checked",false).triggerHandler("click");return false});$(".hide-postbox-tog").click(function(){var box=$(this).val();if($(this).attr("checked")){$("#"+box).show();if($.isFunction(postboxes.pbshow)){postboxes.pbshow(box)}}else{$("#"+box).hide();if($.isFunction(postboxes.pbhide)){postboxes.pbhide(box)}}postboxes.save_state(page)});$('.columns-prefs input[type="radio"]').click(function(){var num=$(this).val(),i,el,p=$("#poststuff");if(p.length){if(num==2){p.addClass("has-right-sidebar");$("#side-sortables").addClass("temp-border")}else{if(num==1){p.removeClass("has-right-sidebar");$("#normal-sortables").append($("#side-sortables").children(".postbox"))}}}else{for(i=4;(i>num&&i>1);i--){el=$("#"+colname(i)+"-sortables");$("#"+colname(i-1)+"-sortables").append(el.children(".postbox"));el.parent().hide()}for(i=1;i<=num;i++){el=$("#"+colname(i)+"-sortables");if(el.parent().is(":hidden")){el.addClass("temp-border").parent().show()}}$(".postbox-container:visible").css("width",98/num+"%")}postboxes.save_order(page)});function colname(n){switch(n){case 1:return"normal";break;case 2:return"side";break;case 3:return"column3";break;case 4:return"column4";break;default:return""}}},init:function(page,args){$.extend(this,args||{});$("#wpbody-content").css("overflow","hidden");$(".meta-box-sortables").sortable({placeholder:"sortable-placeholder",connectWith:".meta-box-sortables",items:".postbox",handle:".hndle",cursor:"move",distance:2,tolerance:"pointer",forcePlaceholderSize:true,helper:"clone",opacity:0.65,start:function(e,ui){$("body").css({WebkitUserSelect:"none",KhtmlUserSelect:"none"})},stop:function(e,ui){postboxes.save_order(page);ui.item.parent().removeClass("temp-border");$("body").css({WebkitUserSelect:"",KhtmlUserSelect:""})}})},save_state:function(page){var closed=$(".postbox").filter(".closed").map(function(){return this.id}).get().join(","),hidden=$(".postbox").filter(":hidden").map(function(){return this.id}).get().join(",");$.post(ajaxurl,{action:"closed-postboxes",closed:closed,hidden:hidden,closedpostboxesnonce:jQuery("#closedpostboxesnonce").val(),page:page})},save_order:function(page){var postVars,page_columns=$(".columns-prefs input:checked").val()||0;postVars={action:"meta-box-order",_ajax_nonce:$("#meta-box-order-nonce").val(),page_columns:page_columns,page:page};$(".meta-box-sortables").each(function(){postVars["order["+this.id.split("-")[0]+"]"]=$(this).sortable("toArray").join(",")});$.post(ajaxurl,postVars)},pbshow:false,pbhide:false}}(jQuery));
|
||||
var postboxes;(function(a){postboxes={add_postbox_toggles:function(c,b){this.init(c,b);a(".postbox h3, .postbox .handlediv").click(function(){var e=a(this).parent(".postbox"),f=e.attr("id");if("dashboard_browser_nag"==f){return}e.toggleClass("closed");postboxes.save_state(c);if(f){if(!e.hasClass("closed")&&a.isFunction(postboxes.pbshow)){postboxes.pbshow(f)}else{if(e.hasClass("closed")&&a.isFunction(postboxes.pbhide)){postboxes.pbhide(f)}}}});a(".postbox h3 a").click(function(f){f.stopPropagation()});a(".postbox a.dismiss").click(function(g){var f=a(this).parents(".postbox").attr("id")+"-hide";a("#"+f).prop("checked",false).triggerHandler("click");return false});a(".hide-postbox-tog").click(function(){var e=a(this).val();if(a(this).prop("checked")){a("#"+e).show();if(a.isFunction(postboxes.pbshow)){postboxes.pbshow(e)}}else{a("#"+e).hide();if(a.isFunction(postboxes.pbhide)){postboxes.pbhide(e)}}postboxes.save_state(c)});a('.columns-prefs input[type="radio"]').click(function(){var e=a(this).val(),f,g,h=a("#poststuff");if(h.length){if(e==2){h.addClass("has-right-sidebar");a("#side-sortables").addClass("temp-border")}else{if(e==1){h.removeClass("has-right-sidebar");a("#normal-sortables").append(a("#side-sortables").children(".postbox"))}}}else{for(f=4;(f>e&&f>1);f--){g=a("#"+d(f)+"-sortables");a("#"+d(f-1)+"-sortables").append(g.children(".postbox"));g.parent().hide()}for(f=1;f<=e;f++){g=a("#"+d(f)+"-sortables");if(g.parent().is(":hidden")){g.addClass("temp-border").parent().show()}}a(".postbox-container:visible").css("width",98/e+"%")}postboxes.save_order(c)});function d(e){switch(e){case 1:return"normal";break;case 2:return"side";break;case 3:return"column3";break;case 4:return"column4";break;default:return""}}},init:function(c,b){a.extend(this,b||{});a("#wpbody-content").css("overflow","hidden");a(".meta-box-sortables").sortable({placeholder:"sortable-placeholder",connectWith:".meta-box-sortables",items:".postbox",handle:".hndle",cursor:"move",distance:2,tolerance:"pointer",forcePlaceholderSize:true,helper:"clone",opacity:0.65,start:function(f,d){a("body").css({WebkitUserSelect:"none",KhtmlUserSelect:"none"})},stop:function(f,d){postboxes.save_order(c);d.item.parent().removeClass("temp-border");a("body").css({WebkitUserSelect:"",KhtmlUserSelect:""})}})},save_state:function(d){var b=a(".postbox").filter(".closed").map(function(){return this.id}).get().join(","),c=a(".postbox").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"closed-postboxes",closed:b,hidden:c,closedpostboxesnonce:jQuery("#closedpostboxesnonce").val(),page:d})},save_order:function(c){var b,d=a(".columns-prefs input:checked").val()||0;b={action:"meta-box-order",_ajax_nonce:a("#meta-box-order-nonce").val(),page_columns:d,page:c};a(".meta-box-sortables").each(function(){b["order["+this.id.split("-")[0]+"]"]=a(this).sortable("toArray").join(",")});a.post(ajaxurl,b)},pbshow:false,pbhide:false}}(jQuery));
|
|
@ -33,7 +33,7 @@
|
|||
$('#pass1').val('').keyup( check_pass_strength );
|
||||
$('#pass2').val('').keyup( check_pass_strength );
|
||||
$('#pass-strength-result').show();
|
||||
$('.color-palette').click(function(){$(this).siblings('input[name="admin_color"]').attr('checked', 'checked')});
|
||||
$('.color-palette').click(function(){$(this).siblings('input[name="admin_color"]').prop('checked', true)});
|
||||
$('#first_name, #last_name, #nickname').blur(function(){
|
||||
var select = $('#display_name'), current = select.find('option:selected').attr('id'), dub = [],
|
||||
inputs = {
|
||||
|
|
|
@ -1 +1 @@
|
|||
(function(a){function b(){var e=a("#pass1").val(),d=a("#user_login").val(),c=a("#pass2").val(),f;a("#pass-strength-result").removeClass("short bad good strong");if(!e){a("#pass-strength-result").html(pwsL10n.empty);return}f=passwordStrength(e,d,c);switch(f){case 2:a("#pass-strength-result").addClass("bad").html(pwsL10n.bad);break;case 3:a("#pass-strength-result").addClass("good").html(pwsL10n.good);break;case 4:a("#pass-strength-result").addClass("strong").html(pwsL10n.strong);break;case 5:a("#pass-strength-result").addClass("short").html(pwsL10n.mismatch);break;default:a("#pass-strength-result").addClass("short").html(pwsL10n["short"])}}a(document).ready(function(){a("#pass1").val("").keyup(b);a("#pass2").val("").keyup(b);a("#pass-strength-result").show();a(".color-palette").click(function(){a(this).siblings('input[name="admin_color"]').attr("checked","checked")});a("#first_name, #last_name, #nickname").blur(function(){var c=a("#display_name"),e=c.find("option:selected").attr("id"),f=[],d={display_nickname:a("#nickname").val(),display_username:a("#user_login").val(),display_firstname:a("#first_name").val(),display_lastname:a("#last_name").val()};if(d.display_firstname&&d.display_lastname){d.display_firstlast=d.display_firstname+" "+d.display_lastname;d.display_lastfirst=d.display_lastname+" "+d.display_firstname}a("option",c).remove();a.each(d,function(i,h){var g;if(d[i].length&&a.inArray(h,f)==-1){f.push(h);g=i==e?'selected="selected"':"";c.append('<option id="'+i+'" '+g+'">'+h+"</option>")}})})})})(jQuery);
|
||||
(function(a){function b(){var e=a("#pass1").val(),d=a("#user_login").val(),c=a("#pass2").val(),f;a("#pass-strength-result").removeClass("short bad good strong");if(!e){a("#pass-strength-result").html(pwsL10n.empty);return}f=passwordStrength(e,d,c);switch(f){case 2:a("#pass-strength-result").addClass("bad").html(pwsL10n.bad);break;case 3:a("#pass-strength-result").addClass("good").html(pwsL10n.good);break;case 4:a("#pass-strength-result").addClass("strong").html(pwsL10n.strong);break;case 5:a("#pass-strength-result").addClass("short").html(pwsL10n.mismatch);break;default:a("#pass-strength-result").addClass("short").html(pwsL10n["short"])}}a(document).ready(function(){a("#pass1").val("").keyup(b);a("#pass2").val("").keyup(b);a("#pass-strength-result").show();a(".color-palette").click(function(){a(this).siblings('input[name="admin_color"]').prop("checked",true)});a("#first_name, #last_name, #nickname").blur(function(){var c=a("#display_name"),e=c.find("option:selected").attr("id"),f=[],d={display_nickname:a("#nickname").val(),display_username:a("#user_login").val(),display_firstname:a("#first_name").val(),display_lastname:a("#last_name").val()};if(d.display_firstname&&d.display_lastname){d.display_firstlast=d.display_firstname+" "+d.display_lastname;d.display_lastfirst=d.display_lastname+" "+d.display_firstname}a("option",c).remove();a.each(d,function(i,h){var g;if(d[i].length&&a.inArray(h,f)==-1){f.push(h);g=i==e?'selected="selected"':"";c.append('<option id="'+i+'" '+g+'">'+h+"</option>")}})})})})(jQuery);
|
|
@ -1,10 +1,10 @@
|
|||
jQuery(document).ready( function($) {
|
||||
$('#link_rel').attr('readonly', 'readonly');
|
||||
$('#link_rel').prop('readonly', true);
|
||||
$('#linkxfndiv input').bind('click keyup', function() {
|
||||
var isMe = $('#me').is(':checked'), inputs = '';
|
||||
$('input.valinp').each( function() {
|
||||
if (isMe) {
|
||||
$(this).attr('disabled', 'disabled').parent().addClass('disabled');
|
||||
$(this).prop('disabled', true).parent().addClass('disabled');
|
||||
} else {
|
||||
$(this).removeAttr('disabled').parent().removeClass('disabled');
|
||||
if ( $(this).is(':checked') && $(this).val() != '')
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(document).ready(function(a){a("#link_rel").attr("readonly","readonly");a("#linkxfndiv input").bind("click keyup",function(){var c=a("#me").is(":checked"),b="";a("input.valinp").each(function(){if(c){a(this).attr("disabled","disabled").parent().addClass("disabled")}else{a(this).removeAttr("disabled").parent().removeClass("disabled");if(a(this).is(":checked")&&a(this).val()!=""){b+=a(this).val()+" "}}});a("#link_rel").val((c)?"me":b.substr(0,b.length-1))})});
|
||||
jQuery(document).ready(function(a){a("#link_rel").prop("readonly",true);a("#linkxfndiv input").bind("click keyup",function(){var c=a("#me").is(":checked"),b="";a("input.valinp").each(function(){if(c){a(this).prop("disabled",true).parent().addClass("disabled")}else{a(this).removeAttr("disabled").parent().removeClass("disabled");if(a(this).is(":checked")&&a(this).val()!=""){b+=a(this).val()+" "}}});a("#link_rel").val((c)?"me":b.substr(0,b.length-1))})});
|
|
@ -190,7 +190,7 @@ function autosave_enable_buttons() {
|
|||
}
|
||||
|
||||
function autosave_disable_buttons() {
|
||||
jQuery(':button, :submit', '#submitpost').attr('disabled', 'disabled');
|
||||
jQuery(':button, :submit', '#submitpost').prop('disabled', true);
|
||||
// Re-enable 5 sec later. Just gives autosave a head start to avoid collisions.
|
||||
setTimeout(autosave_enable_buttons, 5000);
|
||||
}
|
||||
|
@ -268,9 +268,9 @@ autosave = function() {
|
|||
} );
|
||||
post_data["catslist"] = goodcats.join(",");
|
||||
|
||||
if ( jQuery("#comment_status").attr("checked") )
|
||||
if ( jQuery("#comment_status").prop("checked") )
|
||||
post_data["comment_status"] = 'open';
|
||||
if ( jQuery("#ping_status").attr("checked") )
|
||||
if ( jQuery("#ping_status").prop("checked") )
|
||||
post_data["ping_status"] = 'open';
|
||||
if ( jQuery("#excerpt").size() )
|
||||
post_data["excerpt"] = jQuery("#excerpt").val();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -20,8 +20,8 @@ function fileQueued(fileObj) {
|
|||
jQuery('.progress', '#media-item-' + fileObj.id).show();
|
||||
|
||||
// Disable submit and enable cancel
|
||||
jQuery('#insert-gallery').attr('disabled', 'disabled');
|
||||
jQuery('#cancel-upload').attr('disabled', '');
|
||||
jQuery('#insert-gallery').prop('disabled', true);
|
||||
jQuery('#cancel-upload').prop('disabled', false);
|
||||
}
|
||||
|
||||
function uploadStart(fileObj) {
|
||||
|
@ -232,8 +232,8 @@ function uploadSuccess(fileObj, serverData) {
|
|||
function uploadComplete(fileObj) {
|
||||
// If no more uploads queued, enable the submit button
|
||||
if ( swfu.getStats().files_queued == 0 ) {
|
||||
jQuery('#cancel-upload').attr('disabled', 'disabled');
|
||||
jQuery('#insert-gallery').attr('disabled', '');
|
||||
jQuery('#cancel-upload').prop('disabled', true);
|
||||
jQuery('#insert-gallery').prop('disabled', false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -106,7 +106,7 @@ var wpLink;
|
|||
inputs.title.val( ed.dom.getAttrib(e, 'title') );
|
||||
// Set open in new tab.
|
||||
if ( "_blank" == ed.dom.getAttrib(e, 'target') )
|
||||
inputs.openInNewTab.attr('checked','checked');
|
||||
inputs.openInNewTab.prop('checked', true);
|
||||
// Update save prompt.
|
||||
inputs.submit.val( wpLinkL10n.update );
|
||||
|
||||
|
@ -139,7 +139,7 @@ var wpLink;
|
|||
return {
|
||||
href : inputs.url.val(),
|
||||
title : inputs.title.val(),
|
||||
target : inputs.openInNewTab.attr('checked') ? '_blank' : ''
|
||||
target : inputs.openInNewTab.prop('checked') ? '_blank' : ''
|
||||
};
|
||||
},
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -64,7 +64,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
|
||||
$scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20101110' );
|
||||
|
||||
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20110520' );
|
||||
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20110524' );
|
||||
$scripts->add_data( 'common', 'group', 1 );
|
||||
$scripts->localize( 'common', 'commonL10n', array(
|
||||
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete."),
|
||||
|
@ -109,7 +109,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'l10n_print_after' => 'try{convertEntities(wpAjax);}catch(e){};'
|
||||
) );
|
||||
|
||||
$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20110515' );
|
||||
$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('schedule', 'wp-ajax-response'), '20110524' );
|
||||
$scripts->add_data( 'autosave', 'group', 1 );
|
||||
|
||||
$scripts->add( 'wp-lists', "/wp-includes/js/wp-lists$suffix.js", array('wp-ajax-response'), '20110521' );
|
||||
|
@ -220,7 +220,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'swfupload-all', '/wp-includes/js/swfupload/swfupload-all.js', array(), '2201');
|
||||
}
|
||||
|
||||
$scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20110512');
|
||||
$scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20110524');
|
||||
$max_upload_size = ( (int) ( $max_up = @ini_get('upload_max_filesize') ) < (int) ( $max_post = @ini_get('post_max_size') ) ) ? $max_up : $max_post;
|
||||
if ( empty($max_upload_size) )
|
||||
$max_upload_size = __('not configured');
|
||||
|
@ -266,13 +266,13 @@ function wp_default_scripts( &$scripts ) {
|
|||
'l10n_print_after' => 'try{convertEntities(pwsL10n);}catch(e){};'
|
||||
) );
|
||||
|
||||
$scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter' ), '20110429' );
|
||||
$scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter' ), '20110524' );
|
||||
$scripts->add_data( 'user-profile', 'group', 1 );
|
||||
|
||||
$scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", false, '20110131' );
|
||||
$scripts->add_data( 'admin-bar', 'group', 1 );
|
||||
|
||||
$scripts->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js", array( 'jquery', 'wpdialogs' ), '20110501' );
|
||||
$scripts->add( 'wplink', "/wp-includes/js/tinymce/plugins/wplink/js/wplink$suffix.js", array( 'jquery', 'wpdialogs' ), '20110524' );
|
||||
$scripts->add_data( 'wplink', 'group', 1 );
|
||||
$scripts->localize( 'wplink', 'wpLinkL10n', array(
|
||||
'title' => __('Insert/edit link'),
|
||||
|
@ -312,7 +312,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'admin-custom-fields', "/wp-admin/js/custom-fields$suffix.js", array('wp-lists'), '20110429' );
|
||||
$scripts->add_data( 'admin-custom-fields', 'group', 1 );
|
||||
|
||||
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'jquery-query'), '20110521' );
|
||||
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'jquery-query'), '20110524' );
|
||||
$scripts->add_data( 'admin-comments', 'group', 1 );
|
||||
$scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
|
||||
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
|
||||
|
@ -321,13 +321,13 @@ function wp_default_scripts( &$scripts ) {
|
|||
'reply' => __( 'Reply' )
|
||||
) );
|
||||
|
||||
$scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", array('jquery'), '20100403' );
|
||||
$scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", array('jquery'), '20110524' );
|
||||
$scripts->add_data( 'xfn', 'group', 1 );
|
||||
|
||||
$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), '20110518' );
|
||||
$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), '20110524' );
|
||||
$scripts->add_data( 'postbox', 'group', 1 );
|
||||
|
||||
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20110515' );
|
||||
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20110524' );
|
||||
$scripts->add_data( 'post', 'group', 1 );
|
||||
$scripts->localize( 'post', 'postL10n', array(
|
||||
'tagsUsed' => __('Tags used on this post:'),
|
||||
|
@ -356,7 +356,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
'l10n_print_after' => 'try{convertEntities(postL10n);}catch(e){};'
|
||||
) );
|
||||
|
||||
$scripts->add( 'link', "/wp-admin/js/link$suffix.js", array('wp-lists', 'postbox'), '20090526' );
|
||||
$scripts->add( 'link', "/wp-admin/js/link$suffix.js", array('wp-lists', 'postbox'), '20110524' );
|
||||
$scripts->add_data( 'link', 'group', 1 );
|
||||
|
||||
$scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array('jquery'), '20110429' );
|
||||
|
@ -385,7 +385,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20100407' );
|
||||
$scripts->add_data( 'theme-preview', 'group', 1 );
|
||||
|
||||
$scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest' ), '20110429' );
|
||||
$scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest' ), '20110524' );
|
||||
$scripts->add_data( 'inline-edit-post', 'group', 1 );
|
||||
$scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
|
||||
'error' => __('Error while saving the changes.'),
|
||||
|
@ -422,7 +422,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery-ui-draggable' ), '20101022' );
|
||||
$scripts->add_data( 'media', 'group', 1 );
|
||||
|
||||
$scripts->add( 'image-edit', "/wp-admin/js/image-edit$suffix.js", array('jquery', 'json2', 'imgareaselect'), '20110429' );
|
||||
$scripts->add( 'image-edit', "/wp-admin/js/image-edit$suffix.js", array('jquery', 'json2', 'imgareaselect'), '20110524' );
|
||||
$scripts->add_data( 'image-edit', 'group', 1 );
|
||||
|
||||
$scripts->add( 'set-post-thumbnail', "/wp-admin/js/set-post-thumbnail$suffix.js", array( 'jquery' ), '20100518' );
|
||||
|
@ -436,7 +436,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
) );
|
||||
|
||||
// Navigation Menus
|
||||
$scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", array('jquery-ui-sortable'), '20110429' );
|
||||
$scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", array('jquery-ui-sortable'), '20110524' );
|
||||
$scripts->localize( 'nav-menu', 'navMenuL10n', array(
|
||||
'noResultsFound' => _x('No results found.', 'search results'),
|
||||
'warnDeleteMenu' => __( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ),
|
||||
|
|
Loading…
Reference in New Issue