faizinfy

_alert.vbhtml

Dec 17th, 2018
491
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.19 KB | None | 0 0
  1. <script type="text/javascript">
  2.     toastr.options = {
  3.         "closeButton": true,
  4.         "debug": false,
  5.         "positionClass": "toast-top-center",
  6.         "onclick": null,
  7.         "showDuration": "2000",
  8.         "hideDuration": "2000",
  9.         "timeOut": "30000",
  10.         "extendedTimeOut": "1000",
  11.         "showEasing": "swing",
  12.         "hideEasing": "linear",
  13.         "showMethod": "fadeIn",
  14.         "hideMethod": "fadeOut"
  15.     }
  16.  
  17. @If Not TempData("m_success") Is Nothing Then
  18.     @If TempData("m_success").GetType Is GetType(String) Then
  19.         @<text>
  20.             toastr.success("@Html.Raw(TempData("m_success")).ToString.Replace(vbNewLine, "\n")")
  21.         </text>
  22.     Else
  23.         For Each item As String In TempData("m_success")
  24.             @<text>
  25.                 toastr.success("@Html.Raw(item).ToString.Replace(vbNewLine, "\n")")
  26.             </text>
  27.         Next
  28.     End If
  29. End If
  30. @If Not TempData("m_warning") Is Nothing Then
  31.     @If TempData("m_warning").GetType Is GetType(String) Then
  32.         @<text>
  33.             toastr.warning("@Html.Raw(TempData("m_warning")).ToString.Replace(vbNewLine, "\n")")
  34.         </text>
  35.     Else
  36.         For Each item As String In TempData("m_warning")
  37.             @<text>
  38.                 toastr.warning("@Html.Raw(item).ToString.Replace(vbNewLine, "\n")")
  39.             </text>
  40.         Next
  41.     End If
  42. End If
  43. @If Not TempData("m_error") Is Nothing Then
  44.     @If TempData("m_error").GetType Is GetType(String) Then
  45.         @<text>
  46.             toastr.error("@Html.Raw(TempData("m_error")).ToString.Replace(vbNewLine, "\n")")
  47.         </text>
  48.     Else
  49.         For Each item As String In TempData("m_error")
  50.             @<text>
  51.                 toastr.error("@Html.Raw(item).ToString.Replace(vbNewLine, "\n")")
  52.             </text>
  53.         Next
  54.     End If
  55. End If
  56. @If Not TempData("m_info") Is Nothing Then
  57.     @If TempData("m_info").GetType Is GetType(String) Then
  58.         @<text>
  59.             toastr.info("@Html.Raw(TempData("m_info")).ToString.Replace(vbNewLine, "\n")")
  60.         </text>
  61.     Else
  62.         For Each item As String In TempData("m_info")
  63.             @<text>
  64.                 toastr.info("@Html.Raw(item).ToString.Replace(vbNewLine, "\n")")
  65.             </text>
  66.         Next
  67.     End If
  68. End If
  69.  
  70.  
  71. </script>
Advertisement
Add Comment
Please, Sign In to add comment