Don't like ads? PRO users don't see any ads ;-)

Untitled

By: samirfor on May 2nd, 2012  |  syntax: JavaScript  |  size: 1.91 KB  |  hits: 33  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function var_dump(obj) {
  2.     if(typeof obj == "object") {
  3.        return "Type: "+typeof(obj)+((obj.constructor) ? "\nConstructor: "+obj.constructor : "")+"\nValue: " + obj;
  4.     } else {
  5.        return "Type: "+typeof(obj)+"\nValue: "+obj;
  6.         }
  7. }//end function var_dump
  8.  
  9.     $(document).ready( function () {
  10.         $('#tb_nf22').dataTable({
  11.             bJQueryUI: true,
  12.             "bStateSave" : true,
  13.             "bAutoWidth": true,
  14.             "iDisplayLength": 15,
  15.             "aLengthMenu": [[15,25, 50, 100, -1], [15,25, 50, 100, "Todos"]],
  16.             "sPaginationType": "full_numbers",
  17.             "aoColumns" : [  
  18.                 null,
  19.                 null,
  20.                 null,
  21.                 null,
  22.                 { sClass : "alignRight" }
  23.             ]
  24.         }).makeEditable({
  25.             //"sUpdateURL": "ajaxAtualizaDtVencimento.php",
  26.             "sUpdateURL": function(value, settings)
  27.             {
  28.                                 var_dump(settings);
  29.                                 $.ajax({
  30.                                         url: 'ajaxAtualizaDtVencimento.php',
  31.                                         type: 'POST',
  32.                                         data: {'id' : id, 'value' : value},
  33.                                         success: function(result) {
  34.                                                 return result;
  35.                                         } // end of fn success
  36.                                 }); // end of ajax
  37.                                 return(value);
  38.             },
  39.             //ajaxoptions:{
  40.             //    type    : 'POST'
  41.             //},
  42.             "aoColumns": [
  43.                 null,
  44.                 null,
  45.                 null,
  46.                 {
  47.                     type      : 'datepicker',
  48.                     tooltip   : "Clique para editar...",
  49.                     //                    indicator : "Salvando...",
  50.                     indicator : "<img src='../images/snake_transparent.gif'>",
  51.                     loadtext  : 'carregando...',
  52.                     sSuccessResponse: "IGNORE",
  53.                     event     : "click",
  54.                     cssclass  : "date"
  55.                 },
  56.                 null
  57.             ]
  58.         });
  59.                                
  60.     } );