2 var run_pipeline_button_state = function() {
3 var a = $('a.editable.required.editable-empty');
5 $("#run-pipeline-button").addClass("disabled");
8 $("#run-pipeline-button").removeClass("disabled");
12 $.fn.editable.defaults.success = function (response, newValue) {
14 if (tag.hasClass("required")) {
15 if (newValue && newValue.trim() != "") {
16 tag.removeClass("editable-empty");
17 tag.parent().css("background-color", "");
18 tag.parent().prev().css("background-color", "");
21 tag.addClass("editable-empty");
22 tag.parent().css("background-color", "#ffdddd");
23 tag.parent().prev().css("background-color", "#ffdddd");
26 run_pipeline_button_state();
29 $(window).on('load', function() {
30 var a = $('a.editable.required');
31 for (var i = 0; i < a.length; i++) {
33 if (tag.hasClass("editable-empty")) {
34 tag.parent().css("background-color", "#ffdddd");
35 tag.parent().prev().css("background-color", "#ffdddd");
38 tag.parent().css("background-color", "");
39 tag.parent().prev().css("background-color", "");
42 run_pipeline_button_state();
45 $(document).on('ajax:complete ready', function() {
46 var a = $('.arv-log-event-listener');
48 $('.arv-log-event-listener').each(function() {
49 subscribeToEventLog(this.id);
54 $(document).on('arv-log-event', '.arv-log-event-handler-append-logs', function(event, eventData){
55 parsedData = JSON.parse(eventData);
56 summary = parsedData.summary;
57 properties = parsedData.properties;
58 updatedProperties = null;
59 if (properties !== null) {
60 new_attributes = properties.new_attributes;
61 if (new_attributes !== null) {
62 updatedProperties = JSON.stringify(properties.new_attributes);
66 if (updatedProperties !== null) {
67 $(this).append(updatedProperties + "<br/><br/>");
69 $(this).append(summary + "<br/><br/>");