From c801d48371ac4d180c17a392433ff2ec0081fe0a Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Tue, 4 Aug 2015 17:27:29 -0500
Subject: [PATCH] More changes after initial review

---
 css/redactor.css                | 10 ++--
 include/staff/filter.inc.php    | 92 +++++++++++++++------------------
 include/staff/helptopic.inc.php |  2 +-
 include/staff/tpl.inc.php       | 13 ++---
 scp/css/scp.css                 | 12 ++---
 5 files changed, 62 insertions(+), 67 deletions(-)

diff --git a/css/redactor.css b/css/redactor.css
index ea8a3820a..e6d048dba 100644
--- a/css/redactor.css
+++ b/css/redactor.css
@@ -14,7 +14,7 @@
   position: relative;
   overflow: visible;
   overflow-x: hidden;
-  background: #ddd !important;
+  border: 1px solid #ddd;
 }
 .redactor-box textarea {
   display: block;
@@ -107,11 +107,12 @@ body .redactor-box-fullscreen {
   min-height: 80px;
   outline: none;
   white-space: normal;
-  border: 1px solid #eee;
   font-family: Arial, Helvetica, Verdana, Tahoma, sans-serif !important;
   font-size: 14px;
   line-height: 1.6em;
-  box-shadow: 5px 0 10px -8px rgba(0,0,0,0.5);
+}
+.redactor-editor[style*='width:'] {
+  border-right: 1px dashed #999;
 }
 .redactor-editor:focus {
   outline: none;
@@ -150,8 +151,7 @@ body .redactor-box-fullscreen {
   font-size: 14px !important;
   line-height: 1 !important;
   background: #fff;
-  border: 1px solid rgba(0,0,0,0.05);
-  border-bottom: 0;
+  border: none;
   box-shadow: 0 1px 4px -2px rgba(0, 0, 0, 0.4);
 }
 .redactor-toolbar:after {
diff --git a/include/staff/filter.inc.php b/include/staff/filter.inc.php
index ad5ff0d87..3a165d4bf 100644
--- a/include/staff/filter.inc.php
+++ b/include/staff/filter.inc.php
@@ -213,7 +213,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
                 if ($filter) { foreach ($filter->getActions() as $A) {
                     $existing[] = $A->type;
                 ?>
-                <tr style="background-color:white"><td><i class="icon-bolt icon-large icon-muted"></i>
+                <tr style="background-color:white"><td><i class="icon-sort icon-large icon-muted"></i>
                     <?php echo $A->getImpl()->getName(); ?>:</td>
                     <td>
                         <div style="position:relative"><?php
@@ -236,54 +236,48 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
                     </td>
                 </tr>
                 <?php } } ?>
-                <tr>
-                    <td>
-                        <strong><i class="icon-plus-sign"></i>
-                        <?php echo __('Add'); ?>:
-                        </strong>
-                    </td>
-                    <td>
-                        <select name="new-action" id="new-action-select"
-                                onchange="javascript: $('#new-action-btn').trigger('click');">
-                            <option value=""><?php echo __('— Select an Action —'); ?></option>
-                            <?php
-                            $current_group = '';
-                            foreach (FilterAction::allRegistered() as $group=>$actions) {
-                                if ($group && $current_group != $group) {
-                                    if ($current_group) echo '</optgroup>';
-                                    $current_group = $group;
-                                    ?><optgroup label="<?php echo Format::htmlchars($group); ?>"><?php
-                                }
-                                foreach ($actions as $type=>$name) {
-                            ?>
-                            <option data-title="<?php echo $name; ?>" value="<?php echo $type; ?>"
-                                    data-multi-use="<?php echo $mu = FilterAction::lookupByType($type)->hasFlag(TriggerAction::FLAG_MULTI_USE); ?> " <?php
-                                    if (in_array($type, $existing) && !$mu) echo 'disabled="disabled"';
-                                    ?>><?php echo $name; ?></option>
-                            <?php }
-                            } ?>
-                        </select>
-                        <button id="new-action-btn" type="button" class="inline green button" onclick="javascript:
-                            var dropdown = $('#new-action-select'), selected = dropdown.find(':selected');
-                            dropdown.val('');
-                            $('#dynamic-actions')
-                              .append($('<tr></tr>')
-                                .append($('<td></td>')
-                                  .text(selected.data('title') + ':')
-                                ).append($('<td></td>')
-                                  .append($('<em></em>').text(__('Loading ...')))
-                                  .load('ajax.php/filter/action/' + selected.val() + '/config', function() {
-                                    if (!selected.data('multiUse')) selected.prop('disabled', true);
-                                  })
-                                )
-                              ).append(
-                                $('<input>').attr({type:'hidden',name:'actions[]',value:'N'+selected.val()})
-                              );"><?php echo __('Add'); ?>
-                        </button>
-                    </td>
-                </tr>
-            </tbody>
-        </table>
+                </tbody>
+            </table>
+            <div style="padding: 5px">
+                <i class="icon-plus-sign"></i>
+                <select name="new-action" id="new-action-select"
+                        onchange="javascript: $('#new-action-btn').trigger('click');">
+                    <option value=""><?php echo __('— Select an Action —'); ?></option>
+                    <?php
+                    $current_group = '';
+                    foreach (FilterAction::allRegistered() as $group=>$actions) {
+                        if ($group && $current_group != $group) {
+                            if ($current_group) echo '</optgroup>';
+                            $current_group = $group;
+                            ?><optgroup label="<?php echo Format::htmlchars($group); ?>"><?php
+                        }
+                        foreach ($actions as $type=>$name) {
+                    ?>
+                    <option data-title="<?php echo $name; ?>" value="<?php echo $type; ?>"
+                            data-multi-use="<?php echo $mu = FilterAction::lookupByType($type)->hasFlag(TriggerAction::FLAG_MULTI_USE); ?> " <?php
+                            if (in_array($type, $existing) && !$mu) echo 'disabled="disabled"';
+                            ?>><?php echo $name; ?></option>
+                    <?php }
+                    } ?>
+                </select>
+                <button id="new-action-btn" type="button" class="inline green button" onclick="javascript:
+                    var dropdown = $('#new-action-select'), selected = dropdown.find(':selected');
+                    dropdown.val('');
+                    $('#dynamic-actions')
+                      .append($('<tr></tr>')
+                        .append($('<td></td>')
+                          .text(selected.data('title') + ':')
+                        ).append($('<td></td>')
+                          .append($('<em></em>').text(__('Loading ...')))
+                          .load('ajax.php/filter/action/' + selected.val() + '/config', function() {
+                            if (!selected.data('multiUse')) selected.prop('disabled', true);
+                          })
+                        )
+                      ).append(
+                        $('<input>').attr({type:'hidden',name:'actions[]',value:'N'+selected.val()})
+                      );"><?php echo __('Add'); ?>
+                </button>
+            </div>
     </div>
     <!-- ======================== INTERNAL NOTES ======================== -->
     <div class="tab_content hidden" id="internal_notes">
diff --git a/include/staff/helptopic.inc.php b/include/staff/helptopic.inc.php
index 278caf7b9..2dd9db0dd 100644
--- a/include/staff/helptopic.inc.php
+++ b/include/staff/helptopic.inc.php
@@ -360,7 +360,7 @@ foreach ($forms as $F) {
                 <div><?php echo Format::display($F->getLocal('instructions')); ?></div>
             </td>
         </tr>
-        <tr>
+        <tr style="text-align:left">
             <th><?php echo __('Enable'); ?></th>
             <th><?php echo __('Label'); ?></th>
             <th><?php echo __('Type'); ?></th>
diff --git a/include/staff/tpl.inc.php b/include/staff/tpl.inc.php
index 70c9e90b4..7f0839f8b 100644
--- a/include/staff/tpl.inc.php
+++ b/include/staff/tpl.inc.php
@@ -35,13 +35,10 @@ $tpl=$msgtemplates[$selected];
 
 ?>
 <form method="get" action="templates.php?">
-<h2><span><?php echo __('Email Template Set');
-    ?> &nbsp;/&nbsp; <span><a href="templates.php?tpl_id=<?php echo $tpl_id; ?>"><?php echo $name; ?></a>
-    <input type="hidden" name="a" value="manage">
-    <input type="hidden" name="tpl_id" value="<?php echo $tpl_id; ?>">
+<h2>
 <div class="pull-right">
     <span style="font-size:10pt"><?php echo __('Viewing'); ?>:</span>
-    <select id="tpl_options" name="id" style="width:300px;">
+    <select id="tpl_options" name="id" style="width:250px;">
         <option value="">&mdash; <?php echo __('Select Setting Group'); ?> &mdash;</option>
         <?php
         $impl = $group->getTemplates();
@@ -70,9 +67,13 @@ $tpl=$msgtemplates[$selected];
             echo "</optgroup>";
         ?>
     </select>
-    <input type="submit" value="Go">
     </div>
+
+    <span><?php echo __('Email Template Set'); ?></span>
+    <small> — <a href="templates.php?tpl_id=<?php echo $tpl_id; ?>"><?php echo $name; ?></a></small>
 </h2>
+    <input type="hidden" name="a" value="manage">
+    <input type="hidden" name="tpl_id" value="<?php echo $tpl_id; ?>">
 </form>
 <hr/>
 <form action="templates.php?id=<?php echo $id; ?>&amp;a=manage" method="post" id="save">
diff --git a/scp/css/scp.css b/scp/css/scp.css
index 19219d379..aa424efb2 100644
--- a/scp/css/scp.css
+++ b/scp/css/scp.css
@@ -102,20 +102,20 @@ a time.relative {
     color: #555;
 }
 
-.banner { margin: -10px 0 10px 0; padding: 10px 10px 10px 36px; color: #444; border: 1px solid #444;  background-color: #ddd; border-radius: 4px; }
+.banner { margin: 0; padding: 5px 5px 11px; margin-bottom: 10px; color: #444; border: 1px solid #444;  background-color: #ddd; border-radius: 4px; }
 
 #msg_info,
-.info-banner { margin: -10px 0 10px 0; padding: 10px 10px 10px 36px; color: #3a87ad; border: 1px solid #bce8f1;  background-color: #d9edf7; }
+.info-banner { margin: 0; padding: 5px; margin-bottom: 10px; color: #3a87ad; border: 1px solid #bce8f1;  background-color: #d9edf7; }
 
 #msg_notice,
 .success-banner,
-.notice-banner { margin: -10px 0 10px 0; padding: 10px 10px 10px 36px;  border: 1px solid #0a0; background: url('../images/icons/ok.png') 10px 50% no-repeat #e0ffe0; }
+.notice-banner { margin: 0; padding: 5px 10px 5px 36px; margin-bottom: 10px; border: 1px solid #0a0; background: url('../images/icons/ok.png') 10px 50% no-repeat #e0ffe0; }
 
 #msg_warning,
-.warning-banner { margin: -10px 0 10px 0; padding: 10px 10px 10px 36px; border: 1px solid #f26522; background: url('../images/icons/alert.png') 10px 50% no-repeat #ffffdd; }
+.warning-banner { margin: 0; padding: 5px 10px 5px 36px; margin-bottom: 10px; border: 1px solid #f26522; background: url('../images/icons/alert.png') 10px 50% no-repeat #ffffdd; }
 
 #msg_error,
-.error-banner { margin: -10px 0 10px 0; padding: 10px 10px 10px 36px; border: 1px solid #a00; background: url('../images/icons/error.png') 10px 50% no-repeat #fff0f0; }
+.error-banner { margin: 0; padding: 5px 10px 5px 36px; margin-bottom: 10px; border: 1px solid #a00; background: url('../images/icons/error.png') 10px 50% no-repeat #fff0f0; }
 
 #notice_bar { margin: 0; padding: 5px 10px 5px 36px; height: 16px; line-height: 16px; border: 1px solid #0a0; background: url('../images/icons/ok.png') 10px 50% no-repeat #e0ffe0; }
 
@@ -2819,7 +2819,7 @@ table.grid.form caption {
 select {
     height:24px;
     line-height:24px;
-    max-width:500px;
+    max-width:350px;
     border:1px solid #bbb;
     display:inline-block;
     padding:4px;
-- 
GitLab