Skip to content

Commit

Permalink
Fixed some more coding standard issues
Browse files Browse the repository at this point in the history
 - Mixed double and single quotes issue, updated as double quotes
 - Updated identifiers as camel case
 - Unnecessary use of fully qualified name 'Assert.assertNotNull' due to existing import 'org.testng.Assert'
 - The field name indicates a constant but its modifiers do not, added final keyword to the constant
 - Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes
  • Loading branch information
sundaramrajendran authored and Doug Simmons committed Nov 16, 2015
1 parent e70faaa commit 1e02915
Show file tree
Hide file tree
Showing 5 changed files with 212 additions and 204 deletions.
30 changes: 15 additions & 15 deletions client/src/main/resources/templates/js/htmlreporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,36 @@
$(document).ready(function () {

"use strict";
var iframe = $('iframe#currentFrameId');
var iframe = $("iframe#currentFrameId");

// logic to show and add the tabs.
$('.tab').click(function () {
$(this).parent().children().removeClass('active');
$(this).addClass('active');
var tabId = $(this).attr('id');
$('div.tabContentContainer').hide();
$('div#container_' + tabId).show();
$(".tab").click(function () {
$(this).parent().children().removeClass("active");
$(this).addClass("active");
var tabId = $(this).attr("id");
$("div.tabContentContainer").hide();
$("div#container_" + tabId).show();
});

// by default load the first visible one.
$('.tab:first').click();
$(".tab:first").click();

// when a clickable item is clicked, propagate that click to the element with the same id on the
// page ( the same method could be in several tabs ) and to the server.
$('.clickable').click(function () {
var content_id = $(this).attr('content_id');
$(".clickable").click(function () {
var contentId = $(this).attr("content_id");

if ("NI" === content_id) {
if ("NI" === contentId) {
return;
}

$('td.first').each(function () {
if ($(this).attr('content_id') === content_id) {
$(this).toggleClass('clickedOnce');
$("td.first").each(function () {
if ($(this).attr("content_id") === contentId) {
$(this).toggleClass("clickedOnce");
}
});

// display the result in the iframe at the bottom of the page
iframe.attr('src', content_id + '.html');
iframe.attr("src", contentId + ".html");
});
});
Loading

0 comments on commit 1e02915

Please sign in to comment.