From 6f057e5a64301eef903e61b4af68d868ee34877c Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Tue, 18 Aug 2015 16:37:37 -0500
Subject: [PATCH] ui: Fix some glitches after further review

---
 include/class.report.php        |  3 ++-
 include/staff/dashboard.inc.php |  6 +++---
 include/staff/tickets.inc.php   | 24 ++++++++++++------------
 scp/css/scp.css                 | 11 +++++++----
 scp/tickets.php                 | 21 ++++++---------------
 5 files changed, 30 insertions(+), 35 deletions(-)

diff --git a/include/class.report.php b/include/class.report.php
index 9913df318..efa078001 100644
--- a/include/class.report.php
+++ b/include/class.report.php
@@ -191,8 +191,9 @@ class OverviewReport {
                 $depts = array_merge($depts, $thisstaff->getDepts());
             $Q = Q::any(array(
                 'staff_id' => $thisstaff->getId(),
-                'dept_id__in' => $depts
             ));
+            if ($depts)
+                $Q->add(array('dept_id__in' => $depts));
             $stats = $stats->filter(array('staff_id__gt'=>0))->filter($Q);
             $times = $times->filter(array('staff_id__gt'=>0))->filter($Q);
             break;
diff --git a/include/staff/dashboard.inc.php b/include/staff/dashboard.inc.php
index 0c16b8257..95421e155 100644
--- a/include/staff/dashboard.inc.php
+++ b/include/staff/dashboard.inc.php
@@ -85,8 +85,8 @@ foreach ($groups as $g=>$desc) {
     <div class="tab_content <?php echo (!$first) ? 'hidden' : ''; ?>" id="<?php echo Format::slugify($g); ?>">
     <table class="dashboard-stats table"><tbody><tr>
 <?php
-    foreach ($data['columns'] as $c) { ?>
-        <th><?php echo Format::htmlchars($c); ?></th>
+    foreach ($data['columns'] as $j=>$c) { ?>
+        <th <?php if ($j === 0) echo 'width="30%" class="flush-left"'; ?>><?php echo Format::htmlchars($c); ?></th>
 <?php
     } ?>
     </tr></tbody>
@@ -96,7 +96,7 @@ foreach ($groups as $g=>$desc) {
         echo '<tr>';
         foreach ($row as $j=>$td) {
             if ($j === 0) { ?>
-                <th><?php echo Format::htmlchars($td); ?></th>
+                <th class="flush-left"><?php echo Format::htmlchars($td); ?></th>
 <?php       }
             else { ?>
                 <td><?php echo Format::htmlchars($td);
diff --git a/include/staff/tickets.inc.php b/include/staff/tickets.inc.php
index 373c89670..a1877ca0e 100644
--- a/include/staff/tickets.inc.php
+++ b/include/staff/tickets.inc.php
@@ -115,7 +115,7 @@ case 'search':
         $tickets = $search->mangleQuerySet($tickets, $form);
         $view_all_tickets = $thisstaff->hasPerm(SearchBackend::PERM_EVERYTHING);
         $results_type=__('Advanced Search')
-            . '<a class="action-button" href="?clear_filter"><i style="top:0" class="icon-ban-circle"></i> <em>' . __('clear') . '</em></a>';
+            . '<a class="action-button" style="font-size: 15px;" href="?clear_filter"><i style="top:0" class="icon-ban-circle"></i> <em>' . __('clear') . '</em></a>';
         foreach ($form->getFields() as $sf) {
             if ($sf->get('name') == 'keywords' && $sf->getClean()) {
                 $has_relevance = true;
@@ -378,23 +378,23 @@ return false;">
     <thead>
         <tr>
             <?php if ($thisstaff->canManageTickets()) { ?>
-	        <th width="4%">&nbsp;</th>
+	        <th width="2%">&nbsp;</th>
             <?php } ?>
-	        <th width="10%">
+	        <th width="7.4%">
                 <?php echo __('Ticket'); ?></th>
-	        <th width="15%">
+	        <th width="14.6%">
                 <?php echo $date_header ?: __('Date Created'); ?></th>
-	        <th width="36%">
+	        <th width="29.8%">
                 <?php echo __('Subject'); ?></th>
-            <th width="15%">
+            <th width="18.1%">
                 <?php echo __('From');?></th>
             <?php
             if($search && !$status) { ?>
-                <th width="5%">
+                <th width="8.4%">
                     <?php echo __('Status');?></th>
             <?php
             } else { ?>
-                <th width="5%" <?php echo $pri_sort;?>>
+                <th width="8.4%" <?php echo $pri_sort;?>>
                     <?php echo __('Priority');?></th>
             <?php
             }
@@ -402,16 +402,16 @@ return false;">
             if($showassigned ) {
                 //Closed by
                 if(!strcasecmp($status,'closed')) { ?>
-                    <th width="15%">
+                    <th width="16%">
                         <?php echo __('Closed By'); ?></th>
                 <?php
                 } else { //assigned to ?>
-                    <th width="15%">
+                    <th width="16%">
                         <?php echo __('Assigned To'); ?></th>
                 <?php
                 }
             } else { ?>
-                <th width="15%">
+                <th width="16%">
                     <?php echo __('Department');?></th>
             <?php
             } ?>
@@ -511,7 +511,7 @@ return false;">
                 <?php
                 }
                 ?>
-                <td nowrap><span class="truncate" style="max-width: 150px"><?php
+                <td nowrap><span class="truncate" style="max-width: 169px"><?php
                     echo Format::htmlchars($lc); ?></span></td>
             </tr>
             <?php
diff --git a/scp/css/scp.css b/scp/css/scp.css
index f1c46d4e6..127dd00d5 100644
--- a/scp/css/scp.css
+++ b/scp/css/scp.css
@@ -1,7 +1,9 @@
 body {
   font-family: "Lato", "Helvetica Neue", arial, helvetica, sans-serif;
-  font-weight: 300;
+  font-weight: 400;
   letter-spacing: 0.15px;
+  -webkit-font-smoothing:antialiased;
+          font-smoothing:antialiased;
 }
 body, html {
     background:#eee;
@@ -1133,7 +1135,7 @@ ul.tabs.clean li.active {
 }
 
 ul.tabs li a {
-    font-weight: 300;
+    font-weight: 400;
     line-height: 20px;
     color: #444;
     color: rgba(0,0,0,0.6);
@@ -1777,6 +1779,7 @@ input[type="button"],
     border-radius: 3px;
     font-family: inherit;
     font-size: 0.95em;
+    font-weight: normal;
 -webkit-user-select: none;
    -moz-user-select: none;
     -ms-user-select: none;
@@ -2355,7 +2358,7 @@ div.faq-status {
 
 .faq-title {
     font-size: 170%;
-    font-weight: 400;
+    font-weight: 600;
     margin-right:10px;
 }
 .faq-content {
@@ -2794,7 +2797,7 @@ input, textarea {
 }
 
 small {
-    font-weight: 300;
+    font-weight: normal;
     letter-spacing: 0.01px;
 }
 
diff --git a/scp/tickets.php b/scp/tickets.php
index c08e3d5ac..8ae7ca004 100644
--- a/scp/tickets.php
+++ b/scp/tickets.php
@@ -392,21 +392,6 @@ if($stats['overdue']) {
         $sysnotice=sprintf(__('%d overdue tickets!'),$stats['overdue']);
 }
 
-if($thisstaff->showAssignedOnly() && $stats['closed']) {
-    $nav->addSubMenu(array('desc'=>__('My Closed Tickets'),
-                           'title'=>__('My Closed Tickets'),
-                           'href'=>'tickets.php?status=closed',
-                           'iconclass'=>'closedTickets'),
-                        ($_REQUEST['status']=='closed'));
-} else {
-
-    $nav->addSubMenu(array('desc' => __('Closed'),
-                           'title'=>__('Closed Tickets'),
-                           'href'=>'tickets.php?status=closed',
-                           'iconclass'=>'closedTickets'),
-                        ($_REQUEST['status']=='closed'));
-}
-
 if (isset($_SESSION['advsearch'])) {
     // XXX: De-duplicate and simplify this code
     $search = SavedSearch::create();
@@ -421,6 +406,12 @@ if (isset($_SESSION['advsearch'])) {
                         (!$_REQUEST['status'] || $_REQUEST['status']=='search'));
 }
 
+$nav->addSubMenu(array('desc' => __('Closed'),
+                       'title'=>__('Closed Tickets'),
+                       'href'=>'tickets.php?status=closed',
+                       'iconclass'=>'closedTickets'),
+                    ($_REQUEST['status']=='closed'));
+
 if ($thisstaff->hasPerm(TicketModel::PERM_CREATE, false)) {
     $nav->addSubMenu(array('desc'=>__('New Ticket'),
                            'title'=> __('Open a New Ticket'),
-- 
GitLab