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;
}
}
.ticket-response-content img, .ticket-query img{
cursor: pointer;
}

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

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);