From 850af4390704b2ff686446c58a9ec7524a440dd6 Mon Sep 17 00:00:00 2001
From: Jaden Diefenbaugh <blakcap@users.noreply.github.com>
Date: Thu, 18 May 2017 13:52:03 +0200
Subject: [PATCH] pins first column of tables to first column placement, fixes
 #31

---
 beat/web/reports/static/reports/app/directives/tableItem.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/beat/web/reports/static/reports/app/directives/tableItem.js b/beat/web/reports/static/reports/app/directives/tableItem.js
index a8798b2c1..343a7b8b8 100644
--- a/beat/web/reports/static/reports/app/directives/tableItem.js
+++ b/beat/web/reports/static/reports/app/directives/tableItem.js
@@ -161,6 +161,10 @@ angular.module('reportApp')
 				// and the user cant see the exp
 				return false;
 			};
+
+			scope.sortableOptions = {
+				items: `th:not(:first-child)`
+			};
 		},
 		template: `
 <div ng-if='isViewingCsv.val'>
@@ -169,7 +173,7 @@ angular.module('reportApp')
 <div ng-if='!isViewingCsv.val' style='height: 100%; overflow-x: auto;'>
 	<table class="table table-striped table-hover">
 		<thead>
-			<tr ui-sortable ng-model='fields'>
+			<tr ui-sortable='sortableOptions' ng-model='fields'>
 				<th ng-repeat='field in fields'>
 					<span
 						ng-if="sortField.val == field"
-- 
GitLab