diff --git a/OurUmbraco.Site/OurUmbraco.Site.csproj b/OurUmbraco.Site/OurUmbraco.Site.csproj
index b05b9f7e..e7406af4 100644
--- a/OurUmbraco.Site/OurUmbraco.Site.csproj
+++ b/OurUmbraco.Site/OurUmbraco.Site.csproj
@@ -4730,10 +4730,6 @@
{a625544f-660a-4c01-ba49-1b467d0322d9}
our.umbraco.org
-
- {f356b339-296a-4594-81b6-cf69a802483e}
- uEvents
-
{547c2d0d-1b55-493b-ae0b-e031a5b8ee77}
uForum
diff --git a/uEvents/Api/EventsController.cs b/OurUmbraco/Events/Api/EventsController.cs
similarity index 100%
rename from uEvents/Api/EventsController.cs
rename to OurUmbraco/Events/Api/EventsController.cs
diff --git a/uEvents/App_Startup/ControllerRouting.cs b/OurUmbraco/Events/App_Startup/ControllerRouting.cs
similarity index 100%
rename from uEvents/App_Startup/ControllerRouting.cs
rename to OurUmbraco/Events/App_Startup/ControllerRouting.cs
diff --git a/uEvents/Library/Xslt.cs b/OurUmbraco/Events/Library/Xslt.cs
similarity index 96%
rename from uEvents/Library/Xslt.cs
rename to OurUmbraco/Events/Library/Xslt.cs
index 2c30f880..b558955e 100644
--- a/uEvents/Library/Xslt.cs
+++ b/OurUmbraco/Events/Library/Xslt.cs
@@ -1,73 +1,73 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Xml.XPath;
-using umbraco.cms.businesslogic.web;
-using umbraco.DataLayer;
-using System.Xml;
-using uEvents.Relations;
-
-namespace uEvents.Library
-{
- [Umbraco.Core.Macros.XsltExtension("uEvents")]
- public class Xslt
- {
- public static bool isSignedUp(int eventId, int memberId)
- {
- return umbraco.cms.businesslogic.relation.Relation.IsRelated(eventId, memberId);
- }
-
- public static bool isFull(int eventId)
- {
- Event e = new Event(eventId);
- return e.IsFull;
- }
-
- public static void SignUp(int memberId, int eventId)
- {
- Event e = new Event(eventId);
- e.SignUp(memberId, "no comment");
- }
-
- public static void Cancel(int memberId, int eventId)
- {
- Event e = new Event(eventId);
- e.Cancel(memberId, "no comment");
- }
-
- public static XPathNodeIterator UpcomingEvents()
- {
- int contentType = DocumentType.GetByAlias("Event").Id;
- string property = "start";
-
- string sql = string.Format(@"SELECT distinct contentNodeId from cmsPropertyData
- inner join cmsPropertyType ON
- cmspropertytype.contenttypeid = {0} and
- cmspropertytype.Alias = '{1}' and
- cmspropertytype.id = cmspropertydata.propertytypeid
- where dataDate > GETDATE()", contentType, property);
-
- ISqlHelper sqlhelper = umbraco.BusinessLogic.Application.SqlHelper;
- IRecordsReader rr = sqlhelper.ExecuteReader(sql);
-
- XmlDocument doc = new XmlDocument();
- XmlNode root = umbraco.xmlHelper.addTextNode(doc, "events", "");
-
- while (rr.Read())
- {
- XmlNode x = (XmlNode)umbraco.content.Instance.XmlContent.GetElementById( rr.GetInt("contentNodeId").ToString() );
-
- if (x != null)
- {
- x = doc.ImportNode(x, true);
- root.AppendChild(x);
- }
- }
- rr.Close();
- rr.Dispose();
-
- return root.CreateNavigator().Select(".");
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml.XPath;
+using umbraco.cms.businesslogic.web;
+using umbraco.DataLayer;
+using System.Xml;
+using uEvents.Relations;
+
+namespace uEvents.Library
+{
+ [Umbraco.Core.Macros.XsltExtension("uEvents")]
+ public class Xslt
+ {
+ public static bool isSignedUp(int eventId, int memberId)
+ {
+ return umbraco.cms.businesslogic.relation.Relation.IsRelated(eventId, memberId);
+ }
+
+ public static bool isFull(int eventId)
+ {
+ Event e = new Event(eventId);
+ return e.IsFull;
+ }
+
+ public static void SignUp(int memberId, int eventId)
+ {
+ Event e = new Event(eventId);
+ e.SignUp(memberId, "no comment");
+ }
+
+ public static void Cancel(int memberId, int eventId)
+ {
+ Event e = new Event(eventId);
+ e.Cancel(memberId, "no comment");
+ }
+
+ public static XPathNodeIterator UpcomingEvents()
+ {
+ int contentType = DocumentType.GetByAlias("Event").Id;
+ string property = "start";
+
+ string sql = string.Format(@"SELECT distinct contentNodeId from cmsPropertyData
+ inner join cmsPropertyType ON
+ cmspropertytype.contenttypeid = {0} and
+ cmspropertytype.Alias = '{1}' and
+ cmspropertytype.id = cmspropertydata.propertytypeid
+ where dataDate > GETDATE()", contentType, property);
+
+ ISqlHelper sqlhelper = umbraco.BusinessLogic.Application.SqlHelper;
+ IRecordsReader rr = sqlhelper.ExecuteReader(sql);
+
+ XmlDocument doc = new XmlDocument();
+ XmlNode root = umbraco.xmlHelper.addTextNode(doc, "events", "");
+
+ while (rr.Read())
+ {
+ XmlNode x = (XmlNode)umbraco.content.Instance.XmlContent.GetElementById( rr.GetInt("contentNodeId").ToString() );
+
+ if (x != null)
+ {
+ x = doc.ImportNode(x, true);
+ root.AppendChild(x);
+ }
+ }
+ rr.Close();
+ rr.Dispose();
+
+ return root.CreateNavigator().Select(".");
+ }
+ }
+}
diff --git a/uEvents/Meetup/DateTimeExtensions.cs b/OurUmbraco/Events/Meetup/DateTimeExtensions.cs
similarity index 100%
rename from uEvents/Meetup/DateTimeExtensions.cs
rename to OurUmbraco/Events/Meetup/DateTimeExtensions.cs
diff --git a/uEvents/Meetup/MeetupController.cs b/OurUmbraco/Events/Meetup/MeetupController.cs
similarity index 100%
rename from uEvents/Meetup/MeetupController.cs
rename to OurUmbraco/Events/Meetup/MeetupController.cs
diff --git a/uEvents/Meetup/UnixDateTimeConverter.cs b/OurUmbraco/Events/Meetup/UnixDateTimeConverter.cs
similarity index 100%
rename from uEvents/Meetup/UnixDateTimeConverter.cs
rename to OurUmbraco/Events/Meetup/UnixDateTimeConverter.cs
diff --git a/uEvents/Models/Event.cs b/OurUmbraco/Events/Models/Event.cs
similarity index 100%
rename from uEvents/Models/Event.cs
rename to OurUmbraco/Events/Models/Event.cs
diff --git a/uEvents/Relations/Event.cs b/OurUmbraco/Events/Relations/Event.cs
similarity index 96%
rename from uEvents/Relations/Event.cs
rename to OurUmbraco/Events/Relations/Event.cs
index 6f8f67dc..078771de 100644
--- a/uEvents/Relations/Event.cs
+++ b/OurUmbraco/Events/Relations/Event.cs
@@ -1,120 +1,120 @@
-using umbraco.BusinessLogic;
-using Umbraco.Core.Models;
-using Umbraco.Web;
-using Relation = umbraco.cms.businesslogic.relation.Relation;
-using RelationType = umbraco.cms.businesslogic.relation.RelationType;
-
-namespace uEvents.Relations
-{
- public class Event
- {
- private readonly IPublishedContent _content;
-
- public Event(int eventId)
- {
- var umbracoHelper = new UmbracoHelper(UmbracoContext.Current);
- _content = umbracoHelper.TypedContent(eventId);
- }
-
- public Event(IPublishedContent eventDocument)
- {
- _content = eventDocument;
- }
-
- public bool IsFull {
- get
- {
- return this.SignedUp >= this.Capacity;
- }
- }
-
- public int OnWaitingList
- {
- get
- {
- return Relations.EventRelation.GetWaiting(_content.Id);
- }
- }
-
-
- public int Capacity
- {
- get
- {
- return _content.GetPropertyValue("capacity");
- }
- }
-
-
- public int SignedUp
- {
- get
- {
- return Relations.EventRelation.GetSignedUp(_content.Id);
- }
- }
-
-
- public void Cancel(int memberid, string comment)
- {
- Relations.EventRelation.ClearRelations(memberid, _content.Id);
-
- syncCapacity();
- }
-
-
- public void SignUp(int memberid, string comment)
- {
- if (!IsFull)
- {
- Relations.EventRelation.RelateMemberToEvent(memberid, _content.Id, comment);
- }
- else
- {
- Relations.EventRelation.PutMemberOnWaitingList(memberid, _content.Id, comment);
- }
- }
-
- public void syncCapacity()
- {
- int max = this.Capacity;
- int signedUp = this.SignedUp;
- int waiting = this.OnWaitingList;
-
- //2 scenarios, either the room is now smaller or bigger
- if (max >= signedUp)
- {
- Log.Add(LogTypes.Debug, _content.Id, "bigger cap");
-
- //get people on the waitinglist and promote them to coming to event
- int diff = max - signedUp;
- RelationType coming = RelationType.GetByAlias("event");
- foreach (Relation r in Relations.EventRelation.GetPeopleWaiting(_content.Id, diff))
- {
- Log.Add(LogTypes.Debug, _content.Id, "R:" + r.Id.ToString() );
- r.RelType = coming;
- r.Save();
- }
- }
- else
- {
- Log.Add(LogTypes.Debug, _content.Id, "smaller cap");
-
- //get people on the signedup list and put the people who signed up last on the waiting list.
- //remember to preserve the original sign-up date
- int diff = signedUp - max;
- RelationType waitinglist = RelationType.GetByAlias("waitinglist");
- foreach (Relation r in Relations.EventRelation.GetPeopleSignedUpLast(_content.Id, diff))
- {
- Log.Add(LogTypes.Debug, _content.Id, "R:" + r.Id.ToString());
- r.RelType = waitinglist;
- r.Save();
- }
- }
-
- }
-
- }
-
-
-}
+using umbraco.BusinessLogic;
+using Umbraco.Core.Models;
+using Umbraco.Web;
+using Relation = umbraco.cms.businesslogic.relation.Relation;
+using RelationType = umbraco.cms.businesslogic.relation.RelationType;
+
+namespace uEvents.Relations
+{
+ public class Event
+ {
+ private readonly IPublishedContent _content;
+
+ public Event(int eventId)
+ {
+ var umbracoHelper = new UmbracoHelper(UmbracoContext.Current);
+ _content = umbracoHelper.TypedContent(eventId);
+ }
+
+ public Event(IPublishedContent eventDocument)
+ {
+ _content = eventDocument;
+ }
+
+ public bool IsFull {
+ get
+ {
+ return this.SignedUp >= this.Capacity;
+ }
+ }
+
+ public int OnWaitingList
+ {
+ get
+ {
+ return Relations.EventRelation.GetWaiting(_content.Id);
+ }
+ }
+
+
+ public int Capacity
+ {
+ get
+ {
+ return _content.GetPropertyValue("capacity");
+ }
+ }
+
+
+ public int SignedUp
+ {
+ get
+ {
+ return Relations.EventRelation.GetSignedUp(_content.Id);
+ }
+ }
+
+
+ public void Cancel(int memberid, string comment)
+ {
+ Relations.EventRelation.ClearRelations(memberid, _content.Id);
+
+ syncCapacity();
+ }
+
+
+ public void SignUp(int memberid, string comment)
+ {
+ if (!IsFull)
+ {
+ Relations.EventRelation.RelateMemberToEvent(memberid, _content.Id, comment);
+ }
+ else
+ {
+ Relations.EventRelation.PutMemberOnWaitingList(memberid, _content.Id, comment);
+ }
+ }
+
+ public void syncCapacity()
+ {
+ int max = this.Capacity;
+ int signedUp = this.SignedUp;
+ int waiting = this.OnWaitingList;
+
+ //2 scenarios, either the room is now smaller or bigger
+ if (max >= signedUp)
+ {
+ Log.Add(LogTypes.Debug, _content.Id, "bigger cap");
+
+ //get people on the waitinglist and promote them to coming to event
+ int diff = max - signedUp;
+ RelationType coming = RelationType.GetByAlias("event");
+ foreach (Relation r in Relations.EventRelation.GetPeopleWaiting(_content.Id, diff))
+ {
+ Log.Add(LogTypes.Debug, _content.Id, "R:" + r.Id.ToString() );
+ r.RelType = coming;
+ r.Save();
+ }
+ }
+ else
+ {
+ Log.Add(LogTypes.Debug, _content.Id, "smaller cap");
+
+ //get people on the signedup list and put the people who signed up last on the waiting list.
+ //remember to preserve the original sign-up date
+ int diff = signedUp - max;
+ RelationType waitinglist = RelationType.GetByAlias("waitinglist");
+ foreach (Relation r in Relations.EventRelation.GetPeopleSignedUpLast(_content.Id, diff))
+ {
+ Log.Add(LogTypes.Debug, _content.Id, "R:" + r.Id.ToString());
+ r.RelType = waitinglist;
+ r.Save();
+ }
+ }
+
+ }
+
+ }
+
+
+}
diff --git a/uEvents/Relations/EventRelation.cs b/OurUmbraco/Events/Relations/EventRelation.cs
similarity index 97%
rename from uEvents/Relations/EventRelation.cs
rename to OurUmbraco/Events/Relations/EventRelation.cs
index 89f12c8e..81b3a947 100644
--- a/uEvents/Relations/EventRelation.cs
+++ b/OurUmbraco/Events/Relations/EventRelation.cs
@@ -1,119 +1,119 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using umbraco.cms.businesslogic.relation;
-using umbraco.DataLayer;
-
-namespace uEvents.Relations
-{
- public class EventRelation
- {
- private static string _event = "event";
- private static string _waitinglist = "waitinglist";
-
-
- public static void RelateMemberToEvent(int memberId, int eventId, string comment)
- {
- if (!Relation.IsRelated(eventId, memberId))
- {
- RelationType rt = RelationType.GetByAlias(_event);
- Relation.MakeNew(eventId, memberId, rt, comment);
- }
- }
-
- public static void PutMemberOnWaitingList(int memberId, int eventId, string comment)
- {
- if (!Relation.IsRelated(eventId, memberId))
- {
- RelationType rt = RelationType.GetByAlias(_waitinglist);
- Relation.MakeNew(eventId, memberId, rt, comment);
- }
- }
-
- private static int GetRelations(string alias, int parentId)
- {
-
- ISqlHelper sqlhelper = umbraco.BusinessLogic.Application.SqlHelper;
- int result = sqlhelper.ExecuteScalar(
- @"
- SELECT count(umbracoRelation.id)
- FROM umbracoRelation
- INNER JOIN umbracoRelationType ON umbracoRelationType.id = umbracoRelation.relType AND umbracoRelationType.alias = @alias
- where parentId = @parent
- "
- ,
- sqlhelper.CreateParameter("@parent", parentId),
- sqlhelper.CreateParameter("@alias", alias)
- );
-
- return result;
- }
-
- public static int GetSignedUp(int eventId)
- {
- return GetRelations(_event, eventId);
- }
-
- public static int GetWaiting(int eventId)
- {
- return GetRelations(_waitinglist, eventId);
- }
-
- private static List GetRelations(string alias, string sort, int parentId, int number)
- {
- List retval = new List();
- ISqlHelper sqlhelper = umbraco.BusinessLogic.Application.SqlHelper;
-
- IRecordsReader rr = sqlhelper.ExecuteReader(
-
- string.Format(@"
- SELECT TOP {0} umbracoRelation.id
- FROM umbracoRelation
- INNER JOIN umbracoRelationType ON umbracoRelationType.id = umbracoRelation.relType AND umbracoRelationType.alias = @alias
- where parentId = @parent
- ORDER BY datetime {1}
- ", number, sort)
-
- ,
- sqlhelper.CreateParameter("@parent", parentId),
- sqlhelper.CreateParameter("@alias", alias)
- );
-
- while (rr.Read())
- {
- retval.Add( new Relation( rr.GetInt("id") ) );
- }
- rr.Close();
- rr.Dispose();
-
- return retval;
- }
-
- public static List GetPeopleWaiting(int eventId, int number)
- {
- return GetRelations(_waitinglist, "ASC", eventId, number);
- }
-
- public static List GetPeopleSignedUpLast(int eventId, int number)
- {
- return GetRelations(_event, "DESC", eventId, number);
- }
-
-
- public static void ClearRelations(int memberId, int eventId)
- {
- if (Relation.IsRelated(eventId, memberId))
- {
- foreach (Relation r in Relation.GetRelations(eventId))
- {
- if (r.Child.Id == memberId)
- {
- r.Delete();
- break;
- }
- }
- }
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using umbraco.cms.businesslogic.relation;
+using umbraco.DataLayer;
+
+namespace uEvents.Relations
+{
+ public class EventRelation
+ {
+ private static string _event = "event";
+ private static string _waitinglist = "waitinglist";
+
+
+ public static void RelateMemberToEvent(int memberId, int eventId, string comment)
+ {
+ if (!Relation.IsRelated(eventId, memberId))
+ {
+ RelationType rt = RelationType.GetByAlias(_event);
+ Relation.MakeNew(eventId, memberId, rt, comment);
+ }
+ }
+
+ public static void PutMemberOnWaitingList(int memberId, int eventId, string comment)
+ {
+ if (!Relation.IsRelated(eventId, memberId))
+ {
+ RelationType rt = RelationType.GetByAlias(_waitinglist);
+ Relation.MakeNew(eventId, memberId, rt, comment);
+ }
+ }
+
+ private static int GetRelations(string alias, int parentId)
+ {
+
+ ISqlHelper sqlhelper = umbraco.BusinessLogic.Application.SqlHelper;
+ int result = sqlhelper.ExecuteScalar(
+ @"
+ SELECT count(umbracoRelation.id)
+ FROM umbracoRelation
+ INNER JOIN umbracoRelationType ON umbracoRelationType.id = umbracoRelation.relType AND umbracoRelationType.alias = @alias
+ where parentId = @parent
+ "
+ ,
+ sqlhelper.CreateParameter("@parent", parentId),
+ sqlhelper.CreateParameter("@alias", alias)
+ );
+
+ return result;
+ }
+
+ public static int GetSignedUp(int eventId)
+ {
+ return GetRelations(_event, eventId);
+ }
+
+ public static int GetWaiting(int eventId)
+ {
+ return GetRelations(_waitinglist, eventId);
+ }
+
+ private static List GetRelations(string alias, string sort, int parentId, int number)
+ {
+ List retval = new List();
+ ISqlHelper sqlhelper = umbraco.BusinessLogic.Application.SqlHelper;
+
+ IRecordsReader rr = sqlhelper.ExecuteReader(
+
+ string.Format(@"
+ SELECT TOP {0} umbracoRelation.id
+ FROM umbracoRelation
+ INNER JOIN umbracoRelationType ON umbracoRelationType.id = umbracoRelation.relType AND umbracoRelationType.alias = @alias
+ where parentId = @parent
+ ORDER BY datetime {1}
+ ", number, sort)
+
+ ,
+ sqlhelper.CreateParameter("@parent", parentId),
+ sqlhelper.CreateParameter("@alias", alias)
+ );
+
+ while (rr.Read())
+ {
+ retval.Add( new Relation( rr.GetInt("id") ) );
+ }
+ rr.Close();
+ rr.Dispose();
+
+ return retval;
+ }
+
+ public static List GetPeopleWaiting(int eventId, int number)
+ {
+ return GetRelations(_waitinglist, "ASC", eventId, number);
+ }
+
+ public static List GetPeopleSignedUpLast(int eventId, int number)
+ {
+ return GetRelations(_event, "DESC", eventId, number);
+ }
+
+
+ public static void ClearRelations(int memberId, int eventId)
+ {
+ if (Relation.IsRelated(eventId, memberId))
+ {
+ foreach (Relation r in Relation.GetRelations(eventId))
+ {
+ if (r.Child.Id == memberId)
+ {
+ r.Delete();
+ break;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/uEvents/controls/DateTimePicker.cs b/OurUmbraco/Events/controls/DateTimePicker.cs
similarity index 96%
rename from uEvents/controls/DateTimePicker.cs
rename to OurUmbraco/Events/controls/DateTimePicker.cs
index 18a41b3b..8154bbfe 100644
--- a/uEvents/controls/DateTimePicker.cs
+++ b/OurUmbraco/Events/controls/DateTimePicker.cs
@@ -1,119 +1,119 @@
-using System;
-using System.Data;
-using System.Configuration;
-using System.Linq;
-using System.Web;
-using System.Web.Security;
-using System.Web.UI;
-using System.Web.UI.HtmlControls;
-using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
-using System.Xml.Linq;
-using AjaxControlToolkit;
-using System.Globalization;
-using System.Threading;
-
-namespace uEvents.controls
-{
- [ValidationProperty("SelectedDate")]
- public class DatePicker : System.Web.UI.WebControls.WebControl, System.Web.UI.INamingContainer
- {
- private System.Web.UI.WebControls.TextBox tb;
- private CalendarExtender ca;
-
- private System.Web.UI.WebControls.TextBox hour;
- private System.Web.UI.WebControls.TextBox minute;
- private System.Web.UI.WebControls.Literal colon;
- private System.Web.UI.WebControls.Literal at;
- public DatePicker()
- {
- EnsureChildControls();
- }
-
- protected override void CreateChildControls()
- {
- colon = new Literal();
- colon.ID = "lt_" + this.ID;
- colon.Text = ":";
-
- at = new Literal();
- at.ID = "lt_at_" + this.ID;
- at.Text = "@";
-
- minute = new System.Web.UI.WebControls.TextBox();
- minute.ID = "tb_minute" + this.ID;
- minute.CssClass = "minute";
-
- hour = new System.Web.UI.WebControls.TextBox();
- hour.ID = "tb_hour" + this.ID;
- hour.CssClass = "hour";
-
- tb = new System.Web.UI.WebControls.TextBox();
- tb.ID = "tb" + this.ID;
- tb.CssClass = "calendar";
- //this.Controls.Add(tb);
-
- ca = new CalendarExtender();
- DateTimeFormatInfo di = Thread.CurrentThread.CurrentCulture.DateTimeFormat;
- ca.Format = di.ShortDatePattern;
- ca.TargetControlID = tb.ID;
- ca.ID = "ce" + this.ID;
- //this.Controls.Add(ca);
- }
-
-
-
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
-
- this.Controls.Add(tb);
- this.Controls.Add(hour);
- this.Controls.Add(colon);
- this.Controls.Add(minute);
-
- this.Controls.Add(ca);
- }
-
-
- public DateTime? SelectedDate
- {
- get
- {
- EnsureChildControls();
- DateTime selected;
-
- if (DateTime.TryParse(tb.Text, out selected))
- {
- selected = selected.Subtract(new TimeSpan(int.Parse(hour.Text), int.Parse(minute.Text), 0));
-
- // then add back your assigned hours and minutes
- selected = selected.AddHours(int.Parse(hour.Text)).AddMinutes(int.Parse(minute.Text));
-
- return selected;
- }
-
- return null;
- }
- set
- {
- EnsureChildControls();
- if (value != null)
- {
-
- DateTimeFormatInfo di = Thread.CurrentThread.CurrentCulture.DateTimeFormat;
- tb.Text = ((DateTime)value).ToString(di.ShortDatePattern);
- hour.Text = ((DateTime)value).Hour.ToString();
- minute.Text = ((DateTime)value).Minute.ToString();
-
- ca.SelectedDate = value;
- }
- else
- {
- hour.Text = "12";
- minute.Text = "00";
- }
- }
- }
- }
-}
+using System;
+using System.Data;
+using System.Configuration;
+using System.Linq;
+using System.Web;
+using System.Web.Security;
+using System.Web.UI;
+using System.Web.UI.HtmlControls;
+using System.Web.UI.WebControls;
+using System.Web.UI.WebControls.WebParts;
+using System.Xml.Linq;
+using AjaxControlToolkit;
+using System.Globalization;
+using System.Threading;
+
+namespace uEvents.controls
+{
+ [ValidationProperty("SelectedDate")]
+ public class DatePicker : System.Web.UI.WebControls.WebControl, System.Web.UI.INamingContainer
+ {
+ private System.Web.UI.WebControls.TextBox tb;
+ private CalendarExtender ca;
+
+ private System.Web.UI.WebControls.TextBox hour;
+ private System.Web.UI.WebControls.TextBox minute;
+ private System.Web.UI.WebControls.Literal colon;
+ private System.Web.UI.WebControls.Literal at;
+ public DatePicker()
+ {
+ EnsureChildControls();
+ }
+
+ protected override void CreateChildControls()
+ {
+ colon = new Literal();
+ colon.ID = "lt_" + this.ID;
+ colon.Text = ":";
+
+ at = new Literal();
+ at.ID = "lt_at_" + this.ID;
+ at.Text = "@";
+
+ minute = new System.Web.UI.WebControls.TextBox();
+ minute.ID = "tb_minute" + this.ID;
+ minute.CssClass = "minute";
+
+ hour = new System.Web.UI.WebControls.TextBox();
+ hour.ID = "tb_hour" + this.ID;
+ hour.CssClass = "hour";
+
+ tb = new System.Web.UI.WebControls.TextBox();
+ tb.ID = "tb" + this.ID;
+ tb.CssClass = "calendar";
+ //this.Controls.Add(tb);
+
+ ca = new CalendarExtender();
+ DateTimeFormatInfo di = Thread.CurrentThread.CurrentCulture.DateTimeFormat;
+ ca.Format = di.ShortDatePattern;
+ ca.TargetControlID = tb.ID;
+ ca.ID = "ce" + this.ID;
+ //this.Controls.Add(ca);
+ }
+
+
+
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad(e);
+
+ this.Controls.Add(tb);
+ this.Controls.Add(hour);
+ this.Controls.Add(colon);
+ this.Controls.Add(minute);
+
+ this.Controls.Add(ca);
+ }
+
+
+ public DateTime? SelectedDate
+ {
+ get
+ {
+ EnsureChildControls();
+ DateTime selected;
+
+ if (DateTime.TryParse(tb.Text, out selected))
+ {
+ selected = selected.Subtract(new TimeSpan(int.Parse(hour.Text), int.Parse(minute.Text), 0));
+
+ // then add back your assigned hours and minutes
+ selected = selected.AddHours(int.Parse(hour.Text)).AddMinutes(int.Parse(minute.Text));
+
+ return selected;
+ }
+
+ return null;
+ }
+ set
+ {
+ EnsureChildControls();
+ if (value != null)
+ {
+
+ DateTimeFormatInfo di = Thread.CurrentThread.CurrentCulture.DateTimeFormat;
+ tb.Text = ((DateTime)value).ToString(di.ShortDatePattern);
+ hour.Text = ((DateTime)value).Hour.ToString();
+ minute.Text = ((DateTime)value).Minute.ToString();
+
+ ca.SelectedDate = value;
+ }
+ else
+ {
+ hour.Text = "12";
+ minute.Text = "00";
+ }
+ }
+ }
+ }
+}
diff --git a/OurUmbraco/OurUmbraco.csproj b/OurUmbraco/OurUmbraco.csproj
index 559ad96c..291db996 100644
--- a/OurUmbraco/OurUmbraco.csproj
+++ b/OurUmbraco/OurUmbraco.csproj
@@ -30,6 +30,9 @@
4
+
+ ..\dependencies\Our\AjaxControlToolkit.dll
+
..\packages\AutoMapper.3.0.0\lib\net40\AutoMapper.dll
True
@@ -122,6 +125,10 @@
..\packages\Newtonsoft.Json.6.0.5\lib\net45\Newtonsoft.Json.dll
True
+
+ ..\packages\RestSharp.104.1\lib\net4\RestSharp.dll
+ True
+
..\packages\UmbracoCms.Core.7.2.8-build103\lib\SQLCE4Umbraco.dll
True
@@ -144,6 +151,7 @@
+
..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll
True
@@ -231,6 +239,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/OurUmbraco/packages.config b/OurUmbraco/packages.config
index 9b06ae06..d324eece 100644
--- a/OurUmbraco/packages.config
+++ b/OurUmbraco/packages.config
@@ -22,6 +22,7 @@
+
diff --git a/our.umbraco.org.sln b/our.umbraco.org.sln
index c043259f..0a52bbcb 100644
--- a/our.umbraco.org.sln
+++ b/our.umbraco.org.sln
@@ -17,8 +17,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uPowers", "uPowers\uPowers.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "our.umbraco.org", "our.umbraco.org\our.umbraco.org.csproj", "{A625544F-660A-4C01-BA49-1B467D0322D9}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uEvents", "uEvents\uEvents.csproj", "{F356B339-296A-4594-81B6-CF69A802483E}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Notification", "Notification\Notification.csproj", "{80E5F59D-A7A0-4CEE-AEB6-6C626C44B2B2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotificationsWeb", "NotificationsWeb\NotificationsWeb.csproj", "{6CF53D68-BD81-47BB-8F56-350A1B04F114}"
@@ -86,16 +84,6 @@ Global
{A625544F-660A-4C01-BA49-1B467D0322D9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{A625544F-660A-4C01-BA49-1B467D0322D9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{A625544F-660A-4C01-BA49-1B467D0322D9}.Release|x86.ActiveCfg = Release|Any CPU
- {F356B339-296A-4594-81B6-CF69A802483E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F356B339-296A-4594-81B6-CF69A802483E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F356B339-296A-4594-81B6-CF69A802483E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {F356B339-296A-4594-81B6-CF69A802483E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {F356B339-296A-4594-81B6-CF69A802483E}.Debug|x86.ActiveCfg = Debug|Any CPU
- {F356B339-296A-4594-81B6-CF69A802483E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F356B339-296A-4594-81B6-CF69A802483E}.Release|Any CPU.Build.0 = Release|Any CPU
- {F356B339-296A-4594-81B6-CF69A802483E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {F356B339-296A-4594-81B6-CF69A802483E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {F356B339-296A-4594-81B6-CF69A802483E}.Release|x86.ActiveCfg = Release|Any CPU
{80E5F59D-A7A0-4CEE-AEB6-6C626C44B2B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{80E5F59D-A7A0-4CEE-AEB6-6C626C44B2B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80E5F59D-A7A0-4CEE-AEB6-6C626C44B2B2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
diff --git a/our.umbraco.org/our.umbraco.org.csproj b/our.umbraco.org/our.umbraco.org.csproj
index 92f2ef8e..05d2cf89 100644
--- a/our.umbraco.org/our.umbraco.org.csproj
+++ b/our.umbraco.org/our.umbraco.org.csproj
@@ -422,10 +422,6 @@
{a8e5c936-ecab-45b3-bfda-d12f680eb2a6}
OurUmbraco
-
- {F356B339-296A-4594-81B6-CF69A802483E}
- uEvents
-
{547C2D0D-1B55-493B-AE0B-E031A5B8EE77}
uForum
diff --git a/uEvents/uEvents.csproj b/uEvents/uEvents.csproj
index 4cb00d99..218305dd 100644
--- a/uEvents/uEvents.csproj
+++ b/uEvents/uEvents.csproj
@@ -241,17 +241,7 @@
-
-
-
-
-
-
-
-
-
-