feed/assets/plugins/pokes/js/pokes.js
/*Send poke for search suggest friend*/
Send poke for search suggest friend
Send poke for search suggest friend
function poke_list_send(self){
          var id = self.attr('data-uid');
		  if(send_poke_active != 1){ return false; }
		  send_poke_active = 0;
		  self.closest('.content_pokes').find('.dropdown-menu').hide();
		  $('.poke_'+id).find('.btn_poke').addClass('x-hidden');
		  $('.poke_'+id).find('.delete_poke').addClass('x-hidden');
		  $('.poke_'+id).find('.poke_sending').removeClass('x-hidden');
          $.ajax({ type:'post', url: site_ajax, data: {'f':'pokes', 's':'send', 'owner_id':id, 'only':'pokes' }, cache:false, success: function(result) { 
              send_poke_active = 1;
			  if(result.result == 1){ 
                  modal('#modal-message', {title: 'You send a poke', message: 'You send a poke to '+result.sendto.user_fullname });
              } else { 
                  $('.poke_'+id).find('.btn_poke').removeClass('x-hidden');
                  $('.poke_'+id).find('.poke_sending').addClass('x-hidden');
                  $('.poke_'+id).find('.delete_poke').removeClass('x-hidden');
                  modal('#modal-message', {title: 'Error', message: result.message});	
				  self.closest('.content_pokes').find('.dropdown-menu').show();
              }			  
			 $(".text_search_toque").val('');
             }
          });
      }
function poke_list_send ( self ) { var id = self . attr ( 'data-uid' ) ; if ( send_poke_active != 1 ) { return false ; } send_poke_active = 0 ; self . closest ( '.content_pokes' ) . find ( '.dropdown-menu' ) . hide ( ) ; $ ( '.poke_' + id ) . find ( '.btn_poke' ) . addClass ( 'x-hidden' ) ; $ ( '.poke_' + id ) . find ( '.delete_poke' ) . addClass ( 'x-hidden' ) ; $ ( '.poke_' + id ) . find ( '.poke_sending' ) . removeClass ( 'x-hidden' ) ; $ . ajax ( { type : 'post' , url : site_ajax , data : { 'f' : 'pokes' , 's' : 'send' , 'owner_id' : id , 'only' : 'pokes' } , cache : false , success : function ( result ) { send_poke_active = 1 ; if ( result . result == 1 ) { modal ( '#modal-message' , { title : 'You send a poke' , message : 'You send a poke to ' + result . sendto . user_fullname } ) ; } else { $ ( '.poke_' + id ) . find ( '.btn_poke' ) . removeClass ( 'x-hidden' ) ; $ ( '.poke_' + id ) . find ( '.poke_sending' ) . addClass ( 'x-hidden' ) ; $ ( '.poke_' + id ) . find ( '.delete_poke' ) . removeClass ( 'x-hidden' ) ; modal ( '#modal-message' , { title : 'Error' , message : result . message } ) ; self . closest ( '.content_pokes' ) . find ( '.dropdown-menu' ) . show ( ) ; } $ ( ".text_search_toque" ) . val ( '' ) ; } } ) ; }
Send poke for search suggest friend
Send poke for search suggest friend