From cf9bbe0772c91b5cee5d29174b53b492b8bcb07d Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Mon, 11 May 2015 16:31:22 -0500
Subject: [PATCH] ui: Specify handle for draggable dialogs

---
 include/staff/dynamic-form.inc.php                    | 2 +-
 include/staff/templates/advanced-search.tmpl.php      | 2 +-
 include/staff/templates/collaborators.tmpl.php        | 2 +-
 include/staff/templates/content-manage.tmpl.php       | 2 +-
 include/staff/templates/dynamic-field-config.tmpl.php | 2 +-
 include/staff/templates/form-manage.tmpl.php          | 2 +-
 include/staff/templates/list-import.tmpl.php          | 2 +-
 include/staff/templates/list-item-properties.tmpl.php | 2 +-
 include/staff/templates/org-delete.tmpl.php           | 2 +-
 include/staff/templates/org-lookup.tmpl.php           | 2 +-
 include/staff/templates/org-profile.tmpl.php          | 2 +-
 include/staff/templates/org.tmpl.php                  | 2 +-
 include/staff/templates/sequence-manage.tmpl.php      | 2 +-
 include/staff/templates/task-assign.tmpl.php          | 2 +-
 include/staff/templates/task-delete.tmpl.php          | 2 +-
 include/staff/templates/task-edit.tmpl.php            | 2 +-
 include/staff/templates/task-status.tmpl.php          | 2 +-
 include/staff/templates/task-transfer.tmpl.php        | 2 +-
 include/staff/templates/task.tmpl.php                 | 2 +-
 include/staff/templates/thread-email-headers.tmpl.php | 2 +-
 include/staff/templates/thread-entry-edit.tmpl.php    | 2 +-
 include/staff/templates/thread-entry-resend.tmpl.php  | 2 +-
 include/staff/templates/thread-entry-view.tmpl.php    | 2 +-
 include/staff/templates/ticket-status.tmpl.php        | 2 +-
 include/staff/templates/user-account.tmpl.php         | 2 +-
 include/staff/templates/user-delete.tmpl.php          | 2 +-
 include/staff/templates/user-import.tmpl.php          | 2 +-
 include/staff/templates/user-lookup.tmpl.php          | 2 +-
 include/staff/templates/user-register.tmpl.php        | 2 +-
 include/staff/templates/user.tmpl.php                 | 2 +-
 include/staff/templates/users.tmpl.php                | 2 +-
 scp/css/scp.css                                       | 2 +-
 scp/js/scp.js                                         | 4 ++--
 33 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/include/staff/dynamic-form.inc.php b/include/staff/dynamic-form.inc.php
index 0bf1f1039..ed2ec1e4c 100644
--- a/include/staff/dynamic-form.inc.php
+++ b/include/staff/dynamic-form.inc.php
@@ -289,7 +289,7 @@ if ($form && count($langs) > 1) { ?>
 </p>
 
 <div style="display:none;" class="draggable dialog" id="delete-confirm">
-    <h3><i class="icon-trash"></i> <?php echo __('Remove Existing Data?'); ?></h3>
+    <h3 class="drag-handle"><i class="icon-trash"></i> <?php echo __('Remove Existing Data?'); ?></h3>
     <a class="close" href=""><i class="icon-remove-circle"></i></a>
     <hr/>
     <p>
diff --git a/include/staff/templates/advanced-search.tmpl.php b/include/staff/templates/advanced-search.tmpl.php
index e9f275f02..bb6153383 100644
--- a/include/staff/templates/advanced-search.tmpl.php
+++ b/include/staff/templates/advanced-search.tmpl.php
@@ -2,7 +2,7 @@
   $ff_uid = FormField::$uid;
 ?>
 <div id="advanced-search">
-<h3><?php echo __('Advanced Ticket Search');?></h3>
+<h3 class="drag-handle"><?php echo __('Advanced Ticket Search');?></h3>
 <a class="close" href=""><i class="icon-remove-circle"></i></a>
 <hr/>
 <form action="#tickets/search" method="post" name="search">
diff --git a/include/staff/templates/collaborators.tmpl.php b/include/staff/templates/collaborators.tmpl.php
index d8d339c88..cd17a3ca1 100644
--- a/include/staff/templates/collaborators.tmpl.php
+++ b/include/staff/templates/collaborators.tmpl.php
@@ -1,4 +1,4 @@
-<h3><?php echo __('Ticket Collaborators'); ?></h3>
+<h3 class="drag-handle"><?php echo __('Ticket Collaborators'); ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <?php
 if($info && $info['msg']) {
diff --git a/include/staff/templates/content-manage.tmpl.php b/include/staff/templates/content-manage.tmpl.php
index e90b8ff87..9009a4e45 100644
--- a/include/staff/templates/content-manage.tmpl.php
+++ b/include/staff/templates/content-manage.tmpl.php
@@ -1,4 +1,4 @@
-<h3><?php echo __('Manage Content'); ?> &mdash; <?php echo Format::htmlchars($content->getName()); ?></h3>
+<h3 class="drag-handle"><?php echo __('Manage Content'); ?> &mdash; <?php echo Format::htmlchars($content->getName()); ?></h3>
 <a class="close" href=""><i class="icon-remove-circle"></i></a>
 <hr/>
 
diff --git a/include/staff/templates/dynamic-field-config.tmpl.php b/include/staff/templates/dynamic-field-config.tmpl.php
index f2e666431..780fe18de 100644
--- a/include/staff/templates/dynamic-field-config.tmpl.php
+++ b/include/staff/templates/dynamic-field-config.tmpl.php
@@ -1,4 +1,4 @@
-    <h3><?php echo __('Field Configuration'); ?> &mdash; <?php echo $field->get('label') ?></h3>
+    <h3 class="drag-handle"><?php echo __('Field Configuration'); ?> &mdash; <?php echo $field->get('label') ?></h3>
     <a class="close" href=""><i class="icon-remove-circle"></i></a>
     <hr/>
     <form method="post" action="#form/field-config/<?php
diff --git a/include/staff/templates/form-manage.tmpl.php b/include/staff/templates/form-manage.tmpl.php
index e002ef165..4ad941887 100644
--- a/include/staff/templates/form-manage.tmpl.php
+++ b/include/staff/templates/form-manage.tmpl.php
@@ -1,4 +1,4 @@
-<h3><i class="icon-paste"></i> <?php echo __('Manage Forms'); ?></i></h3>
+<h3 class="drag-handle"><i class="icon-paste"></i> <?php echo __('Manage Forms'); ?></i></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/><?php echo __(
 'Sort the forms on this ticket by click and dragging on them. Use the box below the forms list to add new forms to the ticket.'
diff --git a/include/staff/templates/list-import.tmpl.php b/include/staff/templates/list-import.tmpl.php
index b3c38a99d..bf367c76c 100644
--- a/include/staff/templates/list-import.tmpl.php
+++ b/include/staff/templates/list-import.tmpl.php
@@ -1,4 +1,4 @@
-<h3><?php echo $info['title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info['title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/>
 <?php
diff --git a/include/staff/templates/list-item-properties.tmpl.php b/include/staff/templates/list-item-properties.tmpl.php
index 706c9484c..61ef1b8f6 100644
--- a/include/staff/templates/list-item-properties.tmpl.php
+++ b/include/staff/templates/list-item-properties.tmpl.php
@@ -1,4 +1,4 @@
-<h3><?php echo $list->getName(); ?> &mdash; <?php
+<h3 class="drag-handle"><?php echo $list->getName(); ?> &mdash; <?php
     echo $item ? $item->getValue() : __('Add New List Item'); ?></h3>
 <a class="close" href=""><i class="icon-remove-circle"></i></a>
 <hr/>
diff --git a/include/staff/templates/org-delete.tmpl.php b/include/staff/templates/org-delete.tmpl.php
index 16e06c83b..290d20e12 100644
--- a/include/staff/templates/org-delete.tmpl.php
+++ b/include/staff/templates/org-delete.tmpl.php
@@ -6,7 +6,7 @@ if (!$info['title'])
 $info['warn'] = __('Deleted organization CANNOT be recovered');
 
 ?>
-<h3><?php echo $info['title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info['title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/>
 <?php
diff --git a/include/staff/templates/org-lookup.tmpl.php b/include/staff/templates/org-lookup.tmpl.php
index 07620f2f6..377cf5347 100644
--- a/include/staff/templates/org-lookup.tmpl.php
+++ b/include/staff/templates/org-lookup.tmpl.php
@@ -9,7 +9,7 @@ if ($info['search'] === false)
 
 ?>
 <div id="the-lookup-form">
-<h3><?php echo $info['title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info['title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/>
 <div><p id="msg_info"><i class="icon-info-sign"></i>&nbsp; <?php echo $msg_info; ?></p></div>
diff --git a/include/staff/templates/org-profile.tmpl.php b/include/staff/templates/org-profile.tmpl.php
index 86db35c76..90420dab8 100644
--- a/include/staff/templates/org-profile.tmpl.php
+++ b/include/staff/templates/org-profile.tmpl.php
@@ -4,7 +4,7 @@ $info=($_POST && $errors)?Format::input($_POST):@Format::htmlchars($org->getInfo
 if (!$info['title'])
     $info['title'] = Format::htmlchars($org->getName());
 ?>
-<h3><?php echo $info['title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info['title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/>
 <?php
diff --git a/include/staff/templates/org.tmpl.php b/include/staff/templates/org.tmpl.php
index 41fcec1ee..4b8bc97fa 100644
--- a/include/staff/templates/org.tmpl.php
+++ b/include/staff/templates/org.tmpl.php
@@ -2,7 +2,7 @@
 if (!$info['title'])
     $info['title'] = Format::htmlchars($org->getName());
 ?>
-<h3><?php echo $info['title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info['title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/>
 <?php
diff --git a/include/staff/templates/sequence-manage.tmpl.php b/include/staff/templates/sequence-manage.tmpl.php
index 10ac7391b..d349605ee 100644
--- a/include/staff/templates/sequence-manage.tmpl.php
+++ b/include/staff/templates/sequence-manage.tmpl.php
@@ -1,4 +1,4 @@
-<h3><i class="icon-wrench"></i> <?php echo __('Manage Sequences'); ?></i></h3>
+<h3 class="drag-handle"><i class="icon-wrench"></i> <?php echo __('Manage Sequences'); ?></i></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/><?php echo __(
 'Sequences are used to generate sequential numbers. Various sequences can be
diff --git a/include/staff/templates/task-assign.tmpl.php b/include/staff/templates/task-assign.tmpl.php
index 7019fa49a..1c0feca3a 100644
--- a/include/staff/templates/task-assign.tmpl.php
+++ b/include/staff/templates/task-assign.tmpl.php
@@ -7,7 +7,7 @@ if (!$info[':title'])
     $info[':title'] = sprintf(__('%s Selected Tasks'),
             __('Assign'));
 ?>
-<h3><?php echo $info[':title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info[':title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <div class="clear"></div>
 <hr/>
diff --git a/include/staff/templates/task-delete.tmpl.php b/include/staff/templates/task-delete.tmpl.php
index 9a9191e4c..eea44e19c 100644
--- a/include/staff/templates/task-delete.tmpl.php
+++ b/include/staff/templates/task-delete.tmpl.php
@@ -5,7 +5,7 @@ if (!$info[':title'])
             __('Delete'),
             _N('selected task', 'selected tasks', $count));
 ?>
-<h3><?php echo $info[':title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info[':title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <div class="clear"></div>
 <hr/>
diff --git a/include/staff/templates/task-edit.tmpl.php b/include/staff/templates/task-edit.tmpl.php
index a77079e25..b90d545f8 100644
--- a/include/staff/templates/task-edit.tmpl.php
+++ b/include/staff/templates/task-edit.tmpl.php
@@ -10,7 +10,7 @@ $action = $info['action'] ?: ('#tasks/'.$task->getId().'/edit');
 
 ?>
 <div id="task-form">
-<h3><?php echo $info['title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info['title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/>
 <?php
diff --git a/include/staff/templates/task-status.tmpl.php b/include/staff/templates/task-status.tmpl.php
index b711e6f91..d741aaafc 100644
--- a/include/staff/templates/task-status.tmpl.php
+++ b/include/staff/templates/task-status.tmpl.php
@@ -5,7 +5,7 @@ if (!$info[':title'])
     $info[':title'] = __('Change Tasks Status');
 
 ?>
-<h3><?php echo $info[':title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info[':title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <div class="clear"></div>
 <hr/>
diff --git a/include/staff/templates/task-transfer.tmpl.php b/include/staff/templates/task-transfer.tmpl.php
index a45311f7f..b199be14f 100644
--- a/include/staff/templates/task-transfer.tmpl.php
+++ b/include/staff/templates/task-transfer.tmpl.php
@@ -7,7 +7,7 @@ if (!$info[':title'])
     $info[':title'] = sprintf(__('%s Selected Tasks'),
             __('Tranfer'));
 ?>
-<h3><?php echo $info[':title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info[':title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <div class="clear"></div>
 <hr/>
diff --git a/include/staff/templates/task.tmpl.php b/include/staff/templates/task.tmpl.php
index d92da014f..1271318ba 100644
--- a/include/staff/templates/task.tmpl.php
+++ b/include/staff/templates/task.tmpl.php
@@ -9,7 +9,7 @@ if ($ticket)
 
 ?>
 <div id="task-form">
-<h3><?php echo $info['title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info['title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/>
 <?php
diff --git a/include/staff/templates/thread-email-headers.tmpl.php b/include/staff/templates/thread-email-headers.tmpl.php
index a84216ab4..631d43c2e 100644
--- a/include/staff/templates/thread-email-headers.tmpl.php
+++ b/include/staff/templates/thread-email-headers.tmpl.php
@@ -1,4 +1,4 @@
-<h3><?php echo __('Raw Email Headers'); ?></h3>
+<h3 class="drag-handle"><?php echo __('Raw Email Headers'); ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/>
 
diff --git a/include/staff/templates/thread-entry-edit.tmpl.php b/include/staff/templates/thread-entry-edit.tmpl.php
index e1ed1f81c..24e63230e 100644
--- a/include/staff/templates/thread-entry-edit.tmpl.php
+++ b/include/staff/templates/thread-entry-edit.tmpl.php
@@ -1,4 +1,4 @@
-<h3><?php echo __('Edit Thread Entry'); ?></h3>
+<h3 class="drag-handle"><?php echo __('Edit Thread Entry'); ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/>
 
diff --git a/include/staff/templates/thread-entry-resend.tmpl.php b/include/staff/templates/thread-entry-resend.tmpl.php
index 8a3e283c6..f5bc8eb9a 100644
--- a/include/staff/templates/thread-entry-resend.tmpl.php
+++ b/include/staff/templates/thread-entry-resend.tmpl.php
@@ -1,4 +1,4 @@
-<h3><?php echo __('Resend Entry'); ?></h3>
+<h3 class="drag-handle"><?php echo __('Resend Entry'); ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/>
 
diff --git a/include/staff/templates/thread-entry-view.tmpl.php b/include/staff/templates/thread-entry-view.tmpl.php
index 29f098ca1..51a0a10da 100644
--- a/include/staff/templates/thread-entry-view.tmpl.php
+++ b/include/staff/templates/thread-entry-view.tmpl.php
@@ -1,4 +1,4 @@
-<h3><?php echo __('Original Thread Entry'); ?></h3>
+<h3 class="drag-handle"><?php echo __('Original Thread Entry'); ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/>
 
diff --git a/include/staff/templates/ticket-status.tmpl.php b/include/staff/templates/ticket-status.tmpl.php
index eae1b3272..458c6010c 100644
--- a/include/staff/templates/ticket-status.tmpl.php
+++ b/include/staff/templates/ticket-status.tmpl.php
@@ -5,7 +5,7 @@ if (!$info['title'])
     $info['title'] = 'Change Tickets Status';
 
 ?>
-<h3><?php echo $info['title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info['title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <div class="clear"></div>
 <hr/>
diff --git a/include/staff/templates/user-account.tmpl.php b/include/staff/templates/user-account.tmpl.php
index f727eeab0..ce1605f96 100644
--- a/include/staff/templates/user-account.tmpl.php
+++ b/include/staff/templates/user-account.tmpl.php
@@ -5,7 +5,7 @@ $access = (isset($info['_target']) && $info['_target'] == 'access');
 if (!$info['title'])
     $info['title'] = Format::htmlchars($user->getName());
 ?>
-<h3><?php echo $info['title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info['title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <div class="clear"></div>
 <hr/>
diff --git a/include/staff/templates/user-delete.tmpl.php b/include/staff/templates/user-delete.tmpl.php
index 35bb685be..3c8ab2a65 100644
--- a/include/staff/templates/user-delete.tmpl.php
+++ b/include/staff/templates/user-delete.tmpl.php
@@ -6,7 +6,7 @@ if (!$info['title'])
 $info['warn'] = __('Deleted users and tickets CANNOT be recovered');
 
 ?>
-<h3><?php echo $info['title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info['title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/>
 <?php
diff --git a/include/staff/templates/user-import.tmpl.php b/include/staff/templates/user-import.tmpl.php
index 413ed54e4..a1c47340b 100644
--- a/include/staff/templates/user-import.tmpl.php
+++ b/include/staff/templates/user-import.tmpl.php
@@ -1,5 +1,5 @@
 <div id="the-lookup-form">
-<h3><?php echo $info['title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info['title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/>
 <?php
diff --git a/include/staff/templates/user-lookup.tmpl.php b/include/staff/templates/user-lookup.tmpl.php
index 90dac1ab9..4a8e1c505 100644
--- a/include/staff/templates/user-lookup.tmpl.php
+++ b/include/staff/templates/user-lookup.tmpl.php
@@ -1,5 +1,5 @@
 <div id="the-lookup-form">
-<h3><?php echo $info['title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info['title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr/>
 <?php
diff --git a/include/staff/templates/user-register.tmpl.php b/include/staff/templates/user-register.tmpl.php
index 8282fe868..1fee0e6f3 100644
--- a/include/staff/templates/user-register.tmpl.php
+++ b/include/staff/templates/user-register.tmpl.php
@@ -9,7 +9,7 @@ if (!$_POST) {
 }
 
 ?>
-<h3><?php echo $info['title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info['title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <div class="clear"></div>
 <hr/>
diff --git a/include/staff/templates/user.tmpl.php b/include/staff/templates/user.tmpl.php
index 8c8974999..5add6b082 100644
--- a/include/staff/templates/user.tmpl.php
+++ b/include/staff/templates/user.tmpl.php
@@ -3,7 +3,7 @@ if (!isset($info['title']))
     $info['title'] = Format::htmlchars($user->getName());
 
 if ($info['title']) { ?>
-<h3><?php echo $info['title']; ?></h3>
+<h3 class="drag-handle"><?php echo $info['title']; ?></h3>
 <b><a class="close" href="#"><i class="icon-remove-circle"></i></a></b>
 <hr>
 <?php
diff --git a/include/staff/templates/users.tmpl.php b/include/staff/templates/users.tmpl.php
index c8a262022..a91a586f9 100644
--- a/include/staff/templates/users.tmpl.php
+++ b/include/staff/templates/users.tmpl.php
@@ -159,7 +159,7 @@ if ($res && $num) { //Show options..
 } ?>
 
 <div style="display:none;" class="dialog" id="confirm-action">
-    <h3><?php echo __('Please Confirm'); ?></h3>
+    <h3 class="drag-handle"><?php echo __('Please Confirm'); ?></h3>
     <a class="close" href=""><i class="icon-remove-circle"></i></a>
     <hr/>
     <p class="confirm-action" style="display:none;" id="remove-users-confirm">
diff --git a/scp/css/scp.css b/scp/css/scp.css
index 855dd8a03..4dd7cef3a 100644
--- a/scp/css/scp.css
+++ b/scp/css/scp.css
@@ -1565,7 +1565,7 @@ time {
     -webkit-box-sizing: content-box;
 }
 
-.dialog.draggable h3:hover {
+.dialog.draggable h3.drag-handle:hover {
     cursor: move;
 }
 
diff --git a/scp/js/scp.js b/scp/js/scp.js
index 8947e16f1..496b724c6 100644
--- a/scp/js/scp.js
+++ b/scp/js/scp.js
@@ -317,14 +317,14 @@ var scp_prep = function() {
             top : (w.innerHeight() / 7),
             left : (w.width() - $this.outerWidth()) / 2
         });
-        $this.hasClass('draggable') && $this.draggable({handle:'h3'});
+        $this.hasClass('draggable') && $this.draggable({handle:'.drag-handle'});
     });
 
 
     $('.dialog').each(function() {
         $this=$(this);
         $this.resize();
-        $this.hasClass('draggable') && $this.draggable({handle:'h3'});
+        $this.hasClass('draggable') && $this.draggable({handle:'.drag-handle'});
     });
 
     $('.dialog').delegate('input.close, a.close', 'click', function(e) {
-- 
GitLab