Skip to content

Commit

Permalink
#287: alternate row colors
Browse files Browse the repository at this point in the history
  • Loading branch information
ypujante committed Apr 30, 2015
1 parent cf45083 commit 64d81da
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%{--
- Copyright (c) 2011-2013 Yan Pujante
- Copyright (c) 2011-2015 Yan Pujante
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy of
Expand All @@ -25,7 +25,7 @@
<li class="active"><a href="#">List</a></li>
<cl:whenFeatureEnabled feature="commands"><li><cl:link controller="commands" action="list">All Commands</cl:link></li></cl:whenFeatureEnabled>
</ul>
<table class="table table-bordered noFullWidth">
<table class="table table-bordered noFullWidth alternate-row-colors">
<thead>
<tr>
<th>Agent</th>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%{--
- Copyright (c) 2010-2010 LinkedIn, Inc
- Portions Copyright (c) 2011-2014 Yan Pujante
- Portions Copyright (c) 2011-2015 Yan Pujante
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy of
Expand Down Expand Up @@ -88,7 +88,7 @@
<cl:whenFeatureEnabled feature="commands"><li><cl:link action="commands" id="${params.id}">Commands</cl:link></li></cl:whenFeatureEnabled>
<li class="active"><a href="#">All Processes</a></li>
</ul>
<table class="table table-bordered tight-table zebra-striped">
<table class="table table-bordered tight-table noFullWidth alternate-row-colors">
<tr>
<th>PID</th>
<th>COMMAND</th>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%{--
- Copyright (c) 2010-2010 LinkedIn, Inc
- Portions Copyright (c) 2011-2013 Yan Pujante
- Portions Copyright (c) 2011-2015 Yan Pujante
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy of
Expand Down Expand Up @@ -40,7 +40,7 @@
<g:paginate total="${auditLogInstanceTotal}" max="100"/>
</div>
<div class="list">
<table class="table table-bordered xtight-table">
<table class="table table-bordered xtight-table alternate-row-colors">
<thead>
<tr>

Expand All @@ -58,7 +58,7 @@
</thead>
<tbody>
<g:each in="${auditLogInstanceList}" status="i" var="auditLogInstance">
<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
<tr>

<td><cl:formatDate date="${auditLogInstance.dateCreated}"/></td>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%{--
- Copyright (c) 2012-2013 Yan Pujante
- Copyright (c) 2012-2015 Yan Pujante
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy of
Expand All @@ -21,7 +21,7 @@
<g:paginate total="${count}" controller="commands" action="list"/>
</g:else>
</div>
<table class="table table-bordered xtight-table">
<table class="table table-bordered xtight-table alternate-row-colors">
<thead>
<tr>
<g:if test="${!params.agentId}"><th class="agentFilter">Agent</th></g:if>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%{--
- Copyright (c) 2010-2010 LinkedIn, Inc
- Portions Copyright (c) 2011-2013 Yan Pujante
- Portions Copyright (c) 2011-2015 Yan Pujante
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy of
Expand Down Expand Up @@ -29,7 +29,7 @@
</ul>
<div class="body">
<div class="list">
<table class="table table-bordered noFullWidth">
<table class="table table-bordered noFullWidth alternate-row-colors">
<thead>
<tr>

Expand All @@ -47,7 +47,7 @@
</thead>
<tbody>
<g:each in="${fabricInstanceList}" status="i" var="fabricInstance">
<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
<tr>

<td><cl:link action="show" id="${fabricInstance.id}">${fieldValue(bean: fabricInstance, field: 'id')}</cl:link></td>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<%@ page import="org.linkedin.util.lang.MemorySize; org.linkedin.glu.grails.utils.ConsoleConfig" %>
<g:set var="columns" value="${columns == null ? ConsoleConfig.getInstance().defaults.model : columns}"/>
<cl:form action="setAsCurrent" method="post">
<table class="table table-bordered noFullWidth">
<table class="table table-bordered noFullWidth alternate-row-colors">
<thead>
<tr>
<th>Id</th>
Expand All @@ -35,7 +35,7 @@
</thead>
<tbody>
<g:each in="${systems}" status="i" var="system">
<tr class="${(i % 2) == 0 ? 'odd' : 'even'} ${(system.systemId == request.system?.id) ? 'current' : ''}">
<tr class="${(system.systemId == request.system?.id) ? 'current' : ''}">
<td><cl:renderSystemId id="${system.systemId}" name="${system.name}"/></td>
<td>${system.fabric}</td>
<td><cl:formatDate date="${system.dateCreated}"/></td>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%{--
- Copyright (c) 2010-2010 LinkedIn, Inc
- Portions Copyright (c) 2011-2013 Yan Pujante
- Portions Copyright (c) 2011-2015 Yan Pujante
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy of
Expand All @@ -21,7 +21,7 @@
<title>System List</title>
<meta name="layout" content="main"/>
<style type="text/css">
.current {
table.alternate-row-colors tbody tr.current {
background: #aaffaa;
}
</style>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%{--
- Copyright (c) 2010-2010 LinkedIn, Inc
- Portions Copyright (c) 2011-2013 Yan Pujante
- Portions Copyright (c) 2011-2015 Yan Pujante
-
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
- use this file except in compliance with the License. You may obtain a copy of
Expand Down Expand Up @@ -32,7 +32,7 @@
<g:paginate total="${userInstanceTotal}" max="100"/>
</div>
<div class="list">
<table class="table table-bordered table-condensed noFullWidth">
<table class="table table-bordered table-condensed noFullWidth alternate-row-colors">
<thead>
<tr>
<g:sortableColumn property="username" title="Username"/>
Expand All @@ -41,7 +41,7 @@
</thead>
<tbody>
<g:each in="${userInstanceList}" status="i" var="userInstance">
<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
<tr>
<td><cl:link action="show" id="${userInstance.id}">${fieldValue(bean: userInstance, field: 'username')}</cl:link></td>
<td>${ConsoleUtils.sortByName(userInstance.roles)}</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2010-2010 LinkedIn, Inc
* Portions Copyright (c) 2011-2013 Yan Pujante
* Portions Copyright (c) 2011-2015 Yan Pujante
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
Expand Down Expand Up @@ -86,6 +86,14 @@ table.xtight-table th, table.xtight-table td {
padding: 0 0.1em 0 0.1em;
}

table.alternate-row-colors tbody tr:nth-of-type(odd) {
background: #ffffff;
}

table.alternate-row-colors tbody tr:nth-of-type(even) {
background: #eeeeee;
}

pre {
white-space: pre;
word-wrap: normal;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 64d81da

Please sign in to comment.