Duplicating pagination and other elements on row click
Duplicating pagination and other elements on row click
raphagodoi
Posts: 2Questions: 0Answers: 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
[code]
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()
$("").attr("class","dialogFrame").load "roles/"+$(this).find("input.id").val()+"/edit", ->
$(this).dialog
autoOpen: true
modal: true
position: "center"
width: "auto"
height: "auto"
[/code]
Thanks in advance.
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
[code]
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()
$("").attr("class","dialogFrame").load "roles/"+$(this).find("input.id").val()+"/edit", ->
$(this).dialog
autoOpen: true
modal: true
position: "center"
width: "auto"
height: "auto"
[/code]
Thanks in advance.
This discussion has been closed.
Replies