Commits

Konstantin Mochalov  committed 0c94814

Column sizes

  • Participants
  • Parent commits 19f5519

Comments (0)

Files changed (2)

File tasks/static/tasks.js

     $scope.loading = false
     $scope.selected_task_id = null
     $scope.table_headers = [
-      ["id", "Id"],
-      ["description", "Description"],
-      ["date_start", "Start date"]
+      ["id", "Id", "col-md-1"],
+      ["description", "Description", "col-md-9"],
+      ["date_start", "Start date", "col-md-2"]
     ]
     $scope.sort = {
       column: 'id',
     }
     $scope.page = 1
     $scope.num_pages = 1
-    $scope.selectedCls = function(column) {
-      return column == $scope.sort.column && 'sort-' + ($scope.sort.descending ? 'desc' : 'asc')
+    $scope.selectedCls = function(column, added) {
+      return (column == $scope.sort.column && 'sort-' + ($scope.sort.descending ? 'desc' : 'asc')) + " " + added
     }
     $scope.pages = function() {
       return _.range(1, $scope.num_pages+1)

File tasks/templates/index.html

     <table class="table" id="tasks-table">
       <thead>
         <tr class="sortable-columns">
-          <th ng-repeat="th in table_headers" ng-class="selectedCls(th[0])" ng-click="changeSorting(th[0])">{{th[1]}}</th>
+          <th ng-repeat="th in table_headers" ng-class="selectedCls(th[0], th[2])" ng-click="changeSorting(th[0])">{{th[1]}}</th>
         </tr>
       </thead>
       <tbody>