Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.
My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
<div id='stealtheticket'> <input type='button' value='Take the Ticket' onclick='do_action();'> <div style='padding: 4px; font-weight: bold; font-size: 18px;'> <div id='stealtheticket_status'></div> <div id='stealtheticket_error'></div> </div> </div> <script type="javascript"> // This is the main bit of code, the action that occurs when the "Do" button is hit. // All other methods should be put into their own little sections var current_callbacks = ; $'stealtheticket_error'innerHTML = arg; $'stealtheticket_status'innerHTML = arg; setTimeout function log_status''; 3000; var current_action = 'steal_ticket'; if current_action var callback = current_callbackscurrent_action; callback; Eventobservewindow'widgets:load'function current_callbacks'not_yet' = function log_status"Sorry, that function isn't done yet. :("; fade_status; current_callbacks'steal_ticket' = attempt_steal; ; var _current_user_id = 0; agentseach functionrow if row'name' == "{{current_user.name}}" _current_user_id = row'id'; ; return _current_user_id; </script> <script type="javascript"> // this is all the code for the ticket stealing function. var ticket_id = ticketid; var can_update_ticket = false; var assignee_name = 'Unknown'; log_status"Checking one last time..."; check_on_ticketfunction do_steal; ; log_status'Starting...'; var do_it = false; if can_update_ticket == false do_it = confirm"This ticket is already owned by " + assignee_name + "\n\nClicking OK will assign this ticket to you."; else do_it = true; if do_it '/tickets/' + ticket_id + '.xml?_method=put' method:'PUT' asynchronous: true contentType: "application/xml" postBody: "<ticket><assignee-id type=\"integer\">" + get_current_user_id + "</assignee-id></ticket>" //postBody: '{"ticket": {"assignee-id": ' + current_user_id + '}}', var obj = transportresponseText; log_status"Owner = You"; fade_status; $$'select#ticket_assignee_id option'each functionitem if itemvalue == get_current_user_id itemselected = true; ; log_error'exception: ' + transportresponseText; log_error'failure: ' + transportresponseText; ; log_status"Attempting to find owner."; '/tickets/' + ticket_id + '.json' method:'GET' asynchronous: true var obj = transportresponseTextevalJSON; ticket_id = obj'nice_id'; assignee_name = 'None'; agentseach functionrow if row'id' == obj'assignee_id' assignee_name = row'name'; ; log_status"Current Owner: " + assignee_name; if assignee_name == 'None' can_update_ticket = true; else can_update_ticket = false; if cb_on_success !== undefined cb_on_success; log_error'exception: ' + transportresponseText; log_error'failure: ' + transportresponseText; ; </script> |