Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style type="text/css">
- div.growlUI {
- background: no-repeat 10px 10px;
- }
- div.growlUI h1, div.growlUI h2 {
- color: white;
- padding: 5px 5px 5px 75px;
- text-align: left;
- }
- </style>
- @using WEB
- @{
- var alerts = TempData.ContainsKey(Alert.TempDataKey)
- ? (List<Alert>)TempData[Alert.TempDataKey]
- : new List<Alert>();
- foreach (var alert in alerts)
- {
- <script type="text/javascript">
- $(function () {
- @{
- if (alert.AlertStyle == AlertStyles.Success)
- {
- <text>
- $.growl.notice({ message: "@alert.Message" });
- </text>
- }
- if (alert.AlertStyle == AlertStyles.Error)
- {
- <text>
- $.growl.error({ message: "@alert.Message" });
- </text>
- }
- if (alert.AlertStyle == AlertStyles.Information)
- {
- <text>
- $.growl.warning({ message: "@alert.Message" });
- </text>
- }
- }
- })
- </script>
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement