2 new revisions:

Revision: 3bff53b56105
Author:   Jussi Malinen
Date:     Wed Jun 29 05:39:29 2011
Log:      removed duplicate hash handling
http://code.google.com/p/robotframework/source/detail?r=3bff53b56105

Revision: 0fa2b23cdc5c
Author:   Jussi Malinen
Date:     Wed Jun 29 05:42:50 2011
Log:      cleanup
http://code.google.com/p/robotframework/source/detail?r=0fa2b23cdc5c

==============================================================================
Revision: 3bff53b56105
Author:   Jussi Malinen
Date:     Wed Jun 29 05:39:29 2011
Log:      removed duplicate hash handling
http://code.google.com/p/robotframework/source/detail?r=3bff53b56105

Modified:
 /src/robot/webcontent/report.html

=======================================
--- /src/robot/webcontent/report.html   Sat Jun 25 13:42:48 2011
+++ /src/robot/webcontent/report.html   Wed Jun 29 05:39:29 2011
@@ -40,8 +40,6 @@
     addSummary(topsuite);
     addStatistics();
     addDetails();
-    // TODO: Why is this done? It seems to cause details to be selected
-    // twice, because the logic there resets window.location.hash.
     window.onhashchange = showDetailsByHash;
 });

@@ -69,7 +67,6 @@

 function showDetailsByHash() {
     if (window.location.hash == window.prevLocationHash) return;
-    window.prevLocationHash = window.location.hash;
var hashParts = decodeURI(window.location.hash.substring(1)).split('_');
     var key = hashParts.shift();
     var arg = hashParts.join('_');
@@ -82,8 +79,7 @@
     if (action) {
         action(arg);
     }
-    // TODO: Why is this needed? Isn't the has already set?
-    window.location.hash = window.location.hash.substring(1);
+    scrollToSelector(window.location.hash.substring(1));
 }

 function totalDetailSelected(name) {
@@ -173,6 +169,7 @@

 function scrollToSelector(anchor) {
     $('#test_details_container').css('min-height', $(window).height());
+    window.prevLocationHash = "#"+anchor;
     window.location.hash = anchor;
 }


==============================================================================
Revision: 0fa2b23cdc5c
Author:   Jussi Malinen
Date:     Wed Jun 29 05:42:50 2011
Log:      cleanup
http://code.google.com/p/robotframework/source/detail?r=0fa2b23cdc5c

Modified:
 /src/robot/webcontent/report.html

=======================================
--- /src/robot/webcontent/report.html   Wed Jun 29 05:39:29 2011
+++ /src/robot/webcontent/report.html   Wed Jun 29 05:42:50 2011
@@ -95,11 +95,8 @@
 }

 function renderTotalDetails(name) {
-    var stat;
-    if (name == 'Critical Tests')
-        stat = window.testdata.statistics().total[0];
-    else
-        stat = window.testdata.statistics().total[1];
+    var index = (name == 'Critical Tests') ? 0 : 1;
+    var stat = window.testdata.statistics().total[index];
     var tests = getTotalTests(name)
     stat.totalTime = calculateTotalTime(tests);
     $.tmpl('tagOrTotalDetailsTemplate', stat).appendTo('#details_header');

Reply via email to