Sha256: 2252fc921d54fa5f5d0d3466bc7970770ab87530f44c5422027d592fa814c1f1

Contents?: true

Size: 1.42 KB

Versions: 1

Compression:

Stored size: 1.42 KB

Contents

block_fetching_thickbox = function() {
  $('#TB_ajaxContent').block({'message' : 'loading'});
}

unblock_fetching_thickbox = function() {
  $('#TB_ajaxContent').unblock();
}

get_pipeline_job_list = function(page) {
  var pipeline = $('#job_list_pipeline').attr('href').replace('#', '');
  $.get('/re_pipelines/' + pipeline + '/re_jobs?page=' + page, null, null, 'script');
}


$(document).ready(function() {	  
  get_pipeline_job_list(1);
  
  $('a.pipeline-job-detail').live('click', function() {    
    var job = $(this).attr('href').replace('#', '');
      
    tb_show("", '#?TB_inline=true&inlineId=tb_temp_frame&height=450&width=800', false);
    block_fetching_thickbox();
    $.get('/re_jobs/' + job, null, unblock_fetching_thickbox, 'script');
    
  	return false;  
  });  


  $('a.job-page-prev-enabled').live('click', function() {
    var page = $(this).attr('href').replace('#', ''); 
    
    $('#job_list').hide();
    $('#job_list_pending').show();
    get_pipeline_job_list(page);  
    
  	return false;  
  });  

  $('a.job-page-prev-disabled').live('click', function() {
    return false;
  });
  

  $('a.job-page-next-enabled').live('click', function() {
    var page = $(this).attr('href').replace('#', ''); 

    $('#job_list').hide();
    $('#job_list_pending').show();
    get_pipeline_job_list(page);  

  	return false;  
  });  

  $('a.job-page-next-disabled').live('click', function() {
    return false;
  });
  
  
});


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rules_engine-0.0.1 rails_generators/templates/public/javascripts/re_pipeline_jobs.js