You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/09/24 18:40:17 UTC

[GitHub] mitchell852 closed pull request #2851: Delivery service requests comments

mitchell852 closed pull request #2851: Delivery service requests comments
URL: https://github.com/apache/trafficcontrol/pull/2851
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_portal/app/src/common/modules/table/_table.scss b/traffic_portal/app/src/common/modules/table/_table.scss
index 18befcbe4..80e5b59d5 100644
--- a/traffic_portal/app/src/common/modules/table/_table.scss
+++ b/traffic_portal/app/src/common/modules/table/_table.scss
@@ -34,10 +34,55 @@ td span {
   float: left;
 }
 
+.table {
+    margin-bottom: 0px !important;
+}
+
 .ds-comment-bold {
     font-weight:bold;
 }
 .ds-comment-italic {
     font-style:italic;
     font-size:x-small;
-}
\ No newline at end of file
+}
+.dsComments-container {
+    border-bottom: 1px solid #111;
+    margin-top: -2px;
+}
+.ds-comment-cell {
+    line-height: 1.428571429;
+    vertical-align: top;
+    border-top: 1px solid #ddd;
+    border-left: 1px solid #ddd;
+    border-right: 1px solid #ddd;
+    padding-bottom: 8px;
+    min-height: 52px;
+
+    &:hover {
+        background-color: #F1FAF8;
+    }
+
+    .cell-left {
+        padding-top: 8px;
+        margin-left: 8px;
+        width: 80%;
+    }
+    .cell-right {
+        padding-top: 8px;
+        margin-right: 8px;
+    }
+}
+.ds-comment-nodata {
+    line-height: 1.428571429;
+    text-align: center;
+    border-left: 1px solid #ddd;
+    border-right: 1px solid #ddd;
+    padding-top: 4px;
+    padding-bottom: 8px;
+    min-height: 30px;
+
+    &:hover {
+        background-color: #F1FAF8;
+    }
+}
+
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceRequestComments/TableDeliveryServiceRequestCommentsController.js b/traffic_portal/app/src/common/modules/table/deliveryServiceRequestComments/TableDeliveryServiceRequestCommentsController.js
index 78c49f51a..ed775de82 100644
--- a/traffic_portal/app/src/common/modules/table/deliveryServiceRequestComments/TableDeliveryServiceRequestCommentsController.js
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceRequestComments/TableDeliveryServiceRequestCommentsController.js
@@ -143,16 +143,6 @@ var TableDeliveryServicesRequestsController = function (request, $scope, $state,
 
 	$scope.navigateToPath = locationUtils.navigateToPath;
 
-	angular.element(document).ready(function () {
-		var table = $('#dsRequestCommentsTable').dataTable({
-			"searching": false,
-			"paging": false,
-			"info": false,
-			"ordering": false,
-
-		});
-	});
-
 	$scope.getComments();
 };
 
diff --git a/traffic_portal/app/src/common/modules/table/deliveryServiceRequestComments/table.deliveryServiceRequestComments.tpl.html b/traffic_portal/app/src/common/modules/table/deliveryServiceRequestComments/table.deliveryServiceRequestComments.tpl.html
index 3996e2597..633251141 100644
--- a/traffic_portal/app/src/common/modules/table/deliveryServiceRequestComments/table.deliveryServiceRequestComments.tpl.html
+++ b/traffic_portal/app/src/common/modules/table/deliveryServiceRequestComments/table.deliveryServiceRequestComments.tpl.html
@@ -50,24 +50,26 @@
             <thead>
             <tr class="headings">
                 <th>Comment</th>
-                <th>Actions</th>
+                <th style="text-align:end;">Actions</th>
             </tr>
             </thead>
-            <tbody>
-            <tr ng-repeat="c in comments">
-                <td>
+        </table>
+        <div class="dsComments-container">
+            <div class="ds-comment-cell" ng-repeat="c in comments">
+                <div class="pull-left cell-left">
                     <span class="ds-comment-bold">{{c.author}}:</span> {{c.value}}<br>
                     <span class="ds-comment-italic">{{getRelativeTime(c.lastUpdated)}}</span>
-                </td>
-                <td style="text-align: right;">
+                </div>
+                <div class="pull-right cell-right" style="text-align: right; vertical-align: top;">
                     <a class="link action-link" title="Update Comment"
                             ng-click="editComment(c)"><i class="fa fa-edit"></i></a>
                     <a class="link action-link" title="Delete Comment"
                             ng-click="deleteComment(c, $event)"><i class="fa fa-trash-o"></i></a>
-                </td>
-            </tr>
-            </tbody>
-        </table>
+                </div>
+                <div class="clearfix"></div>
+            </div>
+            <div class="ds-comment-nodata" ng-show="comments.length <= 0">No matching records found</div>
+        </div>
     </div>
 </div>
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services