3 new revisions:

Revision: c879d62a7f8b
Author:   Pekka Klärck
Date:     Tue Aug 21 04:58:02 2012
Log: Fixed setting default sort column highlighting in test details table....
http://code.google.com/p/robotframework/source/detail?r=c879d62a7f8b

Revision: 6e12c103dc44
Author:   Pekka Klärck
Date:     Tue Aug 21 05:31:51 2012
Log: view.js: Cleaned up and fixed rendering stats, especially no-stats-row...
http://code.google.com/p/robotframework/source/detail?r=6e12c103dc44

Revision: db3b662f5bd8
Author:   Pekka Klärck
Date:     Tue Aug 21 05:46:27 2012
Log: Allow navigating to destination anywhere in statistics and test detail...
http://code.google.com/p/robotframework/source/detail?r=db3b662f5bd8

==============================================================================
Revision: c879d62a7f8b
Author:   Pekka Klärck
Date:     Tue Aug 21 04:58:02 2012
Log: Fixed setting default sort column highlighting in test details table.

We used to set also wrong headers but this bug was masked by other CSS earlier.
http://code.google.com/p/robotframework/source/detail?r=c879d62a7f8b

Modified:
 /src/robot/htmldata/rebot/report.html

=======================================
--- /src/robot/htmldata/rebot/report.html       Mon Aug 20 04:59:59 2012
+++ /src/robot/htmldata/rebot/report.html       Tue Aug 21 04:58:02 2012
@@ -258,7 +258,7 @@

 function highlightDefaultSortColumn(sortColumn) {
     if (sortColumn) {
-        var locator = 'th:contains(' + sortColumn + ')';
+        var locator = '#test_details th:contains(' + sortColumn + ')';
         $(locator).addClass('headerSortUp');
     }
 }

==============================================================================
Revision: 6e12c103dc44
Author:   Pekka Klärck
Date:     Tue Aug 21 05:31:51 2012
Log: view.js: Cleaned up and fixed rendering stats, especially no-stats-row.
http://code.google.com/p/robotframework/source/detail?r=6e12c103dc44

Modified:
 /src/robot/htmldata/rebot/view.js

=======================================
--- /src/robot/htmldata/rebot/view.js   Tue Aug 21 04:45:12 2012
+++ /src/robot/htmldata/rebot/view.js   Tue Aug 21 05:31:51 2012
@@ -114,14 +114,23 @@
 }

 function renderNoTagStatTable() {
-    $.tmpl('no_tags_row').appendTo($('#tag_stats'));
+    $('<tr>' +
+        '<td class="col_stat_name">No Tags</td>' +
+        '<td class="col_stat"></td>' +
+        '<td class="col_stat"></td>' +
+        '<td class="col_stat"></td>' +
+        '<td class="col_elapsed"></td>' +
+        '<td class="col_graph">' +
+          '<div class="empty_graph"></div>' +
+        '</td>' +
+      '</tr>').appendTo($('#tag_stats > tbody'));
 }

 function renderStatTable(tableName, templateName, stats) {
-    var tableId = "#" + tableName + "_stats";
+    var locator = '#' + tableName + '_stats > tbody';
// Need explicit for loop because $.tmpl() does not handle very large lists
     for (var i = 0; stats !== undefined && i < stats.length; i++) {
-        $.tmpl(templateName , stats[i]).appendTo($(tableId + '> tbody'));
+        $.tmpl(templateName , stats[i]).appendTo($(locator));
     }
 }

@@ -142,19 +151,6 @@
     '</td>'
 );

