{:uriI"Õfile:///home/eagletmt/.clg/github.com/cookpad/kuroko2/app/assets/javascripts/kuroko2/job_definitions.js?type=application/javascript&pipeline=self&id=0005d448e6fc123f7cde33c285a9ce5ba985a1d0e6d7315b8d55eb2391f1ce40:ET:load_pathI"J/home/eagletmt/.clg/github.com/cookpad/kuroko2/app/assets/javascripts;T: filenameI"e/home/eagletmt/.clg/github.com/cookpad/kuroko2/app/assets/javascripts/kuroko2/job_definitions.js;T: nameI"kuroko2/job_definitions;T:logical_pathI"$kuroko2/job_definitions.self.js;T:content_typeI"application/javascript;T: sourceI"F // Place all the behaviors and hooks related to the matching controller here. // All this logic will automatically be available in application.js. jQuery(function ($) { $('.star-holder').delegate('.star', 'ajax:complete', function (xhr, status) { var currentTarget = xhr.currentTarget; var definitionsPath = $('.star').data("definitions-path"); switch (status.status) { case 200: // deleted var definitionId = status.responseJSON['job_definition_id']; var elem = $('') .attr("href", definitionsPath + "/" + definitionId + "/stars") .attr("data-definitions-path", definitionsPath) .attr("data-definition-id", definitionId); $(currentTarget).replaceWith(elem); break; case 201: // created var starId = status.responseJSON['id']; var definitionId = status.responseJSON['job_definition_id']; var elem = $('') .attr("href", definitionsPath + "/" + definitionId + "/stars/" + starId) .attr("data-star-id", starId) .attr("data-definitions-path", definitionsPath) .attr("data-definition-id", definitionId); $(currentTarget).replaceWith(elem); break; } }); $('#instances-holder').delegate('#instances', 'ajax:complete', function (xhr, status) { switch (status.status) { case 200: // pagination $('#instances').replaceWith(status.responseText); break; } }); $('#schedules-holder').delegate('#schedules', 'ajax:complete', function (xhr, status) { switch (status.status) { case 200: case 201: var schedulesPath = $('#schedules').data("schedules-path"); $.get(schedulesPath, function (data) { $('#schedules').replaceWith(data); }); break; case 400: $('#cron-field').addClass("has-error"); break; } }); $('#suspend-schedules-holder').delegate('#suspend-schedules', 'ajax:complete', function (xhr, status) { switch (status.status) { case 200: case 201: var schedulesPath = $('#suspend-schedules').data("suspend-schedules-path"); $.get(schedulesPath, function (data) { $('#suspend-schedules').replaceWith(data); }); break; case 400: $('#suspend-cron-field').addClass("has-error"); break; } }); $('#admin_assignments_user_id').select2(); }); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"sfile-digest:///home/eagletmt/.clg/github.com/cookpad/kuroko2/app/assets/javascripts/kuroko2/job_definitions.js;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%OÐü8ÃÁn8f ‡¦÷4qïKʨò/ÝD¦: lengthiF :dependencies_digest"%¹=Nu!²ÐÁÅ'çÌõ Žmé]Sm³ o.®M Ô):idI"E0005d448e6fc123f7cde33c285a9ce5ba985a1d0e6d7315b8d55eb2391f1ce40;F: mtimel+ÚNþZ