Merge branch '3781-browser-friendly-servers' refs #3781
[arvados.git] / apps / workbench / app / assets / javascripts / pipeline_instances.js
index 7bb7c7f9f969da92af7fc7e69928d097d1cd948d..102c60233a6e470aca3898321f7032eb1b15ce81 100644 (file)
@@ -98,7 +98,11 @@ $(document).on('arv-log-event', '.arv-log-event-handler-append-logs', function(e
     var wasatbottom = ($(this).scrollTop() + $(this).height() >= this.scrollHeight);
 
     if (eventData.event_type == "stderr" || eventData.event_type == "stdout") {
-        $(this).append(eventData.properties.text);
+        if( eventData.prepend ) {
+            $(this).prepend(eventData.properties.text);
+        } else {
+            $(this).append(eventData.properties.text);
+        }
     }
 
     if (wasatbottom) {
@@ -120,5 +124,9 @@ var showhide_compare = function() {
         });
     }
 };
-$('[data-object-uuid*=-d1hrv-] input[name="uuids[]"]').on('click', showhide_compare);
-showhide_compare();
+$(document).on('change', '[data-object-uuid*=-d1hrv-] input[name="uuids[]"]', function(e) {
+    if(e.target == this) {
+        showhide_compare();
+    }
+});
+$(document).on('ready ajax:success', showhide_compare);