Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $( '#idse' ).dblclick(function() {
- alert( "s" );
- });
- $( '#idven' ).dblclick(function() {
- alert( "v" );
- });
- $( '#idge' ).dblclick(function() {
- alert( "g" );
- });
- for(var i=0; i<resp.length; i++)
- {
- var diffTime = moment(fecha).diff(resp[i].fecha_registro);
- var dias = diffTime/86400000;
- console.log(dias);
- var labelType = (resp[i].res == 'aprob') ? 'label-success' : 'label-warning';
- var labelType1 = (resp[i].se == 'aprob') ? 'label-success' : 'label-warning';
- var labelType2 = (resp[i].ven == 'aprob') ? 'label-success' : 'label-warning';
- var labelType3 = (resp[i].ge == 'aprob') ? 'label-success' : 'label-warning';
- 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;
- html+= '<tr><td data-id="'+resp[i].id+'">'+resp[i].fecha_registro+
- '</td><td class="center" data-id="'+resp[i].id+'"><span class="label ' + labelType + '">'+resp[i].res+
- '</span></td><td id="idse" class="center" data-id="'+resp[i].id+'"><span class= "label ' + labelType1 +'">'+resp[i].se+
- '</span></td><td id="idven" class="center" data-id="'+resp[i].id+'"><span class="label ' + labelType2 +'">'+resp[i].ven+
- '</span></td><td id="idge" class="center" data-id="'+resp[i].id+'"><span class="label ' + labelType3 +'">'+resp[i].ge+
- '</span></td></tr>';
- }
- $('#body').html(html);
- function _addEventDBLClick() {
- if ($('#idven')) {
- $('#idven').on('dblclick',function(){
- alert( "s" );
- }
- }
- /*
- $( '#idse' ).dblclick(function() {
- alert( "s" );
- });
- $( '#idven' ).dblclick(function() {
- alert( "v" );
- });
- $( '#idge' ).dblclick(function() {
- alert( "g" );
- });
- */
- }
- $('#body').html(html);
- _addEventDBLClick();
Add Comment
Please, Sign In to add comment