ashb commented on a change in pull request #11195:
URL: https://github.com/apache/airflow/pull/11195#discussion_r498237415



##########
File path: airflow/www/templates/airflow/dag_code.html
##########
@@ -22,34 +22,33 @@
 {% block page_title %}{{ dag.dag_id }} - Code - Airflow{% endblock %}
 
 {% block content %}
-    {{ super() }}
-    <h4>{{ title }}</h4>
-    <div class="active">
-      <a onclick="toggleWrap()">Toggle wrap</a>
-    </div>
+  {{ super() }}
+  <div class="code-wrap">
+    <a onclick="toggleWrap()" class="btn btn-default code-wrap-toggle">Toggle 
Wrap</a>
     {{ html_code }}
+  </div>
 {% endblock %}
 
-{% block tail %}
-    {{ super() }}
-    <script>
-      function toggleWrap() {
-        $('.code pre').toggleClass('wrap')
-      };
-
-      // We blur task_ids in demo mode
-      $( document ).ready(function() {
-        if ("{{ demo_mode }}" == "True") {
-            $("pre span.s").css({
-                'text-shadow': '0px 0px 10px red',
-                'color': 'transparent',
-            });
-        }
-      });
-
-      // pygments generates the HTML so set wrap toggle via js
-      if ("{{ wrapped }}" == "True") {
-        toggleWrap();
-      };
-    </script>
+{% block tail_js %}

Review comment:
       Any reason for different block in use here?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to