-$.template('no_tags_row',
-    '<tr>' +
-    '<td class="col_stat_name">No Tags</td>' +
-    '<td class="col_stat"></td>' +
-    '<td class="col_stat"></td>' +
-    '<td class="col_stat"></td>' +
-    '<td class="col_elapsed">0.000</td>' +
-    '<td class="col_graph">' +
-      '<div class="empty_graph"></div>' +
-    '</td>' +
-    '</tr>'
-);
-
 $.template('suiteStatusMessageTemplate',
     '${critical} critical test, ' +
     '${criticalPassed} passed, ' +

==============================================================================
Revision: db3b662f5bd8
Author:   Pekka Klärck
Date:     Tue Aug 21 05:46:27 2012
Log: Allow navigating to destination anywhere in statistics and test details rows in log and report.

Update issue 1200
Status: Review
Implemented and manually tested on Linux. Implementation mainly required moving onclick handlers from tag/suite/test names to enclosing table rows, and modifying styles so that hovering on these rows changes cursor to a pointer.

Still needs testing at least with IE 8.
http://code.google.com/p/robotframework/source/detail?r=db3b662f5bd8

Modified:
 /src/robot/htmldata/rebot/common.css
 /src/robot/htmldata/rebot/log.css
 /src/robot/htmldata/rebot/log.html
 /src/robot/htmldata/rebot/log.js
 /src/robot/htmldata/rebot/report.html
 /src/robot/htmldata/rebot/view.js

=======================================
--- /src/robot/htmldata/rebot/common.css        Tue Aug 21 04:45:12 2012
+++ /src/robot/htmldata/rebot/common.css        Tue Aug 21 05:46:27 2012
@@ -96,6 +96,7 @@
 }
 table.statistics tr:hover {
     background: #F4F4FF;
+    cursor: pointer;
 }
 table.statistics td, table.statistics th {
     border: 1px solid black;
=======================================
--- /src/robot/htmldata/rebot/log.css   Thu May 31 05:31:19 2012
+++ /src/robot/htmldata/rebot/log.css   Tue Aug 21 05:46:27 2012
@@ -87,3 +87,7 @@
 div.keyword table.metadata {
     font-size: 0.9em;
 }
+/* Custom styles for statistics */
+#total_stats tr:hover, #tag_stats tr:hover {
+    cursor: default;
+}
=======================================
--- /src/robot/htmldata/rebot/log.html  Tue Aug 21 04:45:12 2012
+++ /src/robot/htmldata/rebot/log.html  Tue Aug 21 05:46:27 2012
@@ -7,8 +7,8 @@
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="Generator" content="">
<link rel="icon" type="image/x-icon" href="data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAAAIAAAAAAAAAAAAAEAAAAAAAAAAAAAAAJEBoACtnfgA5cYYAERsiAEx2lAAbKkQAcazBACZCVwAcM1cAK0ucAAMDBQAnQncASG+FABkoVQAyWmgA6f8SgvH/Ij99+GLyIinyJfn/Yi//KSLzUy9iZogpIld3/4JVVTkid7vyUjNVNVJEAGOZ6Z7pXwAABpmZkRiLAAAGiJZpmGAAAEEt3SXdxAAATC7o/u3EAAC8MRZpjasAAAY1VVVTYAAABKqqqqpAAAAADKqq4AAAAAAAv4sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMADAADgAwAA4AcAAOAHAADgBwAAwAcAAOAHAADgDwAA8A8AAPg/AAD+fwAA">
-<link rel="stylesheet" type="text/css" href="log.css" media="all">
 <link rel="stylesheet" type="text/css" href="common.css" media="all">
+<link rel="stylesheet" type="text/css" href="log.css" media="all">
 <link rel="stylesheet" type="text/css" href="print.css" media="print">
<link rel="stylesheet" type="text/css" href="../common/js_disabled.css" media="all"> <link rel="stylesheet" type="text/css" href="../common/doc_formatting.css" media="all">
@@ -155,10 +155,10 @@
 </script>

 <script type="text/x-jquery-tmpl" id="suiteStatisticsRowTemplate">
-  <tr>
+  <tr onclick="makeElementVisible('${id}')">
     <td class="col_stat_name">
       <div class="stat_name">
-        <a onclick="makeElementVisible('${id}')" title="{{html label}}"
+        <a title="{{html label}}"
href="#${id}"><span class="parent_name">{{html formatParentName}}</span>{{html name}}</a>
       </div>
     </td>
=======================================
--- /src/robot/htmldata/rebot/log.js    Thu May 31 04:54:37 2012
+++ /src/robot/htmldata/rebot/log.js    Tue Aug 21 05:46:27 2012
@@ -104,15 +104,6 @@
     else
         expandCriticalFailed(suite);
 }
