Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82788

Duplicating pagination and other elements on row click

$
0
0
Hi everyone,
I'm getting a strange problem.. I'm trying to load a content on a Jquery UI Dialog, when clicking on a Row.. but.. when the loads end, my pagination Doubles.

That's my configuration
Rails 1.9.3
Jquery
DataTables 1.9.4

jQuery ->
	$('#roles').dataTable
		bJQueryUI: true
		sPaginationType: "bootstrap"
		sDom: "<'row-fluid'r>t<'row-fluid'<'span3'l><'span9'p>>"
		iDisplayLength: 20,
		aLengthMenu: [[20, 50, 100, -1], [20, 50, 100, "Todos"]]
		bProcessing: true
		bServerSide: true
		sAjaxSource: $('.datatable').data('source')
		aaSorting: [[ 1, "asc" ]],
		bDestroy: true
                bAutoWidth : false
		aoColumns:[
			{bVisible:true, sWidth: '70px' }
			{bVisible:true, sWidth: '100%'}
		]
		oLanguage: { sUrl: "  <%= asset_path('datatable_pt_BR.txt') %>" }
		
jQuery ->				

		$("#roles").on "click", "tr", ->
			$("div.dialogFrame").remove()
			$("<div/>").attr("class","dialogFrame").load "roles/"+$(this).find("input.id").val()+"/edit", ->
				$(this).dialog
			 		autoOpen: true
					modal: true
					position: "center"
					width: "auto"
					height: "auto"

Thanks in advance.

Viewing all articles
Browse latest Browse all 82788

Trending Articles