Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script charset="windows-1251">
  2. $(document).ready(function(){
  3.     $('.select_councelor').change(function(){
  4.         var councelor = $(this).val();
  5.         var id = $(this).parent().next().next().children().val();
  6.         // alert('<?php echo Yii::app()->createUrl('/Career/setCounc')?>');
  7.         $.post('<?php echo Yii::app()->createUrl('/setCouncelor')?>', {id:id, councelor:councelor }).done(function(data){
  8.            
  9.         })
  10.     })
  11.    
  12.     $('.approve').click(function(){
  13.         var id = $(this).parent().next().children().val();
  14.         $.post('<?php echo Yii::app()->createUrl('/career/Approved')?>', {id:id}).done(function(data){
  15.            
  16.         })
  17.     })
  18.    
  19.     $('.delete').click(function(){
  20.         id = $(this).parent().next().next().next().children().val();
  21.         // alert(id);
  22.         var del = confirm('Are you sure?');
  23.         if(del == true) window.location.href = "<?php echo Yii::app()->createUrl('/career/Approved/id/')?>"+id;
  24.     })
  25.    
  26.         $('.decline').click(function(){
  27.         id = $(this).parent().prev().children().val();
  28.         // alert(id);
  29.         var del = prompt('Are you sure? Type the reason please.', '');
  30.     // alert(del);
  31.         if(del != null) {
  32.             $.post('<?php echo Yii::app()->createUrl('/career/Decline')?>', {id:id, reason:del}).done(function(data){
  33.                
  34.             })
  35.         }
  36.     })
  37.    
  38.     // var a = $('.from:first').text().length;
  39.     // var a = a.substr(1, 10)
  40.     // console.log(a);
  41. })
  42. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement