* yavsc.js:
* yavsc.circles.js: js refactoring * Credits.aspx: A credit about to add * CircleBase.cs: The Circle base * NpgsqlCircleProvider.cs: * refactoring * updates the circle * InputCircle.cs: using the new CircleBase class * ResultPages.cs: Using a new "None" attribute * CircleController.cs: refactoring : drops the NewCircle class The `List` method now resterns collection of circlebase * style.css: * a new `dirty` css class, could be used to tag data to validate ala ajax * removed quite all of the `float` usages * AccountController.cs: xml doc * BlogsController.cs: Avatar method moved to the Account controller * YavscHelpers.cs: An avatar url * App.master: Login div moved up * Circles.aspx: a new `private` filed in the `Circle` object, in order to keep circle names from being published as user's information, should be true by default * Profile.aspx: removed the tables * Index.aspx: Un message plus explicite * Web.config: nothing to view * Web.csproj: * new page : Credit * new script: yavsc.circle.js * instdbws.sql: circles are uniques for a given user against a given app * Circle.cs: Now inherits CircleBase to implement a member list * CircleProvider.cs: implements a circle update method * LocalizedText.resx: * LocalizedText.Designer.cs: no content!!! * LocalizedText.fr.resx: * LocalizedText.fr.Designer.cs: pas content * YavscModel.csproj: a new CircleBAse class
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
2015-09-10 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* InputCircle.cs: using the new CircleBase class
|
||||
|
||||
* ResultPages.cs: Using a new "None" attribute
|
||||
|
||||
2015-08-22 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* InputCircle.cs: this class is about to be removed
|
||||
|
@ -29,6 +29,7 @@ using System.Web.Security;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using System.Linq;
|
||||
|
||||
namespace Yavsc.WebControls
|
||||
{
|
||||
@ -154,15 +155,15 @@ namespace Yavsc.WebControls
|
||||
}
|
||||
var u = Membership.GetUser ();
|
||||
if (u != null) {
|
||||
foreach (var ci in CircleManager.DefaultProvider.List(u.UserName)) {
|
||||
foreach (SelectListItem sli in Value)
|
||||
if (sli.Value == ci.Id.ToString()) {
|
||||
var circles = CircleManager.DefaultProvider.List (u.UserName);
|
||||
foreach (SelectListItem sli in Value) {
|
||||
if (circles.Any( x=> x.Title == sli.Text)) {
|
||||
writer.AddAttribute ("selected", null);
|
||||
break;
|
||||
}
|
||||
writer.AddAttribute ("value", ci.Id.ToString() );
|
||||
writer.AddAttribute ("value", sli.Value );
|
||||
writer.RenderBeginTag ("option");
|
||||
writer.Write (ci.Title);
|
||||
writer.Write (sli.Text);
|
||||
writer.RenderEndTag ();
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ namespace Yavsc.WebControls
|
||||
/// </summary>
|
||||
public ResultPages ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -96,6 +97,18 @@ namespace Yavsc.WebControls
|
||||
}
|
||||
}
|
||||
|
||||
[Bindable (true)]
|
||||
[DefaultValue("none")]
|
||||
public string None {
|
||||
get {
|
||||
|
||||
string s = (string) ViewState["None"];
|
||||
return (s == null) ? String.Empty : s;
|
||||
}
|
||||
set {
|
||||
ViewState["None"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the current page.
|
||||
@ -134,14 +147,11 @@ namespace Yavsc.WebControls
|
||||
writer.Write (" ");
|
||||
}
|
||||
}
|
||||
writer.Write ("(");
|
||||
if (ResultCount == 0) {
|
||||
writer.Write ("Pas de resultat");
|
||||
} else {
|
||||
writer.Write (ResultCount.ToString () + " resultat");
|
||||
if (ResultCount>1) writer.Write("s");
|
||||
writer.Write ("(");
|
||||
writer.Write (None);
|
||||
writer.Write (")");
|
||||
}
|
||||
writer.Write (")");
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user