Notifications display
This commit is contained in:
parent
ffebb9141c
commit
3b67420d4d
3 changed files with 20 additions and 14 deletions
|
|
@ -93,11 +93,10 @@ $(document).ready(function(){
|
||||||
|
|
||||||
<nav data-type="background" data-speed="2">
|
<nav data-type="background" data-speed="2">
|
||||||
<% if (Membership.GetUser()==null) { %>
|
<% if (Membership.GetUser()==null) { %>
|
||||||
<a href="<%= Url.Content("~/Account/Login/?returnUrl=") + Url.Encode( Request.Url.PathAndQuery )%>" >
|
<a href="<%= Url.RouteUrl("Default", new { controller = "Account", action="Login", returnUrl=Request.Url.PathAndQuery } ) %>" class="menuitem">
|
||||||
<div class="menuitem">
|
|
||||||
<i class="fa fa-sign-in"></i> Connexion
|
<i class="fa fa-sign-in"></i> Connexion
|
||||||
<div class="hint">Pour pouvoir commenter, publier, facturer</div>
|
<div class="hint">Pour pouvoir commenter, publier, facturer, partager en cercles privés ...</div>
|
||||||
</div>
|
|
||||||
</a>
|
</a>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<a href="/Blog/<%= HttpContext.Current.User.Identity.Name%>" accesskey = "B" class="menuitem">
|
<a href="/Blog/<%= HttpContext.Current.User.Identity.Name%>" accesskey = "B" class="menuitem">
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,17 @@ self.showHide = function () {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
self.message = function (msg) {
|
self.dimiss = function () {
|
||||||
|
$(this).parent().remove();
|
||||||
|
};
|
||||||
|
|
||||||
|
self.notice = function (msg, msgok) {
|
||||||
|
if (!msgok) msgok='Ok';
|
||||||
if (msg) {
|
if (msg) {
|
||||||
$("#message").removeClass("hidden");
|
var note = $('<div class="notification">'+msg+'<br></div>');
|
||||||
$("#message").text(msg);
|
$('<a class="actionlink"><i class="fa fa-check">'+msgok+'</i></a>').click(self.dimiss).appendTo(note);
|
||||||
} else { $("#message").addClass("hidden"); } };
|
note.appendTo("#notifications");
|
||||||
|
} };
|
||||||
|
|
||||||
|
|
||||||
self.onAjaxBadInput = function (data)
|
self.onAjaxBadInput = function (data)
|
||||||
|
|
@ -36,13 +42,14 @@ self.message = function (msg) {
|
||||||
errspan.innerHTML=value.errors.join("<br/>");
|
errspan.innerHTML=value.errors.join("<br/>");
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
self.onAjaxError = function (xhr, ajaxOptions, thrownError) {
|
self.onAjaxError = function (xhr, ajaxOptions, thrownError) {
|
||||||
if (xhr.status!=400)
|
if (xhr.status!=400)
|
||||||
Yavsc.message(xhr.status+" : "+xhr.responseText);
|
Yavsc.notice(xhr.status+" : "+xhr.responseText);
|
||||||
else Yavsc.message(false);
|
else Yavsc.notice(false);
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
|
||||||
BIN
web/images/helix-nebula-1400x1400.l.jpg
Normal file
BIN
web/images/helix-nebula-1400x1400.l.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 87 KiB |
Loading…
Add table
Add a link
Reference in a new issue