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:
parent
0e6da27309
commit
b8446c2d3e
26 changed files with 256 additions and 116 deletions
|
|
@ -32,7 +32,7 @@ namespace Yavsc.ApiControllers
|
|||
/// <summary>
|
||||
/// Account controller.
|
||||
/// </summary>
|
||||
public class AccountController : YavscApiController
|
||||
public class AccountController : YavscController
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Yavsc.ApiControllers
|
|||
/// <summary>
|
||||
/// Blogs API controller.
|
||||
/// </summary>
|
||||
public class BlogsController : YavscApiController
|
||||
public class BlogsController : YavscController
|
||||
{
|
||||
/// <summary>
|
||||
/// Tag the specified model.
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace Yavsc.ApiControllers
|
|||
},
|
||||
new YaEvent () {
|
||||
Title = "Test2",
|
||||
ImgLocator = "http://bla/im.png",
|
||||
Photo = "http://bla/im.png",
|
||||
Location = new Position () {
|
||||
Longitude = 0,
|
||||
Latitude = 0
|
||||
|
|
@ -66,7 +66,7 @@ namespace Yavsc.ApiControllers
|
|||
},
|
||||
new YaEvent () {
|
||||
Title = "Test2",
|
||||
ImgLocator = "http://bla/im.png",
|
||||
Photo = "http://bla/im.png",
|
||||
Location = new Position () {
|
||||
Longitude = 0,
|
||||
Latitude = 0
|
||||
|
|
|
|||
|
|
@ -21,14 +21,26 @@
|
|||
using System;
|
||||
using System.Web.Http;
|
||||
using System.Net.Http;
|
||||
using System.Web.Profile;
|
||||
|
||||
namespace Yavsc.ApiControllers
|
||||
{
|
||||
public abstract class YavscApiController : ApiController
|
||||
public class YavscController : ApiController
|
||||
{
|
||||
public YavscApiController ()
|
||||
public YavscController ()
|
||||
{
|
||||
}
|
||||
public class Auth {
|
||||
public string Id { get; set; }
|
||||
}
|
||||
|
||||
public void AllowCookies (Auth model)
|
||||
{
|
||||
if (model.Id != null) {
|
||||
ProfileBase anonymousProfile = ProfileBase.Create (model.Id);
|
||||
anonymousProfile.SetPropertyValue ("allowcookies", true);
|
||||
}
|
||||
}
|
||||
|
||||
protected HttpResponseMessage DefaultResponse()
|
||||
{
|
||||
Loading…
Add table
Add a link
Reference in a new issue