From b6f1add999e41bfe8162bea8e9b565836f101828 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Wed, 23 Jul 2014 11:51:30 +0000 Subject: [PATCH] Committing some work. Site is broken to fuckall at the moment. --- .../v5/Swarm/ComboPersonObsolete.ascx | 8 - .../v5/Swarm/ComboPersonObsolete.ascx.cs | 141 ---------- .../Controls/v5/Swarm/PersonDetailPopup.ascx | 3 +- .../v5/Swarm/PersonDetailPopup.ascx.cs | 15 +- Site5/Master-v5.master | 144 +--------- Site5/Master-v5.master.cs | 16 +- Site5/OldTelerikMenu.txt | 131 +++++++++ Site5/Pages/v5/Governance/AddMotion.aspx | 70 ----- Site5/Pages/v5/Governance/AddMotion.aspx.cs | 119 -------- .../v5/Governance/AddMotionAmendment.aspx | 70 ----- .../v5/Governance/AddMotionAmendment.aspx.cs | 121 -------- Site5/Pages/v5/Governance/ListMotions.aspx | 68 ----- Site5/Pages/v5/Governance/ListMotions.aspx.cs | 213 -------------- Site5/Pages/v5/Governance/ViewMotion.aspx | 79 ------ Site5/Pages/v5/Governance/ViewMotion.aspx.cs | 95 ------- Site5/Pages/v5/Governance/Vote.aspx | 60 ---- Site5/Pages/v5/Governance/Vote.aspx.cs | 43 --- Site5/Pages/v5/Governance/VoteAmendments.aspx | 70 ----- .../v5/Governance/VoteAmendments.aspx.cs | 262 ------------------ Site5/Pages/v5/Init/Default.aspx | 141 ---------- Site5/Pages/v5/Init/Default.aspx.cs | 80 +----- Site5/Pages/v5/Ledgers/SetRootBudgets.aspx | 5 +- Site5/Pages/v5/Ledgers/SetRootBudgets.aspx.cs | 7 +- Site5/Pages/v5/Ledgers/UploadBankFiles.aspx | 207 +++++++------- .../Pages/v5/Ledgers/UploadBankFiles.aspx.cs | 94 ++++--- 25 files changed, 318 insertions(+), 1944 deletions(-) delete mode 100644 Site5/Controls/v5/Swarm/ComboPersonObsolete.ascx delete mode 100644 Site5/Controls/v5/Swarm/ComboPersonObsolete.ascx.cs create mode 100644 Site5/OldTelerikMenu.txt delete mode 100644 Site5/Pages/v5/Governance/AddMotion.aspx delete mode 100644 Site5/Pages/v5/Governance/AddMotion.aspx.cs delete mode 100644 Site5/Pages/v5/Governance/AddMotionAmendment.aspx delete mode 100644 Site5/Pages/v5/Governance/AddMotionAmendment.aspx.cs delete mode 100644 Site5/Pages/v5/Governance/ListMotions.aspx delete mode 100644 Site5/Pages/v5/Governance/ListMotions.aspx.cs delete mode 100644 Site5/Pages/v5/Governance/ViewMotion.aspx delete mode 100644 Site5/Pages/v5/Governance/ViewMotion.aspx.cs delete mode 100644 Site5/Pages/v5/Governance/Vote.aspx delete mode 100644 Site5/Pages/v5/Governance/Vote.aspx.cs delete mode 100644 Site5/Pages/v5/Governance/VoteAmendments.aspx delete mode 100644 Site5/Pages/v5/Governance/VoteAmendments.aspx.cs diff --git a/Site5/Controls/v5/Swarm/ComboPersonObsolete.ascx b/Site5/Controls/v5/Swarm/ComboPersonObsolete.ascx deleted file mode 100644 index cbc79aa8..00000000 --- a/Site5/Controls/v5/Swarm/ComboPersonObsolete.ascx +++ /dev/null @@ -1,8 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ComboPersonObsolete.ascx.cs" Inherits="Swarmops.Controls.Swarm.ComboPersonObsolete" %> - - - diff --git a/Site5/Controls/v5/Swarm/ComboPersonObsolete.ascx.cs b/Site5/Controls/v5/Swarm/ComboPersonObsolete.ascx.cs deleted file mode 100644 index c9827c2b..00000000 --- a/Site5/Controls/v5/Swarm/ComboPersonObsolete.ascx.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System; -using System.Collections; -using System.Configuration; -using System.Data; -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 Swarmops.Basic.Types; -using Swarmops.Logic.Swarm; -using Swarmops.Logic.Security; -using Swarmops.Logic.Structure; -using Swarmops.Interface; -using Telerik.Web.UI; - -namespace Swarmops.Controls.Swarm -{ - - public partial class ComboPersonObsolete : ControlV5Base - { - protected void Page_Load(object sender, EventArgs e) - { - - } - - private const int initialItemCount = 50; - - protected void ComboControl_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e) - { - People candidates = null; - - if (e.Text.Replace(" ", "").Length >= 4) - { - string pattern = e.Text; - int indexOfParenthesis = pattern.IndexOf('('); - - if (indexOfParenthesis > -1) - { - pattern = pattern.Substring(0, indexOfParenthesis); - } - - candidates = People.FromNamePattern(pattern); - } - - if (candidates == null) - { - candidates = new People(); - } - - candidates = candidates.GetVisiblePeopleByAuthority(_authority); - candidates.Sort(); - - int itemOffset = e.NumberOfItems; - int itemCount = Math.Min(itemOffset + initialItemCount, candidates.Count); - e.EndOfItems = (itemCount == candidates.Count ? true : false); - - for (int i = itemOffset; i < itemCount; i++) - { - string descriptionString = candidates[i].Canonical; - - RadComboBoxItem comboItem = new RadComboBoxItem(descriptionString, candidates[i].Identity.ToString()); - comboItem.ImageUrl = "/Images/Public/Fugue/icons-shadowless/" + - PersonIcon.ForPerson(candidates[i], Organizations.FromSingle(Organization.PPSE)).Image; - - this.ComboControl.Items.Add(comboItem); - } - - e.Message = GetStatusMessage(itemCount, candidates.Count); - } - - private static string GetStatusMessage(int offset, int total) - { - if (total <= 0) - return "No matches"; - - return String.Format("People 1-{0} out of {1}", offset, total); - } - - public string Text - { - get { return this.ComboControl.Text; } - set { this.ComboControl.Text = value; } - } - - public bool HasSelection - { - get { return this.ComboControl.SelectedValue.Trim().Length > 0 ? true : false; } - } - - public Person SelectedPerson - { - get - { - if (HasSelection) - { - return Person.FromIdentity(Int32.Parse(this.ComboControl.SelectedValue)); - } - else - { - return null; - } - } - set - { - if (value == null) - { - this.ComboControl.SelectedIndex = -1; - this.ComboControl.Text = string.Empty; - } - else - { - this.ComboControl.SelectedValue = value.Identity.ToString(); - this.ComboControl.Text = value.Canonical; - } - } - } - - protected void ComboControl_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) - { - if (this.SelectedPersonChanged != null) - { - SelectedPersonChanged(this, new EventArgs()); - } - } - - public int Width - { - set { this.ComboControl.Width = value; } - } - - public bool Enabled - { - set { this.ComboControl.Enabled = value; } - get { return this.ComboControl.Enabled; } - } - - public event EventHandler SelectedPersonChanged; - } -} \ No newline at end of file diff --git a/Site5/Controls/v5/Swarm/PersonDetailPopup.ascx b/Site5/Controls/v5/Swarm/PersonDetailPopup.ascx index 8c65c4c5..15694dc1 100644 --- a/Site5/Controls/v5/Swarm/PersonDetailPopup.ascx +++ b/Site5/Controls/v5/Swarm/PersonDetailPopup.ascx @@ -1,5 +1,4 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeFile="PersonDetailPopup.ascx.cs" Inherits="Swarmops.Controls.Swarm.PersonDetailPopup" %> -<%@ Register Src="~/Controls/v5/Swarm/ComboPersonObsolete.ascx" TagName="ComboPerson" TagPrefix="act5" %> @@ -11,7 +10,7 @@ -

