Skip to content
This repository has been archived by the owner on May 24, 2018. It is now read-only.

Commit

Permalink
Code review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kateryna Musina committed Feb 10, 2016
1 parent 268e146 commit 5afa7eb
Show file tree
Hide file tree
Showing 4 changed files with 53,303 additions and 33 deletions.
53,199 changes: 53,179 additions & 20 deletions www/prod/script/main.js

Large diffs are not rendered by default.

111 changes: 110 additions & 1 deletion www/prod/script/main.js.map

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions www/script/project/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ define(function (require) {
NOT_STARTED: [10, "not-started"],
None: ""
},
settings = {};
settings = {},
key_codes = {
ENTER : 13
};

$.each(css_classes, function (key, val) {
css_class_enum[key] = val[0];
Expand Down Expand Up @@ -651,7 +654,8 @@ define(function (require) {
$.cookie('exthistorylist', cookie, {expires: 10000000000, path: "/"});
}
}
}
},
keyCodes : key_codes
};

return helpers;
Expand Down
18 changes: 8 additions & 10 deletions www/script/project/rtTestReport.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,14 @@ define(function (require) {
};

//Filter when return is hit
jQuery.fn.dataTableExt.oApi.fnFilterOnReturn = function () {
var that = this;

$.fn.dataTableExt.oApi.fnFilterOnReturn = function () {
this.each(function (i) {
$.fn.dataTableExt.iApiIndex = i;
var anControl = $('input', that.fnSettings().aanFeatures.f);
var anControl = $('input', this.fnSettings().aanFeatures.f);
anControl.unbind('keyup').bind('keypress.katana', function (e) {
if (e.which === 13) {
if (e.which === helpers.keyCodes.ENTER) {
$.fn.dataTableExt.iApiIndex = i;
that.fnFilter(anControl.val());
this.fnFilter(anControl.val());
}
});
return this;
Expand Down Expand Up @@ -94,7 +92,7 @@ define(function (require) {
$('.new-window').bind("click.katana", function (e) {
e.preventDefault();
var newWinHtml = $(this).parent().find($('.failure-detail-txt')).html();
privateFunc.openNewWindow(newWinHtml);
rtTestReport.openNewWindow(newWinHtml);
});

// show more / hide
Expand Down Expand Up @@ -146,13 +144,13 @@ define(function (require) {
$filterInput.keydown(function (event) {
// Filter on the column (the index) of this element
var e = window.event || event;
if (e.keyCode === 13) {
privateFunc.filterTables(this.value);
if (e.keyCode === helpers.keyCodes.ENTER) {
rtTestReport.filterTables(this.value);
}
});

$submitButton.bind("click.katana", function () {
privateFunc.filterTables($filterInput.val());
rtTestReport.filterTables($filterInput.val());
});

// clear the input field
Expand Down

0 comments on commit 5afa7eb

Please sign in to comment.