OWA settings added to control panel
This commit is contained in:
parent
9bce727a65
commit
ffed3b1350
9 changed files with 128 additions and 31 deletions
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
|
@ -15,18 +16,23 @@ namespace WebsitePanel.WebDavPortal.FileOperations
|
|||
{
|
||||
public class FileOpenerManager
|
||||
{
|
||||
private readonly IDictionary<string, FileOpenerType> _officeOperationTypes = new Dictionary<string, FileOpenerType>();
|
||||
private readonly IDictionary<string, FileOpenerType> _operationTypes = new Dictionary<string, FileOpenerType>();
|
||||
|
||||
private readonly Lazy<IDictionary<string, FileOpenerType>> _officeOperationTypes = new Lazy<IDictionary<string, FileOpenerType>>(
|
||||
() =>
|
||||
{
|
||||
if (WebDavAppConfigManager.Instance.OfficeOnline.IsEnabled)
|
||||
{
|
||||
return
|
||||
WebDavAppConfigManager.Instance.OfficeOnline.ToDictionary(x => x.Extension,
|
||||
y => FileOpenerType.OfficeOnline);
|
||||
}
|
||||
|
||||
return new Dictionary<string, FileOpenerType>();
|
||||
});
|
||||
|
||||
public FileOpenerManager()
|
||||
{
|
||||
if (WebDavAppConfigManager.Instance.OfficeOnline.IsEnabled)
|
||||
{
|
||||
_officeOperationTypes.AddRange(
|
||||
WebDavAppConfigManager.Instance.OfficeOnline.ToDictionary(x => x.Extension,
|
||||
y => FileOpenerType.OfficeOnline));
|
||||
}
|
||||
|
||||
_operationTypes.AddRange(
|
||||
WebDavAppConfigManager.Instance.FileOpener.ToDictionary(x => x.Extension,
|
||||
y => FileOpenerType.Open));
|
||||
|
@ -94,7 +100,7 @@ namespace WebsitePanel.WebDavPortal.FileOperations
|
|||
get
|
||||
{
|
||||
FileOpenerType result;
|
||||
if (_officeOperationTypes.TryGetValue(fileExtension, out result) && CheckBrowserSupport())
|
||||
if (_officeOperationTypes.Value.TryGetValue(fileExtension, out result) && CheckBrowserSupport())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<add browser="InternetExplorer;IE" version="8" />
|
||||
<add browser="Safari" version="4" />
|
||||
</owaSupportedBrowsers>
|
||||
<officeOnline isEnabled="True" url="https://owa.websitepanel.net" cobaltFileTtl="1" cobaltNewFilePath="~/Content/OwaFiles/New">
|
||||
<officeOnline cobaltFileTtl="1" cobaltNewFilePath="~/Content/OwaFiles/New">
|
||||
<add extension=".doc" OwaView="wv/wordviewerframe.aspx?" OwaEditor="wv/wordviewerframe.aspx?" OwaMobileView="wv/mWord.aspx?wdMobileHost=3&" OwaNewFileView="we/wordeditorframe.aspx?new=1&" />
|
||||
<add extension=".docx" OwaView="wv/wordviewerframe.aspx?" OwaEditor="we/wordeditorframe.aspx?" OwaMobileView="wv/mWord.aspx?wdMobileHost=3&" OwaNewFileView="we/wordeditorframe.aspx?new=1&" />
|
||||
<add extension=".xls" OwaView="x/_layouts/xlviewerinternal.aspx?" OwaEditor="x/_layouts/xlviewerinternal.aspx?edit=1&" OwaMobileView="x/_layouts/mobile/mXL.aspx?wdMobileHost=3&" OwaNewFileView="x/_layouts/xlviewerinternal.aspx?new=1&" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue