Skip to:

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#978 closed defect (bug) (wontfix)

Ajax pagination on the Wire does not honor JS

Reported by: hempsworth's profile hempsworth Owned by:
Milestone: 1.1 Priority: major
Severity: Version:
Component: Keywords:
Cc: apeatling


Running on the latest trunk, when you click 'Delete' on a wire item, you are prompted to confirm your choice to delete or not. When the list is paginated and you move to another set of wire entries, the Ajax seems to strip the JS and you aren't prompted.

Also, I created the following custom JS to give the deletion process a slight Ajax feel:

jQuery('#wire-post-list li a.delete').click(function(){
	var deleteURL = jQuery(this).attr('href');;
	return false;

But although that works on the first page of wire posts, it is ignored on further paginated pages.

Change History (2)

#1 @NSonnenschein
15 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

That's because paginated pages are created with Javascript, so your jQuery code doesn't know about the new elements. You've got the same issue if you try to create an element with JavaScript and give the element a class name, but no css styles will be assigned.

#2 @apeatling
15 years ago

@NSonnenschein: That's what the livequery plugin is for, and is used quite a bit in the framework theme:

jQuery('#wire-post-list li a.delete').liveQuery('click', function() { ... } );
Note: See TracTickets for help on using tickets.