* styles.json:

* map-load.gif:
* mapstyle.css:
* fit-bounds.png:
* mapstyle-ie.css:
* jquery.googlemaps.js:
* pin-pink.png:
* mapstyle.min.css:
* pin-green.png:
* pin-azure.png:
* flag-azure.png:
* flag-green.png:
* needle-pink.png:
* jquery.googlemaps.min.js:
* current-location.png:
* niddle-green.png:
* popup-template-marker.html:
* popup-template-circle.html:
* popup-template-polygon.html:
* popup-template-polyline.html:
* popup-template-rectangle.html: GoogleMaps related add

* AccountController.cs: Fixes the conflict between external and custom
  avatar

* BasketController.cs: (Revert to revision
  93c18633b9)

* BlogsController.cs: Removes unused statment

* style.css:
* UserPost.aspx:
* UserPosts.aspx: an Avatar

* Web.csproj: Google Maps references and resources

* packages.config: Adds GoogleMapsHelpers, JQuery.GoogleMaps and
  MVC.GoogleMaps references

* NpgsqlWorkflow.csproj: The project now references Newtonsoft.Json

* NpgsqlContentProvider.cs: Saves the command parameters
This commit is contained in:
Paul Schneider 2015-02-08 01:01:08 +01:00
commit 630ddee841
31 changed files with 1602 additions and 33 deletions

View file

@ -271,6 +271,7 @@ namespace Yavsc.Controllers
/// <param name="AvatarFile">Avatar file.</param>
[Authorize]
[HttpPost]
// ASSERT("Membership.GetUser ().UserName is made of simple characters, no slash nor backslash"
public ActionResult Profile (Profile model, HttpPostedFileBase AvatarFile)
{
string username = Membership.GetUser ().UserName;
@ -282,9 +283,7 @@ namespace Yavsc.Controllers
string avdir = Server.MapPath (AvatarDir);
string avpath = Path.Combine (avdir, username + ".png");
AvatarFile.SaveAs (avpath);
model.avatar =
Path.Combine(AvatarDir.Substring(1),username)+".png";
model.avatar = Request.Url.Scheme+ "://"+ Request.Url.Authority + AvatarDir.Substring (1)+ "/" + username + ".png";
} else
ModelState.AddModelError ("Avatar",
string.Format ("Image type {0} is not supported (suported formats : {1})",

View file

@ -26,6 +26,7 @@ namespace Yavsc.ApiControllers
base.Initialize (controllerContext);
wfmgr = new WorkFlowManager ();
}
/// <summary>
/// Validates the order.
///
@ -52,17 +53,5 @@ namespace Yavsc.ApiControllers
//return WFManager.Write(estid << from the basket, desc, ucost, count, productid);
throw new NotImplementedException ();
}
/// <summary>
/// Yours the estimates.
/// </summary>
/// <returns>The estimates.</returns>
[HttpGet]
[Authorize]
public Estimate[] YourEstimates()
{
return wfmgr.GetEstimates (
Membership.GetUser().UserName);
}
}
}

View file

@ -155,7 +155,7 @@ namespace Yavsc.Controllers
return View ("TitleNotFound");
ViewData ["BlogUserProfile"] = pr;
ViewData ["BlogTitle"] = pr.BlogTitle;
ViewData ["HasAvatar"] = pr.avatar != null;
ViewData ["Avatar"] = pr.avatar;
MembershipUser u = Membership.GetUser ();
if (u != null)
ViewData ["UserName"] = u.UserName;
@ -302,6 +302,9 @@ namespace Yavsc.Controllers
if (avpath==null) {
FileInfo fia = new FileInfo (Server.MapPath (defaultAvatar));
return File (fia.OpenRead (), defaultAvatarMimetype);
}
if (avpath.StartsWith ("~/")) {
}
WebRequest wr = WebRequest.Create(avpath);
FileContentResult res;