daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Oct 12th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $( '#idse' ).dblclick(function() {
  2.   alert( "s" );
  3. });
  4. $( '#idven' ).dblclick(function() {
  5.   alert( "v" );
  6. });
  7. $( '#idge' ).dblclick(function() {
  8.   alert( "g" );
  9. });
  10.    
  11. for(var i=0; i<resp.length; i++)
  12. {
  13.  var diffTime = moment(fecha).diff(resp[i].fecha_registro);
  14.         var dias = diffTime/86400000;
  15.         console.log(dias);
  16.      var labelType = (resp[i].res == 'aprob') ? 'label-success' : 'label-warning';
  17.      var labelType1 = (resp[i].se == 'aprob') ? 'label-success' : 'label-warning';
  18.      var labelType2 = (resp[i].ven == 'aprob') ? 'label-success' : 'label-warning';
  19.      var labelType3 = (resp[i].ge == 'aprob') ? 'label-success' : 'label-warning';
  20.      var boton = (resp[i].as== '') ? '<div data-id="'+resp[i].id+'" data-nombre= "'+resp[i].nom+'" class="btn btn-primary registrar_o">Asignar</div>' : resp[i].as;
  21.  
  22.      html+= '<tr><td data-id="'+resp[i].id+'">'+resp[i].fecha_registro+
  23.         '</td><td class="center" data-id="'+resp[i].id+'"><span class="label ' + labelType + '">'+resp[i].res+
  24.         '</span></td><td id="idse" class="center" data-id="'+resp[i].id+'"><span class= "label ' + labelType1 +'">'+resp[i].se+
  25.         '</span></td><td id="idven" class="center" data-id="'+resp[i].id+'"><span class="label ' + labelType2 +'">'+resp[i].ven+
  26.         '</span></td><td id="idge" class="center" data-id="'+resp[i].id+'"><span class="label ' + labelType3 +'">'+resp[i].ge+
  27.         '</span></td></tr>';
  28. }
  29.  
  30. $('#body').html(html);
  31.    
  32. function _addEventDBLClick() {
  33.     if ($('#idven')) {
  34.       $('#idven').on('dblclick',function(){
  35.         alert( "s" );
  36.       }
  37.    }
  38.   /*
  39. $( '#idse' ).dblclick(function() {
  40.   alert( "s" );
  41. });
  42. $( '#idven' ).dblclick(function() {
  43.   alert( "v" );
  44. });
  45. $( '#idge' ).dblclick(function() {
  46.   alert( "g" );
  47. });
  48.   */
  49. }
  50.    
  51. $('#body').html(html);
  52. _addEventDBLClick();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top