1 function run_pipeline_button_state() {
2 var a = $('a.editable.required.editable-empty');
4 $(".run-pipeline-button").addClass("disabled");
7 $(".run-pipeline-button").removeClass("disabled");
11 $(document).on('editable:success', function(event, tag, response, newValue) {
13 if ($('.run-pipeline-button').length == 0)
15 if ($tag.hasClass("required")) {
16 if (newValue && newValue.trim() != "") {
17 $tag.removeClass("editable-empty");
18 $tag.parent().css("background-color", "");
19 $tag.parent().prev().css("background-color", "");
22 $tag.addClass("editable-empty");
23 $tag.parent().css("background-color", "#ffdddd");
24 $tag.parent().prev().css("background-color", "#ffdddd");
27 if ($tag.attr('data-name')) {
28 // Update other inputs representing the same piece of data
29 $('.editable[data-name="' + $tag.attr('data-name') + '"]').
30 editable('setValue', newValue);
32 run_pipeline_button_state();
35 $(document).on('ready ajax:complete', function() {
36 $('a.editable.required').each(function() {
38 if ($tag.hasClass("editable-empty")) {
39 $tag.parent().css("background-color", "#ffdddd");
40 $tag.parent().prev().css("background-color", "#ffdddd");
43 $tag.parent().css("background-color", "");
44 $tag.parent().prev().css("background-color", "");
47 run_pipeline_button_state();
50 $(document).on('arv-log-event', '.arv-log-event-handler-append-logs', function(event, eventData){
51 var parsedData = JSON.parse(eventData);
53 var propertyText = undefined
55 var properties = parsedData.properties;
56 if (properties !== null) {
57 propertyText = properties.text;
60 if (propertyText !== undefined) {
61 $(this).append(propertyText + "<br/>");
63 $(this).append(parsedData.summary + "<br/>");