implement booststrap editable
implement booststrap editable
I would like to use bootstraps editable(http://vitalets.github.io/x-editable/demo-bs3.html) plugin on server side data. I have been trying to implement but doesn't seems to work and I think the reason of could be that I trying to deal with non existing data in my DOM.
[code] jQuery(document).ready(function() {
//Load SUBJECTS DataTable and assign actions to it(@ oTable2)
var oTable2 = $('#faculties').dataTable({
//"bProcessing": true,
"bServerSide": true,
"bProcessing": true,
"sAjaxSource": "index.php?option=com_unis&task=faculties&<?php echo JSession::getFormToken() . '=1' ?>",
"sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'l><'span6'p>>",
"sPaginationType": "bootstrap",
"bAutoWidth": false, // Disable the auto width calculation
"aoColumns": [
{"sWidth": "5%", "bSortable": false},
{"sWidth": "5%"},
{"sWidth": "80%"},
{"sWidth": "10%", "sClass": "center", "bSortable": false}
]
});
$.fn.editable.defaults.mode = 'inline';
$('#faculty').editable();
});
[/code]
[code] jQuery(document).ready(function() {
//Load SUBJECTS DataTable and assign actions to it(@ oTable2)
var oTable2 = $('#faculties').dataTable({
//"bProcessing": true,
"bServerSide": true,
"bProcessing": true,
"sAjaxSource": "index.php?option=com_unis&task=faculties&<?php echo JSession::getFormToken() . '=1' ?>",
"sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'l><'span6'p>>",
"sPaginationType": "bootstrap",
"bAutoWidth": false, // Disable the auto width calculation
"aoColumns": [
{"sWidth": "5%", "bSortable": false},
{"sWidth": "5%"},
{"sWidth": "80%"},
{"sWidth": "10%", "sClass": "center", "bSortable": false}
]
});
$.fn.editable.defaults.mode = 'inline';
$('#faculty').editable();
});
[/code]
This discussion has been closed.
Replies
[code]
"fnDrawCallback": function () {
if ( typeof oTable2 != 'undefined' ) {
//make username editable
$('.faculty').editable();
}
}
[/code]