small updates for tickets

This commit is contained in:
harrybomrah committed 2015-09-14 19:36:01 +08:00
1 parent fa272f7136
commit beb13207ad
3 files changed
+23 -3

No files matched your search

@@ -807,3 +807,8 @@
opacity: 1;
}
}
.ticket-response-content img, .ticket-query img{
cursor: pointer;
}
+6 -3
View File
@@ -187,9 +187,12 @@ class Admin::TicketsController < OrbitAdminController
response.save
tq.ticket_query_responses << response
if params[:user_tags].present?
# send_notification_emails(response, tq.ticket)
p1 = fork { send_notification_emails(response, tq.ticket) }
Process.detach(p1)
Thread.new do
begin
send_notification_emails(response, tq.ticket)
rescue e
end
end
end
render :partial => "response", :object => response
else
+12
View File
@@ -347,6 +347,18 @@ $(document).ready(function(){
return false;
})
var openImageWindow = null;
$("body").on("click", ".ticket-response-content img, .ticket-query img", function(){
var el = $(this);
if(el.parent().prop("tagName") != "A"){
if(openImageWindow == null){
openImageWindow = window.open(el.attr("src"));
}else{
openImageWindow.location = el.attr("src");
}
}
})
var timer = null;
$(document).on("scroll",function(){
clearTimeout(timer);