Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. <script>
  2. function hideMe(requestId) {
  3. $('#' + requestId + 'warn').hide();
  4. $('#' + requestId + 'approve').show();
  5. $('#' + requestId + 'cancel').show();
  6. $('#' + requestId + 'pendApprove').show();
  7. $('#' + requestId + 'pendApprove').next().show();
  8. $('#' + requestId + 'pendWarn').hide();
  9. };
  10.  
  11. function approveRequest(event, requestId, inform) {
  12. event.preventDefault();
  13. if (inform == 1) {
  14. $('#' + requestId + 'warn').show();
  15. $('#' + requestId + 'approve').hide();
  16. $('#' + requestId + 'cancel').hide();
  17. }
  18. else if (inform == 2) {
  19. $('#' + requestId + 'pendApprove').hide();
  20. $('#' + requestId + 'pendApprove').next().hide();
  21. $('#' + requestId + 'pendWarn').show();
  22. }
  23. }
  24. </script>
  25.  
  26. <span class="pending" title="@request.ToolTipComment">@request.LastName, @request.FirstName (@request.PtoType)</span>
  27. <a href="#" id="@(request.RequestId)approve"onclick="approveRequest(event, @request.RequestId, 1)" class="approveButton"><span>&#10004;</span></a>
  28. <a href="#" id="@(request.RequestId)cancel" class="denyButton">X</a>
  29. <textarea class="cancelText" id="@(request.RequestId)month" style="width: 180px; height:60px;"></textarea>
  30. <a href="#" class="cancel" onclick="cancelRequest(event, @request.RequestId)">Send Rejection</a>
  31. <a href="#" class="doNotCancel">Cancel Rejection</a>
  32. <div id="@(request.RequestId)warn" class="alert alert-warning maxWarning">
  33. <a href="#" onclick="approveRequest(event, @request.RequestId, 0)" class="continueSubmit">continue</a>
  34. <a href="#" class="close" onclick="hideMe(@request.RequestId)" aria-label="close">&times;</a>
  35. <strong>Warning!</strong> Hours requested are more than available hours.
  36. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement