Limited textarea rows to 15 on Job Events page.

This commit is contained in:
chouseknecht
2013-07-17 00:19:52 -04:00
parent 4923fd84c1
commit 295e52df33

View File

@@ -41,6 +41,7 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
if (typeof eventData.res == 'string') { if (typeof eventData.res == 'string') {
n = eventData['res'].match(/\n/g); n = eventData['res'].match(/\n/g);
rows = (n) ? n.length : 1; rows = (n) ? n.length : 1;
rows = (rows > 10) ? 10 : rows;
found = true; found = true;
html += "<label>Traceback:</label>\n"; html += "<label>Traceback:</label>\n";
html += "<textarea readonly class=\"input-xxlarge\" rows=\"" + rows + "\">" + eventData.res + "</textarea>\n"; html += "<textarea readonly class=\"input-xxlarge\" rows=\"" + rows + "\">" + eventData.res + "</textarea>\n";
@@ -62,6 +63,7 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
html += "</label>\n"; html += "</label>\n";
n = eventData['res'][fld].match(/\n/g); n = eventData['res'][fld].match(/\n/g);
rows = (n) ? n.length : 1; rows = (n) ? n.length : 1;
rows = (rows > 10) ? 10 : rows;
html += "<textarea readonly class=\"input-xxlarge\" rows=\"" + rows + "\">" + eventData.res[fld] + "</textarea>\n"; html += "<textarea readonly class=\"input-xxlarge\" rows=\"" + rows + "\">" + eventData.res[fld] + "</textarea>\n";
found = true; found = true;
} }
@@ -74,6 +76,7 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
} }
n = txt.match(/\n/g); n = txt.match(/\n/g);
rows = (n) ? n.length : 1; rows = (n) ? n.length : 1;
rows = (rows > 10) ? 10 : rows;
html += "<textarea readonly class=\"input-xxlarge\" rows=\"" + rows + "\">" + txt + "</textarea>\n"; html += "<textarea readonly class=\"input-xxlarge\" rows=\"" + rows + "\">" + txt + "</textarea>\n";
found = true; found = true;
} }