Fix status bugs
This commit is contained in:
parent
1edc134691
commit
21009961ef
|
@ -59,10 +59,10 @@ class Panel::Ask::BackEnd::AskRepliesController < OrbitBackendController
|
|||
response = http.request(request)
|
||||
# binding.pry
|
||||
if response.code != "200"
|
||||
new_status = "轉介其他單位" + "(" + response.code + ")"
|
||||
new_status = "轉介其他單位"
|
||||
current_reply.update_attributes(status: new_status)
|
||||
else
|
||||
new_status = "轉介其他單位" + "(" + " Success!" + ")"
|
||||
new_status = "轉介其他單位"
|
||||
current_reply.update_attributes(status: new_status)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,18 +1,30 @@
|
|||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
// if ($("#ask_reply_status").val() == '轉介其他單位') { $('.dept_options').show(); }
|
||||
|
||||
$("#ask_reply_status").change(function() {
|
||||
|
||||
var local_host = "<%= request.host %>:<%= request.port %>";
|
||||
|
||||
function hide_current_host_name(localhost) {
|
||||
$('input[type=checkbox]').each(function() {
|
||||
if ($(this).val() == local_host) {
|
||||
$(this).addClass("hide");
|
||||
$(this).next().addClass("hide");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
if ($("#ask_reply_status").val() == '轉介其他單位') {
|
||||
|
||||
var local_host = "<%= request.host %>:<%= request.port %>";
|
||||
|
||||
hide_current_host_name(local_host);
|
||||
|
||||
$('.dept_options').show();
|
||||
}
|
||||
|
||||
$("#ask_reply_status").change(function() {
|
||||
|
||||
hide_current_host_name(local_host);
|
||||
|
||||
$('.dept_options').slideUp();
|
||||
if ($(this).find('option:selected').attr('value') == '轉介其他單位') {
|
||||
|
|
Loading…
Reference in New Issue