small updates for tickets

This commit is contained in:
Harry Bomrah 2015-09-14 19:36:01 +08:00
parent fa272f7136
commit beb13207ad
3 changed files with 23 additions and 3 deletions

View File

@ -807,3 +807,8 @@
opacity: 1; opacity: 1;
} }
} }
.ticket-response-content img, .ticket-query img{
cursor: pointer;
}

View File

@ -187,9 +187,12 @@ class Admin::TicketsController < OrbitAdminController
response.save response.save
tq.ticket_query_responses << response tq.ticket_query_responses << response
if params[:user_tags].present? if params[:user_tags].present?
# send_notification_emails(response, tq.ticket) Thread.new do
p1 = fork { send_notification_emails(response, tq.ticket) } begin
Process.detach(p1) send_notification_emails(response, tq.ticket)
rescue e
end
end
end end
render :partial => "response", :object => response render :partial => "response", :object => response
else else

View File

@ -347,6 +347,18 @@ $(document).ready(function(){
return false; 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; var timer = null;
$(document).on("scroll",function(){ $(document).on("scroll",function(){
clearTimeout(timer); clearTimeout(timer);