equal
deleted
inserted
replaced
3 inlineEditTax = { |
3 inlineEditTax = { |
4 |
4 |
5 init : function() { |
5 init : function() { |
6 var t = this, row = $('#inline-edit'); |
6 var t = this, row = $('#inline-edit'); |
7 |
7 |
8 t.type = $('#the-list').attr('className').substr(5); |
8 t.type = $('#the-list').attr('class').substr(5); |
9 t.what = '#'+t.type+'-'; |
9 t.what = '#'+t.type+'-'; |
10 |
10 |
11 $('.editinline').live('click', function(){ |
11 $('.editinline').live('click', function(){ |
12 inlineEditTax.edit(this); |
12 inlineEditTax.edit(this); |
13 return false; |
13 return false; |
18 |
18 |
19 $('a.cancel', row).click(function() { return inlineEditTax.revert(); }); |
19 $('a.cancel', row).click(function() { return inlineEditTax.revert(); }); |
20 $('a.save', row).click(function() { return inlineEditTax.save(this); }); |
20 $('a.save', row).click(function() { return inlineEditTax.save(this); }); |
21 $('input, select', row).keydown(function(e) { if(e.which == 13) return inlineEditTax.save(this); }); |
21 $('input, select', row).keydown(function(e) { if(e.which == 13) return inlineEditTax.save(this); }); |
22 |
22 |
23 $('#posts-filter input[type="submit"]').click(function(e){ |
23 $('#posts-filter input[type="submit"]').mousedown(function(e){ |
24 if ( $('form#posts-filter tr.inline-editor').length > 0 ) |
24 t.revert(); |
25 t.revert(); |
|
26 }); |
25 }); |
27 }, |
26 }, |
28 |
27 |
29 toggle : function(el) { |
28 toggle : function(el) { |
30 var t = this; |
29 var t = this; |
72 |
71 |
73 fields = $('#edit-'+id+' :input').serialize(); |
72 fields = $('#edit-'+id+' :input').serialize(); |
74 params = fields + '&' + $.param(params); |
73 params = fields + '&' + $.param(params); |
75 |
74 |
76 // make ajax request |
75 // make ajax request |
77 $.post('admin-ajax.php', params, |
76 $.post( ajaxurl, params, |
78 function(r) { |
77 function(r) { |
79 var row, new_id; |
78 var row, new_id; |
80 $('table.widefat .inline-edit-save .waiting').hide(); |
79 $('table.widefat .inline-edit-save .waiting').hide(); |
81 |
80 |
82 if (r) { |
81 if (r) { |