webdav portal filter + detail view added
This commit is contained in:
parent
280628e362
commit
51d432fd2e
156 changed files with 32494 additions and 260 deletions
|
@ -7,13 +7,11 @@ namespace WebsitePanel.WebDav.Core.Config.Entities
|
|||
{
|
||||
public int DefaultCount { get; private set; }
|
||||
public int AddElementsCount { get; private set; }
|
||||
public List<string> ElementsToIgnore { get; private set; }
|
||||
|
||||
public ElementsRendering()
|
||||
{
|
||||
DefaultCount = ConfigSection.ElementsRendering.DefaultCount;
|
||||
AddElementsCount = ConfigSection.ElementsRendering.AddElementsCount;
|
||||
ElementsToIgnore = ConfigSection.ElementsRendering.ElementsToIgnore.Split(',').ToList();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -12,10 +12,12 @@ namespace WebsitePanel.WebDav.Core.Config.Entities
|
|||
public FileIconsDictionary()
|
||||
{
|
||||
DefaultPath = ConfigSection.FileIcons.DefaultPath;
|
||||
FolderPath = ConfigSection.FileIcons.FolderPath;
|
||||
_fileIcons = ConfigSection.FileIcons.Cast<FileIconsElement>().ToDictionary(x => x.Extension, y => y.Path);
|
||||
}
|
||||
|
||||
public string DefaultPath { get; private set; }
|
||||
public string FolderPath { get; private set; }
|
||||
|
||||
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
|
||||
{
|
||||
|
@ -57,4 +59,4 @@ namespace WebsitePanel.WebDav.Core.Config.Entities
|
|||
get { return _fileIcons.Values; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using WebsitePanel.WebDav.Core.Config.WebConfigSections;
|
||||
using WebsitePanel.WebDavPortal.WebConfigSections;
|
||||
|
||||
namespace WebsitePanel.WebDav.Core.Config.Entities
|
||||
{
|
||||
public class FilesToIgnoreCollection : AbstractConfigCollection, IReadOnlyCollection<FilesToIgnoreElement>
|
||||
{
|
||||
private readonly IList<FilesToIgnoreElement> _filesToIgnore;
|
||||
|
||||
public FilesToIgnoreCollection()
|
||||
{
|
||||
_filesToIgnore = ConfigSection.FilesToIgnore.Cast<FilesToIgnoreElement>().ToList();
|
||||
}
|
||||
|
||||
public IEnumerator<FilesToIgnoreElement> GetEnumerator()
|
||||
{
|
||||
return _filesToIgnore.GetEnumerator();
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
public int Count
|
||||
{
|
||||
get { return _filesToIgnore.Count; }
|
||||
}
|
||||
|
||||
public bool Contains(string name)
|
||||
{
|
||||
return _filesToIgnore.Any(x => x.Name == name);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -13,5 +13,6 @@ namespace WebsitePanel.WebDav.Core.Config
|
|||
HttpErrorsCollection HttpErrors { get; }
|
||||
OfficeOnlineCollection OfficeOnline { get; }
|
||||
OwaSupportedBrowsersCollection OwaSupportedBrowsers { get; }
|
||||
FilesToIgnoreCollection FilesToIgnore { get; }
|
||||
}
|
||||
}
|
|
@ -6,7 +6,6 @@ namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
|||
{
|
||||
private const string DefaultCountKey = "defaultCount";
|
||||
private const string AddElementsCountKey = "addElementsCount";
|
||||
private const string ElementsToIgnoreKey = "elementsToIgnoreKey";
|
||||
|
||||
[ConfigurationProperty(DefaultCountKey, IsKey = true, IsRequired = true, DefaultValue = 30)]
|
||||
public int DefaultCount
|
||||
|
@ -21,12 +20,5 @@ namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
|||
get { return (int)this[AddElementsCountKey]; }
|
||||
set { this[AddElementsCountKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(ElementsToIgnoreKey, IsKey = true, IsRequired = true, DefaultValue = "")]
|
||||
public string ElementsToIgnore
|
||||
{
|
||||
get { return (string)this[ElementsToIgnoreKey]; }
|
||||
set { this[ElementsToIgnoreKey] = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,6 +6,7 @@ namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
|||
public class FileIconsElementCollection : ConfigurationElementCollection
|
||||
{
|
||||
private const string DefaultPathKey = "defaultPath";
|
||||
private const string FolderPathKey = "folderPath";
|
||||
|
||||
[ConfigurationProperty(DefaultPathKey, IsRequired = false, DefaultValue = "/")]
|
||||
public string DefaultPath
|
||||
|
@ -14,6 +15,13 @@ namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
|||
set { this[DefaultPathKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(FolderPathKey, IsRequired = false)]
|
||||
public string FolderPath
|
||||
{
|
||||
get { return (string)this[FolderPathKey]; }
|
||||
set { this[FolderPathKey] = value; }
|
||||
}
|
||||
|
||||
protected override ConfigurationElement CreateNewElement()
|
||||
{
|
||||
return new FileIconsElement();
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
using System.Configuration;
|
||||
|
||||
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
||||
{
|
||||
public class FilesToIgnoreElement : ConfigurationElement
|
||||
{
|
||||
private const string NameKey = "name";
|
||||
private const string RegexKey = "regex";
|
||||
|
||||
[ConfigurationProperty(NameKey, IsKey = true, IsRequired = true)]
|
||||
public string Name
|
||||
{
|
||||
get { return this[NameKey].ToString(); }
|
||||
set { this[NameKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(RegexKey, IsKey = true, IsRequired = true)]
|
||||
public string Regex
|
||||
{
|
||||
get { return this[RegexKey].ToString(); }
|
||||
set { this[RegexKey] = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using System.Configuration;
|
||||
|
||||
namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
|
||||
{
|
||||
[ConfigurationCollection(typeof(FilesToIgnoreElement))]
|
||||
public class FilesToIgnoreElementCollection : ConfigurationElementCollection
|
||||
{
|
||||
protected override ConfigurationElement CreateNewElement()
|
||||
{
|
||||
return new FilesToIgnoreElement();
|
||||
}
|
||||
|
||||
protected override object GetElementKey(ConfigurationElement element)
|
||||
{
|
||||
return ((FilesToIgnoreElement)element).Name;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -17,6 +17,7 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
|
|||
private const string FileIconsKey = "fileIcons";
|
||||
private const string OwaSupportedBrowsersKey = "owaSupportedBrowsers";
|
||||
private const string OfficeOnlineKey = "officeOnline";
|
||||
private const string FilesToIgnoreKey = "filesToIgnore";
|
||||
|
||||
public const string SectionName = "webDavExplorerConfigurationSettings";
|
||||
|
||||
|
@ -89,5 +90,12 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
|
|||
get { return (OfficeOnlineElementCollection)this[OfficeOnlineKey]; }
|
||||
set { this[OfficeOnlineKey] = value; }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(FilesToIgnoreKey, IsDefaultCollection = false)]
|
||||
public FilesToIgnoreElementCollection FilesToIgnore
|
||||
{
|
||||
get { return (FilesToIgnoreElementCollection)this[FilesToIgnoreKey]; }
|
||||
set { this[FilesToIgnoreKey] = value; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -19,6 +19,7 @@ namespace WebsitePanel.WebDav.Core.Config
|
|||
HttpErrors = new HttpErrorsCollection();
|
||||
OfficeOnline = new OfficeOnlineCollection();
|
||||
OwaSupportedBrowsers = new OwaSupportedBrowsersCollection();
|
||||
FilesToIgnore = new FilesToIgnoreCollection();
|
||||
}
|
||||
|
||||
public static WebDavAppConfigManager Instance
|
||||
|
@ -53,5 +54,6 @@ namespace WebsitePanel.WebDav.Core.Config
|
|||
public HttpErrorsCollection HttpErrors { get; private set; }
|
||||
public OfficeOnlineCollection OfficeOnline { get; private set; }
|
||||
public OwaSupportedBrowsersCollection OwaSupportedBrowsers { get; private set; }
|
||||
public FilesToIgnoreCollection FilesToIgnore { get; private set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue