From 3e89582441de2a6ff3e22edb6d4e8fe0d04969a3 Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Wed, 10 Oct 2012 23:30:19 -0400
Subject: [PATCH] Add expres actions support

---
 scp/js/ticket.js | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/scp/js/ticket.js b/scp/js/ticket.js
index a51bdf797..a3d3f8e20 100644
--- a/scp/js/ticket.js
+++ b/scp/js/ticket.js
@@ -329,4 +329,31 @@ jQuery(function($) {
         return false;
     });
 
+    //ticket status (close & reopen)
+    $('a#ticket-close, a#ticket-reopen').click(function(e) {
+        e.preventDefault();
+        $('#overlay').show();
+        $('.dialog#ticket-status').show();
+        return false;
+    });
+       
+    //ticket actions confirmation - Delete + more
+    $('a#ticket-delete, a#ticket-claim, #action-dropdown-more li a').click(function(e) {
+        e.preventDefault();
+        if($('.dialog#confirm-action '+$(this).attr('href')+'-confirm').length) {
+            var action = $(this).attr('href').substr(1, $(this).attr('href').length);
+            $('.dialog#confirm-action #action').val(action);
+            $('#overlay').show();
+            $('.dialog#confirm-action .confirm-action').hide();
+            $('.dialog#confirm-action p'+$(this).attr('href')+'-confirm')
+            .show()
+            .parent('div').show().trigger('click');
+
+        } else {
+            alert('Unknown action '+$(this).attr('href')+'- get technical help.');
+        }
+
+        return false;
+    });
+
 });
-- 
GitLab