Advertisement
sanca

javaDiView

Dec 10th, 2013
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.         $(document).ready(function() {
  3.             editor = new $.fn.dataTable.Editor( {
  4.                 "ajaxUrl": "phonebook/init",
  5.                 "domTable": "#tabelsiswa",
  6.                 "fields": [ {
  7.                         "label": "foto",
  8.                         "name": "foto"
  9.                     },
  10.                     {
  11.                         "label": "nama",
  12.                         "name": "nama",
  13.                     },
  14.                     {
  15.                         "label": "Jenis Kelamin",
  16.                         "name": "kelamin"
  17.                     },
  18.                     {
  19.                         "label": "Sekolah",
  20.                         "name": "sekolah"
  21.                     },
  22.                     {
  23.                         "label": "Status",
  24.                         "name": "status"
  25.                     },
  26.                     {
  27.                         "label": "Action",
  28.                         "name": "action"
  29.                     },
  30.                 ]
  31.             });
  32.            
  33.             $('#tabelsiswa').dataTable( {
  34.                 "sDom": "<'row-fluid'<'span3'l><'span5'T><'span4'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
  35.                 "sAjaxSource": "datasiswa/datatab",
  36.                 "aoColumns": [
  37.                     { "mDataProp": "foto" },
  38.                     { "mDataProp": "nama" },
  39.                     { "mDataProp": "kelamin" },
  40.                     { "mDataProp": "sekolah" },
  41.                     { "mDataProp": "status"},
  42.                     { "mDataProp": "action"}
  43.                 ],
  44.                 "oTableTools": {
  45.                     "sRowSelect": "multi",
  46.                     "aButtons": [
  47.                         { "sExtends": "editor_create", "editor": editor },
  48.                         { "sExtends": "editor_edit",   "editor": editor },
  49.                         { "sExtends": "editor_remove", "editor": editor }
  50.                     ]
  51.                 }
  52.             });
  53.         } );
  54.     </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement