Patchwork [bitbake-devel,06/14] toaster: Remove html validation errors in tasks.html

login
register
mail settings
Submitter Alexandru DAMIAN
Date April 4, 2014, 2:10 p.m.
Message ID <346a278afd708a905c9b084055e692569acd65e8.1396620556.git.alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/70127/
State New
Headers show

Comments

Alexandru DAMIAN - April 4, 2014, 2:10 p.m.
From: Belen Barros Pena <belen.barros.pena@intel.com>

Remove the duplicated class attribute and the name
attribute.

Also, make sure that the row blue highlight works
without the name attribute when you land on the
tasks table after clicking the order link in a
task details page.

The commit also fixes a typo in default.css.

[YOCTO #6033]

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
---
 lib/toaster/toastergui/static/css/default.css |  2 +-
 lib/toaster/toastergui/static/js/main.js      |  2 +-
 lib/toaster/toastergui/templates/tasks.html   | 15 ++++++++++++++-
 3 files changed, 16 insertions(+), 3 deletions(-)

Patch

diff --git a/lib/toaster/toastergui/static/css/default.css b/lib/toaster/toastergui/static/css/default.css
index 0b53718..b4345da 100644
--- a/lib/toaster/toastergui/static/css/default.css
+++ b/lib/toaster/toastergui/static/css/default.css
@@ -103,7 +103,7 @@  select { width: auto; }
 .well > .lead, .alert .lead { margin-bottom: 0px; }
 .no-results { margin: 10px 0; }
 .task-name { margin-left: 7px; }
-.icon-hand-right {color: #ccccc; }
+.icon-hand-right {color: #CCCCCC; }
 .help-inline { margin: 5px; }
 .hero-unit { margin: 20px 0 30px; }
 .hero-unit > .close { font-size:40px; }
diff --git a/lib/toaster/toastergui/static/js/main.js b/lib/toaster/toastergui/static/js/main.js
index 7f897d2..eef6b46 100644
--- a/lib/toaster/toastergui/static/js/main.js
+++ b/lib/toaster/toastergui/static/js/main.js
@@ -107,5 +107,5 @@  $(document).ready(function() {
     if (location.href.search('#warnings') > -1) {
         $('#collapse-warnings').addClass('in');
     }
-
+        
 });
diff --git a/lib/toaster/toastergui/templates/tasks.html b/lib/toaster/toastergui/templates/tasks.html
index d68a31a..77d38b0 100644
--- a/lib/toaster/toastergui/templates/tasks.html
+++ b/lib/toaster/toastergui/templates/tasks.html
@@ -75,7 +75,7 @@ 
   {% include "basetable_top.html" %}
 
     {% for task in objects %}
-        <tr {{ task|task_color }} class="flash" id="{{task.order}}" name="{{task.order}}">
+        <tr {{ task|task_color }} id="{{task.order}}">
             <td class="order">
                 <a href="{%url "task" build.pk task.pk%}">{{task.order}}</a>
             </td>
@@ -117,4 +117,17 @@ 
   {% endif %} {# objects.paginator.count #}
 {% endif %} {# empty #}
 </div>
+
+<script type="text/javascript">
+
+    $(document).ready(function() {
+        // enable blue hightlight animation for the order link
+        if (location.href.search('#') > -1) {
+            var task_order = location.href.split('#')[1];
+            $("#" + task_order).addClass("highlight"); 
+        }
+    });
+    
+</script>
+
 {% endblock %}