-
-// For complete cross-browser experience..
-// http://www.quirksmode.org/js/events_order.html
-function stopPropagation(event) {
-    var event = event || window.event;
-    event.cancelBubble = true;
-    if (event.stopPropagation)
-        event.stopPropagation();
-}

 function logLevelSelected(level) {
     var anchors = getViewAnchorElements();
=======================================
--- /src/robot/htmldata/rebot/report.html       Tue Aug 21 04:58:02 2012
+++ /src/robot/htmldata/rebot/report.html       Tue Aug 21 05:46:27 2012
@@ -325,11 +325,10 @@
 </script>

 <script type="text/x-jquery-tmpl" id="totalStatisticsRowTemplate">
-  <tr>
+  <tr onclick="totalDetailSelected('${type}')">
     <td class="col_stat_name">
       <div class="stat_name">
-        <a href="#total_${type}"
-           onclick="totalDetailSelected('${type}')">{{html label}}</a>
+        <a href="#total_${type}">{{html label}}</a>
       </div>
     </td>
     {{tmpl($data) 'stat_columns'}}
@@ -337,16 +336,16 @@
 </script>

 <script type="text/x-jquery-tmpl" id="tagStatisticsRowTemplate">
-  <tr>
+  <tr onclick="tagDetailSelected('${label}');">
     <td class="col_stat_name">
       <div class="stat_name">
-        <a href="#tag_${label}" onclick="tagDetailSelected('${label}');"
+        <a href="#tag_${label}"
            title="{{html doc}}">{{html label}}</a>
         {{if info}}(${info}){{/if}}
       </div>
       <div class="tag_links">
         {{each links}}
-        <span>[<a href="{{html $value.url}}"
+ <span>[<a href="{{html $value.url}}" onclick="stopPropagation(event);" title="{{html $value.url}}">{{html $value.title}}</a>]</span>
         {{/each}}
       </div>
@@ -356,10 +355,10 @@
 </script>

 <script type="text/x-jquery-tmpl" id="suiteStatisticsRowTemplate">
-  <tr>
+  <tr onclick="suiteDetailSelected('${id}');">
     <td class="col_stat_name">
       <div class="stat_name">
-        <a href="#suite_${id}" onclick="suiteDetailSelected('${id}');"
+        <a href="#suite_${id}"
title="{{html label}}"><span class="parent_name">{{html formatParentName}}</span>{{html name}}</a>
       </div>
     </td>
@@ -531,15 +530,16 @@
 </script>

 <script type="text/x-jquery-tmpl" id="testDetailsTableRowTemplate">
-  <tr>
-    {{if $item.logURL}}
+  {{if $item.logURL}}
+  <tr onclick="location = '${$item.logURL}#${id}'" style="cursor: pointer">
     <td class="col_name">
         <a href="${$item.logURL}#${id}"
title="{{html fullName}}"><span class="parent_name">{{html formatParentName}}</span>{{html name}}</a>
     </td>
-    {{else}}
+  {{else}}
+  <tr>
<td class="col_name"><span class="parent_name">{{html formatParentName}}</span>{{html name}}</td>
-    {{/if}}
+  {{/if}}
     <td class="col_doc doc">{{html doc()}}</td>
     <td class="col_tags">{{html tags.join(', ')}}</td>
     <td class="col_crit">{{if isCritical}}yes{{else}}no{{/if}}</td>
=======================================
--- /src/robot/htmldata/rebot/view.js   Tue Aug 21 05:31:51 2012
+++ /src/robot/htmldata/rebot/view.js   Tue Aug 21 05:46:27 2012
@@ -159,3 +159,12 @@
     '${totalPassed} passed, ' +
'<span class="{{if totalFailed}}fail{{else}}pass{{/if}}">${totalFailed} failed</span>'
 );
+
+// For complete cross-browser experience..
+// http://www.quirksmode.org/js/events_order.html
+function stopPropagation(event) {
+    var event = event || window.event;
+    event.cancelBubble = true;
+    if (event.stopPropagation)
+        event.stopPropagation();
+}

Reply via email to