diff --git a/OurUmbraco.Site/OurUmbraco.Site.csproj b/OurUmbraco.Site/OurUmbraco.Site.csproj index 9d260d88..330c34c1 100644 --- a/OurUmbraco.Site/OurUmbraco.Site.csproj +++ b/OurUmbraco.Site/OurUmbraco.Site.csproj @@ -4750,10 +4750,6 @@ {c5b74e6a-abce-4a9a-896d-89c33fdafcd8} uRelease - - {47fd2b14-1653-4052-ad53-1871a8f85e0e} - uRepo - diff --git a/OurUmbraco/OurUmbraco.csproj b/OurUmbraco/OurUmbraco.csproj index b92c7d0a..187943ae 100644 --- a/OurUmbraco/OurUmbraco.csproj +++ b/OurUmbraco/OurUmbraco.csproj @@ -123,6 +123,7 @@ True + ..\packages\UmbracoCms.Core.7.2.8-build103\lib\System.Data.SqlServerCe.dll @@ -138,6 +139,7 @@ + ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll True @@ -158,6 +160,7 @@ ..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll True + ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll True @@ -219,13 +222,50 @@ + + + + + + + repository.asmx + Component + + + + + + + + + + + + + FileUpload.ascx + ASPXCodeBehind + + + FileUpload.ascx.cs + + + + + + ASPXCodeBehind + + + + + + - - - - -

- - -

- - - -

- -

- - - -

- -

- -

- - - - - - - - - - +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FileUpload.ascx.cs" Inherits="uWiki.usercontrols.FileUpload" %> + + + +
+

+Please login or sign up to manage wiki attachments +

+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+Current project files +

+ + + + + + + + + + + + + + + +
FileTypeCompatible VersionUploadedArchiveDelete
+

+
+ + +
+ +
+ Upload file + +
+ +
+ +

+ + +

+
+ +
+ +
+ +
+ + +
+

+ + +

+ + + +

+ +

+ + + +

+ +

+ +

