Improves notification system

* ICalendarManager.cs: WIP booking TODO a calendar provider

* NpgsqlProfileProvider.cs: Fixes the defaultValue specification from
  config file

* BlogsController.cs:
* AccountController.cs:
* CalendarController.cs: refactoring : the Yavsc controller name

* instdbws.sql: a new profile value : a boolean, `AllowCookies` :'{

* style.css: a class to display notification

* HomeController.cs: Notifies users this site uses cookies (what for
  an information!)
If authenticated, at dimissing this notification, the user's profile
  is updated,
and he'll not mess up anymore with the info.

* App.master:
* YavscHelpers.cs: adds usage of click_action value at
displaying a notification.

* yavsc.js: Implements the notification `click_action`

* Web.config: * enables anonymous profiles
* adds a new `allowcookies` profile property

* Web.csproj: Yavsc controller refactoring

* YaEvent.cs:
* IFreeDateSet.cs: WIP booking

* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: implements the message "uses cookies"

* YavscModel.csproj: refactoring

* Notification.cs: The Yavsc otification will start as a Google one
  ...
many properties are not yet used, but all seems usefull.

* Web.config: code prettying

* YavscController.cs: Gives Yavsc a concrete base controller
This commit is contained in:
Paul Schneider 2015-10-28 21:02:03 +01:00
commit b8446c2d3e
26 changed files with 256 additions and 116 deletions

View file

@ -36,11 +36,12 @@ var apiBaseUrl = '<%=Url.Content(Yavsc.WebApiConfig.UrlPrefixRelative)%>';
</asp:ContentPlaceHolder>
<asp:ContentPlaceHolder ID="header" runat="server"></asp:ContentPlaceHolder>
<div id="notifications"></div>
<%if (ViewData ["Notifications"]!=null) { %>
<% if (ViewData ["Notifications"]!=null) { %>
<script>
$(document).ready(function(){
<% foreach (string note in (IEnumerable<string>) ViewData ["Notifications"] ) { %>
Yavsc.notice('<%=note%>');
<% foreach (Notification note in (IEnumerable<Notification>) ViewData ["Notifications"] ) {
if (note.click_action == null) {%> Yavsc.notice('<%=note.body%>'); <% }
else {%> Yavsc.notice('<%=note.body%>', <%=note.click_action%>); <% } %>
<% } %>
});
</script>