mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-06 13:44:30 +00:00
Kill use of colons in class names, props SergeyBiryukov, fixes #21152
git-svn-id: https://develop.svn.wordpress.org/trunk@22396 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
jQuery(document).ready( function($) {
|
||||
var myConfirm = function() { return '' !== $('#newcat').val(); };
|
||||
$('#jaxcat').prepend('<span id="ajaxcat"><input type="text" name="newcat" id="newcat" size="16" autocomplete="off"/><input type="button" name="Button" class="add:categorychecklist:jaxcat" id="catadd" value="' + catL10n.add + '"/><input type="hidden"/><input type="hidden"/><span id="howto">' + catL10n.how + '</span></span><span id="cat-ajax-response"></span>');
|
||||
$('#jaxcat').prepend('<span id="ajaxcat"><input type="text" name="newcat" id="newcat" size="16" autocomplete="off"/><input type="button" name="Button" data-wp-lists="add:categorychecklist:jaxcat" id="catadd" value="' + catL10n.add + '"/><input type="hidden"/><input type="hidden"/><span id="howto">' + catL10n.how + '</span></span><span id="cat-ajax-response"></span>');
|
||||
$('#categorychecklist').wpList( { alt: '', response: 'cat-ajax-response', confirm: myConfirm } );
|
||||
} );
|
||||
|
||||
@@ -35,7 +35,7 @@ setCommentsList = function() {
|
||||
|
||||
// Send current total, page, per_page and url
|
||||
delBefore = function( settings, list ) {
|
||||
var cl = $(settings.target).attr('class'), id, el, n, h, a, author, action = false;
|
||||
var wpListsData = $(settings.target).attr('data-wp-lists'), id, el, n, h, a, author, action = false;
|
||||
|
||||
settings.data._total = totalInput.val() || 0;
|
||||
settings.data._per_page = perPageInput.val() || 0;
|
||||
@@ -43,13 +43,13 @@ setCommentsList = function() {
|
||||
settings.data._url = document.location.href;
|
||||
settings.data.comment_status = $('input[name="comment_status"]', '#comments-form').val();
|
||||
|
||||
if ( cl.indexOf(':trash=1') != -1 )
|
||||
if ( wpListsData.indexOf(':trash=1') != -1 )
|
||||
action = 'trash';
|
||||
else if ( cl.indexOf(':spam=1') != -1 )
|
||||
else if ( wpListsData.indexOf(':spam=1') != -1 )
|
||||
action = 'spam';
|
||||
|
||||
if ( action ) {
|
||||
id = cl.replace(/.*?comment-([0-9]+).*/, '$1');
|
||||
id = wpListsData.replace(/.*?comment-([0-9]+).*/, '$1');
|
||||
el = $('#comment-' + id);
|
||||
note = $('#' + action + '-undo-holder').html();
|
||||
|
||||
@@ -72,7 +72,8 @@ setCommentsList = function() {
|
||||
$('strong', '#undo-' + id).text(author);
|
||||
a = $('.undo a', '#undo-' + id);
|
||||
a.attr('href', 'comment.php?action=un' + action + 'comment&c=' + id + '&_wpnonce=' + settings.data._ajax_nonce);
|
||||
a.attr('class', 'delete:the-comment-list:comment-' + id + '::un' + action + '=1 vim-z vim-destructive');
|
||||
a.attr('data-wp-lists', 'delete:the-comment-list:comment-' + id + '::un' + action + '=1');
|
||||
a.attr('class', 'vim-z vim-destructive');
|
||||
$('.avatar', el).clone().prependTo('#undo-' + id + ' .' + action + '-undo-inside');
|
||||
|
||||
a.click(function(){
|
||||
@@ -279,9 +280,9 @@ setCommentsList = function() {
|
||||
theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } );
|
||||
theList = $('#the-comment-list').wpList( { alt: '', delBefore: delBefore, dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } )
|
||||
.bind('wpListDelEnd', function(e, s){
|
||||
var id = s.element.replace(/[^0-9]+/g, '');
|
||||
var wpListsData = $(s.target).attr('data-wp-lists'), id = s.element.replace(/[^0-9]+/g, '');
|
||||
|
||||
if ( s.target.className.indexOf(':trash=1') != -1 || s.target.className.indexOf(':spam=1') != -1 )
|
||||
if ( wpListsData.indexOf(':trash=1') != -1 || wpListsData.indexOf(':spam=1') != -1 )
|
||||
$('#undo-' + id).fadeIn(300, function(){ $(this).show() });
|
||||
});
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@ inlineEditTax = {
|
||||
init : function() {
|
||||
var t = this, row = $('#inline-edit');
|
||||
|
||||
t.type = $('#the-list').attr('class').substr(5);
|
||||
t.type = $('#the-list').attr('data-wp-lists').substr(5);
|
||||
t.what = '#'+t.type+'-';
|
||||
|
||||
$('.editinline').live('click', function(){
|
||||
|
||||
Reference in New Issue
Block a user