+ +
+
+
+ + + + +
+
\ No newline at end of file diff --git a/uWiki/usercontrols/FileUpload.ascx.cs b/OurUmbraco/Wiki/usercontrols/FileUpload.ascx.cs similarity index 97% rename from uWiki/usercontrols/FileUpload.ascx.cs rename to OurUmbraco/Wiki/usercontrols/FileUpload.ascx.cs index 5a4b8c35..2d01f95e 100644 --- a/uWiki/usercontrols/FileUpload.ascx.cs +++ b/OurUmbraco/Wiki/usercontrols/FileUpload.ascx.cs @@ -1,108 +1,108 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using umbraco.cms.businesslogic.member; -using umbraco.presentation.nodeFactory; -using umbraco.cms.businesslogic.web; - -namespace uWiki.usercontrols { - public partial class FileUpload : System.Web.UI.UserControl { - - public string MemberGuid = ""; - public string VersionGuid = ""; - private int pageId = 0; - - private void RebindFiles() - { - List files = uWiki.Businesslogic.WikiFile.CurrentFiles(pageId); - - rp_files.DataSource = files; - rp_files.Visible = (files.Count > 0); - rp_files.DataBind(); - } - - - protected void DeleteFile(object sender, CommandEventArgs e) - { - uWiki.Businesslogic.WikiFile wf = new uWiki.Businesslogic.WikiFile(int.Parse(e.CommandArgument.ToString())); - //Member mem = Member.GetCurrentMember(); - - //if (wf.CreatedBy == mem.Id) - wf.Delete(); - - RebindFiles(); - } - - protected void OnFileBound(object sender, RepeaterItemEventArgs e) - { - if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) - { - uWiki.Businesslogic.WikiFile wf = (uWiki.Businesslogic.WikiFile)e.Item.DataItem; - - Literal _name = (Literal)e.Item.FindControl("lt_name"); - Literal _date = (Literal)e.Item.FindControl("lt_date"); - Button _delete = (Button)e.Item.FindControl("bt_delete"); - Literal _version = (Literal)e.Item.FindControl("lt_version"); - - _name.Text = "" + wf.Name + ""; - _date.Text = wf.CreateDate.ToShortDateString() + " - " + wf.CreateDate.ToShortTimeString(); - _delete.CommandArgument = wf.Id.ToString(); - - if (wf.Versions != null) - _version.Text = uWiki.Businesslogic.WikiFile.ToVersionString(wf.Versions); - - if (Member.GetCurrentMember().Id == wf.CreatedBy || uWiki.Library.Utils.IsInGroup("admin")) - _delete.Enabled = true; - - - } - } - - protected void Page_Load(object sender, EventArgs e) - { - - - if (umbraco.library.IsLoggedOn()) - { - pageId = umbraco.presentation.nodeFactory.Node.GetCurrent().Id; - - - Member mem = Member.GetCurrentMember(); - Document d = new Document(pageId); - - //if (n.GetProperty("owner") != null && n.GetProperty("owner").Value == mem.Id.ToString()) - //{ - holder.Visible = true; - RebindFiles(); - - umbraco.library.RegisterJavaScriptFile("swfUpload", "/scripts/swfupload/SWFUpload.js"); - umbraco.library.RegisterJavaScriptFile("swfUpload_cb", "/scripts/swfupload/callbacks.js"); - umbraco.library.RegisterJavaScriptFile("swfUpload_progress", "/scripts/swfupload/fileprogress.js"); - - MemberGuid = mem.UniqueId.ToString(); - VersionGuid = d.Version.ToString(); - - string defaultVersion = uWiki.Businesslogic.UmbracoVersion.DefaultVersion().Version; - string options = ""; - - foreach (uWiki.Businesslogic.UmbracoVersion uv in uWiki.Businesslogic.UmbracoVersion.AvailableVersions().Values) - { - string selected = "selected='true'"; - if (uv.Version != defaultVersion) - selected = ""; - options += string.Format("", uv.Version, uv.Name, selected); - } - - lt_versions.Text = options; - //} - } - else - { - notLoggedIn.Visible = true; - } - } - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using umbraco.cms.businesslogic.member; +using umbraco.presentation.nodeFactory; +using umbraco.cms.businesslogic.web; + +namespace uWiki.usercontrols { + public partial class FileUpload : System.Web.UI.UserControl { + + public string MemberGuid = ""; + public string VersionGuid = ""; + private int pageId = 0; + + private void RebindFiles() + { + List files = uWiki.Businesslogic.WikiFile.CurrentFiles(pageId); + + rp_files.DataSource = files; + rp_files.Visible = (files.Count > 0); + rp_files.DataBind(); + } + + + protected void DeleteFile(object sender, CommandEventArgs e) + { + uWiki.Businesslogic.WikiFile wf = new uWiki.Businesslogic.WikiFile(int.Parse(e.CommandArgument.ToString())); + //Member mem = Member.GetCurrentMember(); + + //if (wf.CreatedBy == mem.Id) + wf.Delete(); + + RebindFiles(); + } + + protected void OnFileBound(object sender, RepeaterItemEventArgs e) + { + if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) + { + uWiki.Businesslogic.WikiFile wf = (uWiki.Businesslogic.WikiFile)e.Item.DataItem; + + Literal _name = (Literal)e.Item.FindControl("lt_name"); + Literal _date = (Literal)e.Item.FindControl("lt_date"); + Button _delete = (Button)e.Item.FindControl("bt_delete"); + Literal _version = (Literal)e.Item.FindControl("lt_version"); + + _name.Text = "" + wf.Name + ""; + _date.Text = wf.CreateDate.ToShortDateString() + " - " + wf.CreateDate.ToShortTimeString(); + _delete.CommandArgument = wf.Id.ToString(); + + if (wf.Versions != null) + _version.Text = uWiki.Businesslogic.WikiFile.ToVersionString(wf.Versions); + + if (Member.GetCurrentMember().Id == wf.CreatedBy || uWiki.Library.Utils.IsInGroup("admin")) + _delete.Enabled = true; + + + } + } + + protected void Page_Load(object sender, EventArgs e) + { + + + if (umbraco.library.IsLoggedOn()) + { + pageId = umbraco.presentation.nodeFactory.Node.GetCurrent().Id; + + + Member mem = Member.GetCurrentMember(); + Document d = new Document(pageId); + + //if (n.GetProperty("owner") != null && n.GetProperty("owner").Value == mem.Id.ToString()) + //{ + holder.Visible = true; + RebindFiles(); + + umbraco.library.RegisterJavaScriptFile("swfUpload", "/scripts/swfupload/SWFUpload.js"); + umbraco.library.RegisterJavaScriptFile("swfUpload_cb", "/scripts/swfupload/callbacks.js"); + umbraco.library.RegisterJavaScriptFile("swfUpload_progress", "/scripts/swfupload/fileprogress.js"); + + MemberGuid = mem.UniqueId.ToString(); + VersionGuid = d.Version.ToString(); + + string defaultVersion = uWiki.Businesslogic.UmbracoVersion.DefaultVersion().Version; + string options = ""; + + foreach (uWiki.Businesslogic.UmbracoVersion uv in uWiki.Businesslogic.UmbracoVersion.AvailableVersions().Values) + { + string selected = "selected='true'"; + if (uv.Version != defaultVersion) + selected = ""; + options += string.Format("", uv.Version, uv.Name, selected); + } + + lt_versions.Text = options; + //} + } + else + { + notLoggedIn.Visible = true; + } + } + } } \ No newline at end of file diff --git a/uWiki/usercontrols/FileUpload.ascx.designer.cs b/OurUmbraco/Wiki/usercontrols/FileUpload.ascx.designer.cs similarity index 97% rename from uWiki/usercontrols/FileUpload.ascx.designer.cs rename to OurUmbraco/Wiki/usercontrols/FileUpload.ascx.designer.cs index 1818d471..781b91a5 100644 --- a/uWiki/usercontrols/FileUpload.ascx.designer.cs +++ b/OurUmbraco/Wiki/usercontrols/FileUpload.ascx.designer.cs @@ -1,51 +1,51 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace uWiki.usercontrols { - - - public partial class FileUpload { - - /// - /// notLoggedIn control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl notLoggedIn; - - /// - /// holder control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.PlaceHolder holder; - - /// - /// rp_files control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Repeater rp_files; - - /// - /// lt_versions control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Literal lt_versions; - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace uWiki.usercontrols { + + + public partial class FileUpload { + + /// + /// notLoggedIn control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl notLoggedIn; + + /// + /// holder control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.PlaceHolder holder; + + /// + /// rp_files control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Repeater rp_files; + + /// + /// lt_versions control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal lt_versions; + } +} diff --git a/our.umbraco.org.sln b/our.umbraco.org.sln index 2185dfef..02cd92dd 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}") = "uRepo", "uRepo\uRepo.csproj", "{47FD2B14-1653-4052-AD53-1871A8F85E0E}" -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}" @@ -38,8 +36,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uRelease", "uRelease\uRelea EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uProject", "Marketplace\uProject.csproj", "{6A2B659E-8BAE-4CD5-8764-851DFBE95FBF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uWiki", "uWiki\uWiki.csproj", "{996601FA-5C0E-46A6-B39D-2863BADC80D8}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OurUmbraco", "OurUmbraco\OurUmbraco.csproj", "{A8E5C936-ECAB-45B3-BFDA-D12F680EB2A6}" EndProject Global @@ -92,16 +88,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 - {47FD2B14-1653-4052-AD53-1871A8F85E0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {47FD2B14-1653-4052-AD53-1871A8F85E0E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {47FD2B14-1653-4052-AD53-1871A8F85E0E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {47FD2B14-1653-4052-AD53-1871A8F85E0E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {47FD2B14-1653-4052-AD53-1871A8F85E0E}.Debug|x86.ActiveCfg = Debug|Any CPU - {47FD2B14-1653-4052-AD53-1871A8F85E0E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {47FD2B14-1653-4052-AD53-1871A8F85E0E}.Release|Any CPU.Build.0 = Release|Any CPU - {47FD2B14-1653-4052-AD53-1871A8F85E0E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {47FD2B14-1653-4052-AD53-1871A8F85E0E}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {47FD2B14-1653-4052-AD53-1871A8F85E0E}.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 @@ -162,16 +148,6 @@ Global {6A2B659E-8BAE-4CD5-8764-851DFBE95FBF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {6A2B659E-8BAE-4CD5-8764-851DFBE95FBF}.Release|Mixed Platforms.Build.0 = Release|Any CPU {6A2B659E-8BAE-4CD5-8764-851DFBE95FBF}.Release|x86.ActiveCfg = Release|Any CPU - {996601FA-5C0E-46A6-B39D-2863BADC80D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {996601FA-5C0E-46A6-B39D-2863BADC80D8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {996601FA-5C0E-46A6-B39D-2863BADC80D8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {996601FA-5C0E-46A6-B39D-2863BADC80D8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {996601FA-5C0E-46A6-B39D-2863BADC80D8}.Debug|x86.ActiveCfg = Debug|Any CPU - {996601FA-5C0E-46A6-B39D-2863BADC80D8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {996601FA-5C0E-46A6-B39D-2863BADC80D8}.Release|Any CPU.Build.0 = Release|Any CPU - {996601FA-5C0E-46A6-B39D-2863BADC80D8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {996601FA-5C0E-46A6-B39D-2863BADC80D8}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {996601FA-5C0E-46A6-B39D-2863BADC80D8}.Release|x86.ActiveCfg = Release|Any CPU {A8E5C936-ECAB-45B3-BFDA-D12F680EB2A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A8E5C936-ECAB-45B3-BFDA-D12F680EB2A6}.Debug|Any CPU.Build.0 = Debug|Any CPU {A8E5C936-ECAB-45B3-BFDA-D12F680EB2A6}.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 2bfbc8c5..19f0b955 100644 --- a/our.umbraco.org/our.umbraco.org.csproj +++ b/our.umbraco.org/our.umbraco.org.csproj @@ -418,6 +418,10 @@ {6cf53d68-bd81-47bb-8f56-350a1b04f114} NotificationsWeb + + {a8e5c936-ecab-45b3-bfda-d12f680eb2a6} + OurUmbraco + {2040BDAF-A804-462F-8D5F-CA0DF141BF89} uDocumentation @@ -438,14 +442,6 @@ {c5b74e6a-abce-4a9a-896d-89c33fdafcd8} uRelease - - {47fd2b14-1653-4052-ad53-1871a8f85e0e} - uRepo - - - {996601fa-5c0e-46a6-b39d-2863badc80d8} - uWiki - diff --git a/uRepo/uRepo.csproj b/uRepo/uRepo.csproj index 750efe03..35f4de84 100644 --- a/uRepo/uRepo.csproj +++ b/uRepo/uRepo.csproj @@ -239,23 +239,9 @@ - - - - - - - - - - repository.asmx - Component - - - - + diff --git a/uWiki/uWiki.csproj b/uWiki/uWiki.csproj index 46c9b0c2..f32f8f0c 100644 --- a/uWiki/uWiki.csproj +++ b/uWiki/uWiki.csproj @@ -233,34 +233,9 @@ - - - - - - - - - - - - FileUpload.ascx - ASPXCodeBehind - - - FileUpload.ascx - - - - - - ASPXCodeBehind - - - - +