From 0ce49c3535e76459fd33343a562f3d3419d0b2e5 Mon Sep 17 00:00:00 2001
From: Lars Jung <lrsjng@gmail.com>
Date: Sat, 24 May 2014 15:53:54 +0200
Subject: [PATCH] Remove 'nth-child' from fallback styles.

---
 src/_h5ai/client/css/inc/fallback.less |  8 ++++----
 src/_h5ai/server/php/inc/class-app.php | 24 ++++++++++++------------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/_h5ai/client/css/inc/fallback.less b/src/_h5ai/client/css/inc/fallback.less
index b779222c..bb6f4e29 100644
--- a/src/_h5ai/client/css/inc/fallback.less
+++ b/src/_h5ai/client/css/inc/fallback.less
@@ -37,7 +37,7 @@
 				}
 			}
 		}
-		td:nth-child(1), th:nth-child(1) {
+		.fb-i {
 			width: 24px;
 
 			img {
@@ -45,16 +45,16 @@
 				height: 24px;
 			}
 		}
-		td:nth-child(2), th:nth-child(2) {
+		.fb-n {
 			width: 682px;
 			max-width: 682px;
 		}
-		td:nth-child(3), th:nth-child(3) {
+		.fb-d {
 			text-align: right;
 			width: 160px;
 			min-width: 160px;
 		}
-		td:nth-child(4), th:nth-child(4) {
+		.fb-s {
 			text-align: right;
 			width: 70px;
 			min-width: 70px;
diff --git a/src/_h5ai/server/php/inc/class-app.php b/src/_h5ai/server/php/inc/class-app.php
index f9aecbc0..78ae48ea 100644
--- a/src/_h5ai/server/php/inc/class-app.php
+++ b/src/_h5ai/server/php/inc/class-app.php
@@ -163,18 +163,18 @@ class App {
 		$html = "<table>";
 
 		$html .= "<tr>";
-		$html .= "<th></th>";
-		$html .= "<th><span>Name</span></th>";
-		$html .= "<th><span>Last modified</span></th>";
-		$html .= "<th><span>Size</span></th>";
+		$html .= "<th class='fb-i'></th>";
+		$html .= "<th class='fb-n'><span>Name</span></th>";
+		$html .= "<th class='fb-d'><span>Last modified</span></th>";
+		$html .= "<th class='fb-s'><span>Size</span></th>";
 		$html .= "</tr>";
 
 		if ($folder->get_parent($cache)) {
 			$html .= "<tr>";
-			$html .= "<td><img src='" . APP_URL . "client/icons/96/folder-parent.png' alt='folder-parent'/></td>";
-			$html .= "<td><a href='..'>Parent Directory</a></td>";
-			$html .= "<td></td>";
-			$html .= "<td></td>";
+			$html .= "<td class='fb-i'><img src='" . APP_URL . "client/icons/96/folder-parent.png' alt='folder-parent'/></td>";
+			$html .= "<td class='fb-n'><a href='..'>Parent Directory</a></td>";
+			$html .= "<td class='fb-d'></td>";
+			$html .= "<td class='fb-s'></td>";
 			$html .= "</tr>";
 		}
 
@@ -182,10 +182,10 @@ class App {
 			$type = $item->is_folder ? "folder" : "default";
 
 			$html .= "<tr>";
-			$html .= "<td><img src='" . APP_URL . "client/icons/96/" . $type . ".png' alt='" . $type . "'/></td>";
-			$html .= "<td><a href='" . $item->url . "'>" . basename($item->path) . "</a></td>";
-			$html .= "<td>" . date("Y-m-d H:i", $item->date) . "</td>";
-			$html .= "<td>" . ($item->size !== null ? intval($item->size / 1000) . " KB" : "" ) . "</td>";
+			$html .= "<td class='fb-i'><img src='" . APP_URL . "client/icons/96/" . $type . ".png' alt='" . $type . "'/></td>";
+			$html .= "<td class='fb-n'><a href='" . $item->url . "'>" . basename($item->path) . "</a></td>";
+			$html .= "<td class='fb-d'>" . date("Y-m-d H:i", $item->date) . "</td>";
+			$html .= "<td class='fb-s'>" . ($item->size !== null ? intval($item->size / 1000) . " KB" : "" ) . "</td>";
 			$html .= "</tr>";
 		}