+

diff --git a/Site5/Controls/v5/Swarm/PersonDetailPopup.ascx.cs b/Site5/Controls/v5/Swarm/PersonDetailPopup.ascx.cs index 99ddfbd8..2c2ac9c0 100644 --- a/Site5/Controls/v5/Swarm/PersonDetailPopup.ascx.cs +++ b/Site5/Controls/v5/Swarm/PersonDetailPopup.ascx.cs @@ -12,7 +12,6 @@ using Swarmops.Controls.Swarm; using Swarmops.Logic.Financial; using Swarmops.Logic.Swarm; using Swarmops.Logic.Security; -using Telerik.Web.UI; @@ -32,7 +31,7 @@ namespace Swarmops.Controls.Swarm } this.LabelPersonName.Style[HtmlTextWriterStyle.FontSize] = "20px"; - this.PersonNew.Width = 157; + // this.PersonNew.Width = 157; this.ButtonSetNew.Visible = this.Changeable; @@ -55,7 +54,7 @@ namespace Swarmops.Controls.Swarm { if (_person == null) { - return this.PersonNew.SelectedPerson; + // return this.PersonNew.SelectedPerson; } return _person; @@ -92,7 +91,7 @@ namespace Swarmops.Controls.Swarm { this.PanelRead.Visible = false; this.PanelWrite.Visible = true; - this.PersonNew.Focus(); + // this.PersonNew.Focus(); } public void Reset() @@ -100,7 +99,7 @@ namespace Swarmops.Controls.Swarm this.PanelWrite.Visible = false; this.PanelRead.Visible = true; this.ButtonConfirmPerson.Visible = false; - this.PersonNew.SelectedPerson = null; + // this.PersonNew.SelectedPerson = null; if (ViewState[this.ClientID + "_PersonId"] == null) { @@ -116,13 +115,13 @@ namespace Swarmops.Controls.Swarm protected void PersonNew_SelectedPersonChanged(object sender, EventArgs e) { - this.ImageAvatar.ImageUrl = this.PersonNew.SelectedPerson.GetSecureAvatarLink(96); + // this.ImageAvatar.ImageUrl = this.PersonNew.SelectedPerson.GetSecureAvatarLink(96); this.ButtonConfirmPerson.Visible = true; } protected void ButtonConfirmPerson_Click(object sender, EventArgs e) { - this._person = this.PersonNew.SelectedPerson; + // this._person = this.PersonNew.SelectedPerson; IOwnerSettable settableInterface = this.Cookie as IOwnerSettable; @@ -133,7 +132,7 @@ namespace Swarmops.Controls.Swarm if (PersonChanged != null) { - PersonChanged(this, new PersonChangedEventArgs(this.PersonNew.SelectedPerson, this.Cookie)); + // PersonChanged(this, new PersonChangedEventArgs(this.PersonNew.SelectedPerson, this.Cookie)); } this.LabelPersonName.Text = _person.Name; diff --git a/Site5/Master-v5.master b/Site5/Master-v5.master index 289b7366..0a5eedac 100644 --- a/Site5/Master-v5.master +++ b/Site5/Master-v5.master @@ -21,8 +21,7 @@ Swarmops - - + @@ -114,137 +113,6 @@
-
@@ -304,16 +172,6 @@
- - - -