diff --git a/WebsitePanel/Database/install_db.sql b/WebsitePanel/Database/install_db.sql index 5ce2c55b..a0f5162d 100644 --- a/WebsitePanel/Database/install_db.sql +++ b/WebsitePanel/Database/install_db.sql @@ -41836,7 +41836,7 @@ INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName] GO INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (65, 4, N'SmarterMail', N'SmarterMail 9.x', N'WebsitePanel.Providers.Mail.SmarterMail9, WebsitePanel.Providers.Mail.SmarterMail9', N'SmarterMail60', NULL) GO -INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (66, 4, N'SmarterMail', N'SmarterMail 10.x +', N'WebsitePanel.Providers.Mail.SmarterMail10, WebsitePanel.Providers.Mail.SmarterMail10', N'SmarterMail60', NULL) +INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (66, 4, N'SmarterMail', N'SmarterMail 10.x +', N'WebsitePanel.Providers.Mail.SmarterMail10, WebsitePanel.Providers.Mail.SmarterMail10', N'SmarterMail100', NULL) GO INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (90, 12, N'Exchange2010SP2', N'Hosted Microsoft Exchange Server 2010 SP2', N'WebsitePanel.Providers.HostedSolution.Exchange2010SP2, WebsitePanel.Providers.HostedSolution', N'Exchange', NULL) GO diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index a2d28ea9..4fd5d931 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -1,4 +1,4 @@ -USE [${install.database}] +USE [${install.database}] GO -- update database version DECLARE @build_version nvarchar(10), @build_date datetime @@ -6042,7 +6042,7 @@ CREATE PROCEDURE [dbo].GetOrganizationRdsUsersCount ) AS SELECT - @TotalNumber = Count([RDSCollectionId]) + @TotalNumber = Count(DISTINCT([AccountId])) FROM [dbo].[RDSCollectionUsers] WHERE [RDSCollectionId] in (SELECT [ID] FROM [RDSCollections] where [ItemId] = @ItemId ) RETURN @@ -8192,6 +8192,22 @@ AS INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID WHERE pt.ParentPackageID = @PackageID AND ea.AccountType = 11) + ELSE IF @QuotaID = 450 + SET @Result = (SELECT COUNT(DISTINCT(RCU.[AccountId])) FROM [dbo].[RDSCollectionUsers] RCU + INNER JOIN ExchangeAccounts EA ON EA.AccountId = RCU.AccountId + INNER JOIN ServiceItems si ON ea.ItemID = si.ItemID + INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID + WHERE PT.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 451 + SET @Result = (SELECT COUNT(RS.[ID]) FROM [dbo].[RDSServers] RS + INNER JOIN ServiceItems si ON RS.ItemID = si.ItemID + INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID + WHERE PT.ParentPackageID = @PackageID) + ELSE IF @QuotaID = 491 + SET @Result = (SELECT COUNT(RC.[ID]) FROM [dbo].[RDSCollections] RC + INNER JOIN ServiceItems si ON RC.ItemID = si.ItemID + INNER JOIN PackagesTreeCache pt ON si.PackageID = pt.PackageID + WHERE PT.ParentPackageID = @PackageID) ELSE IF @QuotaName like 'ServiceLevel.%' -- Support Service Level Quota BEGIN DECLARE @LevelID int @@ -8605,6 +8621,138 @@ WHERE RETURN GO + + +--Webdav portal users settings + +IF NOT EXISTS (SELECT * FROM SYS.TABLES WHERE name = 'WebDavPortalUsersSettings') +CREATE TABLE WebDavPortalUsersSettings +( + ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY, + AccountId INT NOT NULL, + Settings NVARCHAR(max) +) +GO + +IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_NAME ='FK_WebDavPortalUsersSettings_UserId') +ALTER TABLE [dbo].[WebDavPortalUsersSettings] +DROP CONSTRAINT [FK_WebDavPortalUsersSettings_UserId] +GO + +ALTER TABLE [dbo].[WebDavPortalUsersSettings] WITH CHECK ADD CONSTRAINT [FK_WebDavPortalUsersSettings_UserId] FOREIGN KEY([AccountID]) +REFERENCES [dbo].[ExchangeAccounts] ([AccountID]) +ON DELETE CASCADE +GO + + + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetWebDavPortalUsersSettingsByAccountId') +DROP PROCEDURE GetWebDavPortalUsersSettingsByAccountId +GO +CREATE PROCEDURE [dbo].[GetWebDavPortalUsersSettingsByAccountId] +( + @AccountId INT +) +AS +SELECT TOP 1 + US.Id, + US.AccountId, + US.Settings + FROM WebDavPortalUsersSettings AS US + WHERE AccountId = @AccountId +GO + + + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'AddWebDavPortalUsersSettings') +DROP PROCEDURE AddWebDavPortalUsersSettings +GO +CREATE PROCEDURE [dbo].[AddWebDavPortalUsersSettings] +( + @WebDavPortalUsersSettingsId INT OUTPUT, + @AccountId INT, + @Settings NVARCHAR(max) +) +AS + +INSERT INTO WebDavPortalUsersSettings +( + AccountId, + Settings +) +VALUES +( + @AccountId, + @Settings +) + +SET @WebDavPortalUsersSettingsId = SCOPE_IDENTITY() + +RETURN +GO + + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'UpdateWebDavPortalUsersSettings') +DROP PROCEDURE UpdateWebDavPortalUsersSettings +GO +CREATE PROCEDURE [dbo].[UpdateWebDavPortalUsersSettings] +( + @AccountId INT, + @Settings NVARCHAR(max) +) +AS + +UPDATE WebDavPortalUsersSettings +SET + Settings = @Settings +WHERE AccountId = @AccountId +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [DisplayName] = 'SmarterMail 10.x +') +BEGIN +INSERT [dbo].[Providers] ([ProviderId], [GroupId], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES(66, 4, N'SmarterMail', N'SmarterMail 10.x +', N'WebsitePanel.Providers.Mail.SmarterMail10, WebsitePanel.Providers.Mail.SmarterMail10', N'SmarterMail100', NULL) +END +ELSE +BEGIN +UPDATE [dbo].[Providers] SET [EditorControl] = 'SmarterMail100' WHERE [DisplayName] = 'SmarterMail 10.x +' +END +GO + + +-- Service items count by name and serviceid + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetServiceItemsCountByNameAndServiceId') +DROP PROCEDURE GetServiceItemsCountByNameAndServiceId +GO + +CREATE PROCEDURE [dbo].[GetServiceItemsCountByNameAndServiceId] +( + @ActorID int, + @ServiceId int, + @ItemName nvarchar(500), + @GroupName nvarchar(100) = NULL, + @ItemTypeName nvarchar(200) +) +AS +SELECT Count(*) +FROM ServiceItems AS SI +INNER JOIN ServiceItemTypes AS SIT ON SI.ItemTypeID = SIT.ItemTypeID +INNER JOIN ResourceGroups AS RG ON SIT.GroupID = RG.GroupID +INNER JOIN Services AS S ON SI.ServiceID = S.ServiceID +WHERE S.ServiceID = @ServiceId +AND SIT.TypeName = @ItemTypeName +AND SI.ItemName = @ItemName +AND ((@GroupName IS NULL) OR (@GroupName IS NOT NULL AND RG.GroupName = @GroupName)) +RETURN +GO + +-- Hyper-V 2012 R2 +IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [ProviderName] = 'HyperV2012R2') +BEGIN +INSERT [dbo].[Providers] ([ProviderID], [GroupID], [ProviderName], [DisplayName], [ProviderType], [EditorControl], [DisableAutoDiscovery]) VALUES (350, 30, N'HyperV2012R2', N'Microsoft Hyper-V 2012 R2', N'WebsitePanel.Providers.Virtualization.HyperV2012R2, WebsitePanel.Providers.Virtualization.HyperV2012R2', N'HyperV', 1) +END +GO + -- Hyper-V 2012 R2 IF NOT EXISTS (SELECT * FROM [dbo].[Providers] WHERE [ProviderName] = 'HyperV2012R2') BEGIN diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/BusinessErrorCodes.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/BusinessErrorCodes.cs index 8e8ed5ff..dc4f432d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/BusinessErrorCodes.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Common/BusinessErrorCodes.cs @@ -151,6 +151,7 @@ namespace WebsitePanel.EnterpriseServer public const int ERROR_MAIL_LICENSE_USERS_QUOTA = -724; public const int ERROR_MAIL_ACCOUNT_MAX_MAILBOX_SIZE_LIMIT = -725; + public const int ERROR_MAIL_ACCOUNT_PASSWORD_NOT_COMPLEXITY = -726; #endregion #region FTP diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/EnterpriseStorageProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/EnterpriseStorageProxy.cs index 7300cf58..87682b0f 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/EnterpriseStorageProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/EnterpriseStorageProxy.cs @@ -69,6 +69,12 @@ namespace WebsitePanel.EnterpriseServer { private System.Threading.SendOrPostCallback CheckUsersDomainExistsOperationCompleted; + private System.Threading.SendOrPostCallback GetWebDavPortalUserSettingsByAccountIdOperationCompleted; + + private System.Threading.SendOrPostCallback UpdateWebDavPortalUserSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback SearchFilesOperationCompleted; + private System.Threading.SendOrPostCallback GetDirectoryBrowseEnabledOperationCompleted; private System.Threading.SendOrPostCallback SetDirectoryBrowseEnabledOperationCompleted; @@ -145,6 +151,15 @@ namespace WebsitePanel.EnterpriseServer { /// public event CheckUsersDomainExistsCompletedEventHandler CheckUsersDomainExistsCompleted; + /// + public event GetWebDavPortalUserSettingsByAccountIdCompletedEventHandler GetWebDavPortalUserSettingsByAccountIdCompleted; + + /// + public event UpdateWebDavPortalUserSettingsCompletedEventHandler UpdateWebDavPortalUserSettingsCompleted; + + /// + public event SearchFilesCompletedEventHandler SearchFilesCompleted; + /// public event GetDirectoryBrowseEnabledCompletedEventHandler GetDirectoryBrowseEnabledCompleted; @@ -928,6 +943,143 @@ namespace WebsitePanel.EnterpriseServer { } } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetWebDavPortalUserSettingsByAccount" + + "Id", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string GetWebDavPortalUserSettingsByAccountId(int accountId) { + object[] results = this.Invoke("GetWebDavPortalUserSettingsByAccountId", new object[] { + accountId}); + return ((string)(results[0])); + } + + /// + public System.IAsyncResult BeginGetWebDavPortalUserSettingsByAccountId(int accountId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetWebDavPortalUserSettingsByAccountId", new object[] { + accountId}, callback, asyncState); + } + + /// + public string EndGetWebDavPortalUserSettingsByAccountId(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((string)(results[0])); + } + + /// + public void GetWebDavPortalUserSettingsByAccountIdAsync(int accountId) { + this.GetWebDavPortalUserSettingsByAccountIdAsync(accountId, null); + } + + /// + public void GetWebDavPortalUserSettingsByAccountIdAsync(int accountId, object userState) { + if ((this.GetWebDavPortalUserSettingsByAccountIdOperationCompleted == null)) { + this.GetWebDavPortalUserSettingsByAccountIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetWebDavPortalUserSettingsByAccountIdOperationCompleted); + } + this.InvokeAsync("GetWebDavPortalUserSettingsByAccountId", new object[] { + accountId}, this.GetWebDavPortalUserSettingsByAccountIdOperationCompleted, userState); + } + + private void OnGetWebDavPortalUserSettingsByAccountIdOperationCompleted(object arg) { + if ((this.GetWebDavPortalUserSettingsByAccountIdCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetWebDavPortalUserSettingsByAccountIdCompleted(this, new GetWebDavPortalUserSettingsByAccountIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateWebDavPortalUserSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void UpdateWebDavPortalUserSettings(int accountId, string settings) { + this.Invoke("UpdateWebDavPortalUserSettings", new object[] { + accountId, + settings}); + } + + /// + public System.IAsyncResult BeginUpdateWebDavPortalUserSettings(int accountId, string settings, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("UpdateWebDavPortalUserSettings", new object[] { + accountId, + settings}, callback, asyncState); + } + + /// + public void EndUpdateWebDavPortalUserSettings(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void UpdateWebDavPortalUserSettingsAsync(int accountId, string settings) { + this.UpdateWebDavPortalUserSettingsAsync(accountId, settings, null); + } + + /// + public void UpdateWebDavPortalUserSettingsAsync(int accountId, string settings, object userState) { + if ((this.UpdateWebDavPortalUserSettingsOperationCompleted == null)) { + this.UpdateWebDavPortalUserSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateWebDavPortalUserSettingsOperationCompleted); + } + this.InvokeAsync("UpdateWebDavPortalUserSettings", new object[] { + accountId, + settings}, this.UpdateWebDavPortalUserSettingsOperationCompleted, userState); + } + + private void OnUpdateWebDavPortalUserSettingsOperationCompleted(object arg) { + if ((this.UpdateWebDavPortalUserSettingsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.UpdateWebDavPortalUserSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SearchFiles", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SystemFile[] SearchFiles(int itemId, string[] searchPaths, string searchText, string userPrincipalName, bool recursive) { + object[] results = this.Invoke("SearchFiles", new object[] { + itemId, + searchPaths, + searchText, + userPrincipalName, + recursive}); + return ((SystemFile[])(results[0])); + } + + /// + public System.IAsyncResult BeginSearchFiles(int itemId, string[] searchPaths, string searchText, string userPrincipalName, bool recursive, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SearchFiles", new object[] { + itemId, + searchPaths, + searchText, + userPrincipalName, + recursive}, callback, asyncState); + } + + /// + public SystemFile[] EndSearchFiles(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((SystemFile[])(results[0])); + } + + /// + public void SearchFilesAsync(int itemId, string[] searchPaths, string searchText, string userPrincipalName, bool recursive) { + this.SearchFilesAsync(itemId, searchPaths, searchText, userPrincipalName, recursive, null); + } + + /// + public void SearchFilesAsync(int itemId, string[] searchPaths, string searchText, string userPrincipalName, bool recursive, object userState) { + if ((this.SearchFilesOperationCompleted == null)) { + this.SearchFilesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchFilesOperationCompleted); + } + this.InvokeAsync("SearchFiles", new object[] { + itemId, + searchPaths, + searchText, + userPrincipalName, + recursive}, this.SearchFilesOperationCompleted, userState); + } + + private void OnSearchFilesOperationCompleted(object arg) { + if ((this.SearchFilesCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SearchFilesCompleted(this, new SearchFilesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetDirectoryBrowseEnabled", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public bool GetDirectoryBrowseEnabled(int itemId, string site) { @@ -1811,6 +1963,62 @@ namespace WebsitePanel.EnterpriseServer { } } + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void GetWebDavPortalUserSettingsByAccountIdCompletedEventHandler(object sender, GetWebDavPortalUserSettingsByAccountIdCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetWebDavPortalUserSettingsByAccountIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetWebDavPortalUserSettingsByAccountIdCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void UpdateWebDavPortalUserSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void SearchFilesCompletedEventHandler(object sender, SearchFilesCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SearchFilesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal SearchFilesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public SystemFile[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((SystemFile[])(this.results[0])); + } + } + } + /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetDirectoryBrowseEnabledCompletedEventHandler(object sender, GetDirectoryBrowseEnabledCompletedEventArgs e); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs index bf847f10..3214d80d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs @@ -106,6 +106,20 @@ namespace WebsitePanel.EnterpriseServer { private System.Threading.SendOrPostCallback GetRdsCollectionSessionHostsOperationCompleted; + private System.Threading.SendOrPostCallback GetRdsServerInfoOperationCompleted; + + private System.Threading.SendOrPostCallback GetRdsServerStatusOperationCompleted; + + private System.Threading.SendOrPostCallback ShutDownRdsServerOperationCompleted; + + private System.Threading.SendOrPostCallback RestartRdsServerOperationCompleted; + + private System.Threading.SendOrPostCallback GetRdsCollectionLocalAdminsOperationCompleted; + + private System.Threading.SendOrPostCallback SaveRdsCollectionLocalAdminsOperationCompleted; + + private System.Threading.SendOrPostCallback InstallSessionHostsCertificateOperationCompleted; + /// public esRemoteDesktopServices() { this.Url = "http://localhost:9002/esRemoteDesktopServices.asmx"; @@ -225,6 +239,27 @@ namespace WebsitePanel.EnterpriseServer { /// public event GetRdsCollectionSessionHostsCompletedEventHandler GetRdsCollectionSessionHostsCompleted; + /// + public event GetRdsServerInfoCompletedEventHandler GetRdsServerInfoCompleted; + + /// + public event GetRdsServerStatusCompletedEventHandler GetRdsServerStatusCompleted; + + /// + public event ShutDownRdsServerCompletedEventHandler ShutDownRdsServerCompleted; + + /// + public event RestartRdsServerCompletedEventHandler RestartRdsServerCompleted; + + /// + public event GetRdsCollectionLocalAdminsCompletedEventHandler GetRdsCollectionLocalAdminsCompleted; + + /// + public event SaveRdsCollectionLocalAdminsCompletedEventHandler SaveRdsCollectionLocalAdminsCompleted; + + /// + public event InstallSessionHostsCertificateCompletedEventHandler InstallSessionHostsCertificateCompleted; + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public RdsCollection GetRdsCollection(int collectionId) { @@ -1196,15 +1231,17 @@ namespace WebsitePanel.EnterpriseServer { /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/RemoveRdsServerFromOrganization", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ResultObject RemoveRdsServerFromOrganization(int rdsServerId) { + public ResultObject RemoveRdsServerFromOrganization(int itemId, int rdsServerId) { object[] results = this.Invoke("RemoveRdsServerFromOrganization", new object[] { + itemId, rdsServerId}); return ((ResultObject)(results[0])); } /// - public System.IAsyncResult BeginRemoveRdsServerFromOrganization(int rdsServerId, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginRemoveRdsServerFromOrganization(int itemId, int rdsServerId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("RemoveRdsServerFromOrganization", new object[] { + itemId, rdsServerId}, callback, asyncState); } @@ -1215,16 +1252,17 @@ namespace WebsitePanel.EnterpriseServer { } /// - public void RemoveRdsServerFromOrganizationAsync(int rdsServerId) { - this.RemoveRdsServerFromOrganizationAsync(rdsServerId, null); + public void RemoveRdsServerFromOrganizationAsync(int itemId, int rdsServerId) { + this.RemoveRdsServerFromOrganizationAsync(itemId, rdsServerId, null); } /// - public void RemoveRdsServerFromOrganizationAsync(int rdsServerId, object userState) { + public void RemoveRdsServerFromOrganizationAsync(int itemId, int rdsServerId, object userState) { if ((this.RemoveRdsServerFromOrganizationOperationCompleted == null)) { this.RemoveRdsServerFromOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveRdsServerFromOrganizationOperationCompleted); } this.InvokeAsync("RemoveRdsServerFromOrganization", new object[] { + itemId, rdsServerId}, this.RemoveRdsServerFromOrganizationOperationCompleted, userState); } @@ -1944,6 +1982,314 @@ namespace WebsitePanel.EnterpriseServer { } } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsServerInfo", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public RdsServerInfo GetRdsServerInfo(int itemId, string fqdnName) { + object[] results = this.Invoke("GetRdsServerInfo", new object[] { + itemId, + fqdnName}); + return ((RdsServerInfo)(results[0])); + } + + /// + public System.IAsyncResult BeginGetRdsServerInfo(int itemId, string fqdnName, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetRdsServerInfo", new object[] { + itemId, + fqdnName}, callback, asyncState); + } + + /// + public RdsServerInfo EndGetRdsServerInfo(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((RdsServerInfo)(results[0])); + } + + /// + public void GetRdsServerInfoAsync(int itemId, string fqdnName) { + this.GetRdsServerInfoAsync(itemId, fqdnName, null); + } + + /// + public void GetRdsServerInfoAsync(int itemId, string fqdnName, object userState) { + if ((this.GetRdsServerInfoOperationCompleted == null)) { + this.GetRdsServerInfoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsServerInfoOperationCompleted); + } + this.InvokeAsync("GetRdsServerInfo", new object[] { + itemId, + fqdnName}, this.GetRdsServerInfoOperationCompleted, userState); + } + + private void OnGetRdsServerInfoOperationCompleted(object arg) { + if ((this.GetRdsServerInfoCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetRdsServerInfoCompleted(this, new GetRdsServerInfoCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsServerStatus", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string GetRdsServerStatus(int itemId, string fqdnName) { + object[] results = this.Invoke("GetRdsServerStatus", new object[] { + itemId, + fqdnName}); + return ((string)(results[0])); + } + + /// + public System.IAsyncResult BeginGetRdsServerStatus(int itemId, string fqdnName, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetRdsServerStatus", new object[] { + itemId, + fqdnName}, callback, asyncState); + } + + /// + public string EndGetRdsServerStatus(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((string)(results[0])); + } + + /// + public void GetRdsServerStatusAsync(int itemId, string fqdnName) { + this.GetRdsServerStatusAsync(itemId, fqdnName, null); + } + + /// + public void GetRdsServerStatusAsync(int itemId, string fqdnName, object userState) { + if ((this.GetRdsServerStatusOperationCompleted == null)) { + this.GetRdsServerStatusOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsServerStatusOperationCompleted); + } + this.InvokeAsync("GetRdsServerStatus", new object[] { + itemId, + fqdnName}, this.GetRdsServerStatusOperationCompleted, userState); + } + + private void OnGetRdsServerStatusOperationCompleted(object arg) { + if ((this.GetRdsServerStatusCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetRdsServerStatusCompleted(this, new GetRdsServerStatusCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/ShutDownRdsServer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject ShutDownRdsServer(int itemId, string fqdnName) { + object[] results = this.Invoke("ShutDownRdsServer", new object[] { + itemId, + fqdnName}); + return ((ResultObject)(results[0])); + } + + /// + public System.IAsyncResult BeginShutDownRdsServer(int itemId, string fqdnName, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("ShutDownRdsServer", new object[] { + itemId, + fqdnName}, callback, asyncState); + } + + /// + public ResultObject EndShutDownRdsServer(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((ResultObject)(results[0])); + } + + /// + public void ShutDownRdsServerAsync(int itemId, string fqdnName) { + this.ShutDownRdsServerAsync(itemId, fqdnName, null); + } + + /// + public void ShutDownRdsServerAsync(int itemId, string fqdnName, object userState) { + if ((this.ShutDownRdsServerOperationCompleted == null)) { + this.ShutDownRdsServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnShutDownRdsServerOperationCompleted); + } + this.InvokeAsync("ShutDownRdsServer", new object[] { + itemId, + fqdnName}, this.ShutDownRdsServerOperationCompleted, userState); + } + + private void OnShutDownRdsServerOperationCompleted(object arg) { + if ((this.ShutDownRdsServerCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.ShutDownRdsServerCompleted(this, new ShutDownRdsServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/RestartRdsServer", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject RestartRdsServer(int itemId, string fqdnName) { + object[] results = this.Invoke("RestartRdsServer", new object[] { + itemId, + fqdnName}); + return ((ResultObject)(results[0])); + } + + /// + public System.IAsyncResult BeginRestartRdsServer(int itemId, string fqdnName, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("RestartRdsServer", new object[] { + itemId, + fqdnName}, callback, asyncState); + } + + /// + public ResultObject EndRestartRdsServer(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((ResultObject)(results[0])); + } + + /// + public void RestartRdsServerAsync(int itemId, string fqdnName) { + this.RestartRdsServerAsync(itemId, fqdnName, null); + } + + /// + public void RestartRdsServerAsync(int itemId, string fqdnName, object userState) { + if ((this.RestartRdsServerOperationCompleted == null)) { + this.RestartRdsServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRestartRdsServerOperationCompleted); + } + this.InvokeAsync("RestartRdsServer", new object[] { + itemId, + fqdnName}, this.RestartRdsServerOperationCompleted, userState); + } + + private void OnRestartRdsServerOperationCompleted(object arg) { + if ((this.RestartRdsServerCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.RestartRdsServerCompleted(this, new RestartRdsServerCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollectionLocalAdmins", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public OrganizationUser[] GetRdsCollectionLocalAdmins(int collectionId) { + object[] results = this.Invoke("GetRdsCollectionLocalAdmins", new object[] { + collectionId}); + return ((OrganizationUser[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetRdsCollectionLocalAdmins(int collectionId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetRdsCollectionLocalAdmins", new object[] { + collectionId}, callback, asyncState); + } + + /// + public OrganizationUser[] EndGetRdsCollectionLocalAdmins(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((OrganizationUser[])(results[0])); + } + + /// + public void GetRdsCollectionLocalAdminsAsync(int collectionId) { + this.GetRdsCollectionLocalAdminsAsync(collectionId, null); + } + + /// + public void GetRdsCollectionLocalAdminsAsync(int collectionId, object userState) { + if ((this.GetRdsCollectionLocalAdminsOperationCompleted == null)) { + this.GetRdsCollectionLocalAdminsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsCollectionLocalAdminsOperationCompleted); + } + this.InvokeAsync("GetRdsCollectionLocalAdmins", new object[] { + collectionId}, this.GetRdsCollectionLocalAdminsOperationCompleted, userState); + } + + private void OnGetRdsCollectionLocalAdminsOperationCompleted(object arg) { + if ((this.GetRdsCollectionLocalAdminsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetRdsCollectionLocalAdminsCompleted(this, new GetRdsCollectionLocalAdminsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/SaveRdsCollectionLocalAdmins", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject SaveRdsCollectionLocalAdmins(OrganizationUser[] users, int collectionId) { + object[] results = this.Invoke("SaveRdsCollectionLocalAdmins", new object[] { + users, + collectionId}); + return ((ResultObject)(results[0])); + } + + /// + public System.IAsyncResult BeginSaveRdsCollectionLocalAdmins(OrganizationUser[] users, int collectionId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SaveRdsCollectionLocalAdmins", new object[] { + users, + collectionId}, callback, asyncState); + } + + /// + public ResultObject EndSaveRdsCollectionLocalAdmins(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((ResultObject)(results[0])); + } + + /// + public void SaveRdsCollectionLocalAdminsAsync(OrganizationUser[] users, int collectionId) { + this.SaveRdsCollectionLocalAdminsAsync(users, collectionId, null); + } + + /// + public void SaveRdsCollectionLocalAdminsAsync(OrganizationUser[] users, int collectionId, object userState) { + if ((this.SaveRdsCollectionLocalAdminsOperationCompleted == null)) { + this.SaveRdsCollectionLocalAdminsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSaveRdsCollectionLocalAdminsOperationCompleted); + } + this.InvokeAsync("SaveRdsCollectionLocalAdmins", new object[] { + users, + collectionId}, this.SaveRdsCollectionLocalAdminsOperationCompleted, userState); + } + + private void OnSaveRdsCollectionLocalAdminsOperationCompleted(object arg) { + if ((this.SaveRdsCollectionLocalAdminsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SaveRdsCollectionLocalAdminsCompleted(this, new SaveRdsCollectionLocalAdminsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/InstallSessionHostsCertificate", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ResultObject InstallSessionHostsCertificate(int collectionId, [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] byte[] certificate, string password) { + object[] results = this.Invoke("InstallSessionHostsCertificate", new object[] { + collectionId, + certificate, + password}); + return ((ResultObject)(results[0])); + } + + /// + public System.IAsyncResult BeginInstallSessionHostsCertificate(int collectionId, byte[] certificate, string password, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("InstallSessionHostsCertificate", new object[] { + collectionId, + certificate, + password}, callback, asyncState); + } + + /// + public ResultObject EndInstallSessionHostsCertificate(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((ResultObject)(results[0])); + } + + /// + public void InstallSessionHostsCertificateAsync(int collectionId, byte[] certificate, string password) { + this.InstallSessionHostsCertificateAsync(collectionId, certificate, password, null); + } + + /// + public void InstallSessionHostsCertificateAsync(int collectionId, byte[] certificate, string password, object userState) { + if ((this.InstallSessionHostsCertificateOperationCompleted == null)) { + this.InstallSessionHostsCertificateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInstallSessionHostsCertificateOperationCompleted); + } + this.InvokeAsync("InstallSessionHostsCertificate", new object[] { + collectionId, + certificate, + password}, this.InstallSessionHostsCertificateOperationCompleted, userState); + } + + private void OnInstallSessionHostsCertificateOperationCompleted(object arg) { + if ((this.InstallSessionHostsCertificateCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.InstallSessionHostsCertificateCompleted(this, new InstallSessionHostsCertificateCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// public new void CancelAsync(object userState) { base.CancelAsync(userState); @@ -2937,4 +3283,186 @@ namespace WebsitePanel.EnterpriseServer { } } } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void GetRdsServerInfoCompletedEventHandler(object sender, GetRdsServerInfoCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetRdsServerInfoCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetRdsServerInfoCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public RdsServerInfo Result { + get { + this.RaiseExceptionIfNecessary(); + return ((RdsServerInfo)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void GetRdsServerStatusCompletedEventHandler(object sender, GetRdsServerStatusCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetRdsServerStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetRdsServerStatusCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void ShutDownRdsServerCompletedEventHandler(object sender, ShutDownRdsServerCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ShutDownRdsServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal ShutDownRdsServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ResultObject Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ResultObject)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void RestartRdsServerCompletedEventHandler(object sender, RestartRdsServerCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class RestartRdsServerCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal RestartRdsServerCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ResultObject Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ResultObject)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void GetRdsCollectionLocalAdminsCompletedEventHandler(object sender, GetRdsCollectionLocalAdminsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetRdsCollectionLocalAdminsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetRdsCollectionLocalAdminsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public OrganizationUser[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((OrganizationUser[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void SaveRdsCollectionLocalAdminsCompletedEventHandler(object sender, SaveRdsCollectionLocalAdminsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SaveRdsCollectionLocalAdminsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal SaveRdsCollectionLocalAdminsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ResultObject Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ResultObject)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void InstallSessionHostsCertificateCompletedEventHandler(object sender, InstallSessionHostsCertificateCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class InstallSessionHostsCertificateCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal InstallSessionHostsCertificateCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ResultObject Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ResultObject)(this.results[0])); + } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs index 1ef34bd0..1d903a9c 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs @@ -1197,6 +1197,24 @@ namespace WebsitePanel.EnterpriseServer new SqlParameter("@itemName", itemName)); } + public static int GetServiceItemsCountByNameAndServiceId(int actorId, int serviceId, string groupName, + string itemName, string itemTypeName) + { + int res = 0; + + object obj = SqlHelper.ExecuteScalar(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetServiceItemsCountByNameAndServiceId", + new SqlParameter("@ActorID", actorId), + new SqlParameter("@ServiceId", serviceId), + new SqlParameter("@ItemName", itemName), + new SqlParameter("@GroupName", groupName), + new SqlParameter("@ItemTypeName", itemTypeName)); + + if (!int.TryParse(obj.ToString(), out res)) return -1; + + return res; + } + public static int AddServiceItem(int actorId, int serviceId, int packageId, string itemName, string itemTypeName, string xmlProperties) { @@ -4486,6 +4504,45 @@ namespace WebsitePanel.EnterpriseServer ); } + public static IDataReader GetWebDavPortalUserSettingsByAccountId(int accountId) + { + return SqlHelper.ExecuteReader( + ConnectionString, + CommandType.StoredProcedure, + "GetWebDavPortalUsersSettingsByAccountId", + new SqlParameter("@AccountId", accountId) + ); + } + + public static int AddWebDavPortalUsersSettings(int accountId, string settings) + { + SqlParameter settingsId = new SqlParameter("@WebDavPortalUsersSettingsId", SqlDbType.Int); + settingsId.Direction = ParameterDirection.Output; + + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "AddWebDavPortalUsersSettings", + settingsId, + new SqlParameter("@AccountId", accountId), + new SqlParameter("@Settings", settings) + ); + + // read identity + return Convert.ToInt32(settingsId.Value); + } + + public static void UpdateWebDavPortalUsersSettings(int accountId, string settings) + { + SqlHelper.ExecuteNonQuery( + ConnectionString, + CommandType.StoredProcedure, + "UpdateWebDavPortalUsersSettings", + new SqlParameter("@AccountId", accountId), + new SqlParameter("@Settings", settings) + ); + } + #endregion #region Support Service Levels diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/DatabaseServers/DatabaseServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/DatabaseServers/DatabaseServerController.cs index 246b6155..afbb2652 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/DatabaseServers/DatabaseServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/DatabaseServers/DatabaseServerController.cs @@ -125,8 +125,8 @@ namespace WebsitePanel.EnterpriseServer if (serviceId == 0) return BusinessErrorCodes.ERROR_MSSQL_RESOURCE_UNAVAILABLE; - // check package items - if (PackageController.GetPackageItemByName(item.PackageId, groupName, item.Name, typeof(SqlDatabase)) != null) + // check service items + if (PackageController.GetServiceItemsCountByNameAndServiceId(serviceId, groupName, item.Name, typeof(SqlDatabase)) > 0) return BusinessErrorCodes.ERROR_MSSQL_DATABASES_PACKAGE_ITEM_EXISTS; // place log record diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs index 21cd276d..d7fbc832 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/EnterpriseStorage/EnterpriseStorageController.cs @@ -172,6 +172,34 @@ namespace WebsitePanel.EnterpriseServer return ObjectUtils.FillObjectFromDataReader(DataProvider.GetWebDavAccessTokenByAccessToken(accessToken)); } + public static SystemFile[] SearchFiles(int itemId, string[] searchPaths, string searchText, string userPrincipalName, bool recursive) + { + try + { + // load organization + Organization org = OrganizationController.GetOrganization(itemId); + if (org == null) + { + return new SystemFile[0]; + } + + int serviceId = GetEnterpriseStorageServiceID(org.PackageId); + + if (serviceId == 0) + { + return new SystemFile[0]; + } + + EnterpriseStorage es = GetEnterpriseStorage(serviceId); + + return es.Search(org.OrganizationId, searchPaths, searchText, userPrincipalName, recursive); + } + catch (Exception ex) + { + throw ex; + } + } + #region Directory Browsing public static bool GetDirectoryBrowseEnabled(int itemId, string siteId) @@ -202,6 +230,33 @@ namespace WebsitePanel.EnterpriseServer #endregion + private static IEnumerable GetRootFolders(string userPrincipalName) + { + var rootFolders = new List(); + + var account = ExchangeServerController.GetAccountByAccountName(userPrincipalName); + + var userGroups = OrganizationController.GetSecurityGroupsByMember(account.ItemId, account.AccountId); + + foreach (var folder in GetFolders(account.ItemId)) + { + var permissions = GetFolderPermission(account.ItemId, folder.Name); + + foreach (var permission in permissions) + { + if ((!permission.IsGroup + && (permission.DisplayName == account.UserPrincipalName || permission.DisplayName == account.DisplayName)) + || (permission.IsGroup && userGroups.Any(x => x.DisplayName == permission.DisplayName))) + { + rootFolders.Add(folder); + break; + } + } + } + + return rootFolders; + } + protected static void StartESBackgroundTaskInternal(string taskName, int itemId, SystemFile folder, ESPermission[] permissions, bool directoyBrowsingEnabled, int quota, QuotaType quotaType) { // load organization @@ -1210,6 +1265,37 @@ namespace WebsitePanel.EnterpriseServer return null; } + #region WebDav portal + + public static string GetWebDavPortalUserSettingsByAccountId(int accountId) + { + var dataReader = DataProvider.GetWebDavPortalUserSettingsByAccountId(accountId); + + while (dataReader.Read()) + { + return (string)dataReader["Settings"]; + } + + return null; + } + + public static void UpdateUserSettings(int accountId, string settings) + { + var oldSettings = GetWebDavPortalUserSettingsByAccountId(accountId); + + if (string.IsNullOrEmpty(oldSettings)) + { + DataProvider.AddWebDavPortalUsersSettings(accountId, settings); + } + else + { + DataProvider.UpdateWebDavPortalUsersSettings(accountId, settings); + } + } + + #endregion + + #region Statistics public static OrganizationStatistics GetStatistics(int itemId) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/MailServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/MailServerController.cs index 82b7e117..5bfb9ea7 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/MailServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/MailServers/MailServerController.cs @@ -137,7 +137,6 @@ namespace WebsitePanel.EnterpriseServer return domainResult; // create service item - item.Enabled = true; item.MaxMailboxSize = GetMaxMailBoxSize(item.PackageId, item); // add service item @@ -159,7 +158,11 @@ namespace WebsitePanel.EnterpriseServer { return BusinessErrorCodes.ERROR_MAIL_LICENSE_DOMAIN_QUOTA; } - if (ex.Message != null && ex.Message.Contains("The maximum number of users for the server has been reached")) + if (ex.Message.Contains("Password doesn't meet complexity")) + { + return BusinessErrorCodes.ERROR_MAIL_ACCOUNT_PASSWORD_NOT_COMPLEXITY; + } + if (ex.Message.Contains("The maximum number of users for the server has been reached")) { return BusinessErrorCodes.ERROR_MAIL_LICENSE_USERS_QUOTA; } @@ -203,7 +206,6 @@ namespace WebsitePanel.EnterpriseServer MailServer mail = new MailServer(); ServiceProviderProxy.Init(mail, origItem.ServiceId); item.Name = origItem.Name; - item.Enabled = true; item.MaxMailboxSize = GetMaxMailBoxSize(origItem.PackageId, item); @@ -224,6 +226,11 @@ namespace WebsitePanel.EnterpriseServer } catch (Exception ex) { + if (ex.Message.Contains("Password doesn't meet complexity")) + { + return BusinessErrorCodes.ERROR_MAIL_ACCOUNT_PASSWORD_NOT_COMPLEXITY; + } + throw TaskManager.WriteError(ex); } finally diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Packages/PackageController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Packages/PackageController.cs index 19508ce5..292abb2a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Packages/PackageController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Packages/PackageController.cs @@ -1380,6 +1380,14 @@ namespace WebsitePanel.EnterpriseServer return CreateServiceItem(dvItem[0], dsItem.Tables[1].DefaultView); } + public static int GetServiceItemsCountByNameAndServiceId(int serviceId, string groupName, string itemName, Type itemType) + { + string itemTypeName = ObjectUtils.GetTypeFullName(itemType); + + return DataProvider.GetServiceItemsCountByNameAndServiceId(SecurityContext.User.UserId, + serviceId, groupName, itemName, itemTypeName); + } + public static bool CheckServiceItemExists(string itemName, Type itemType) { return CheckServiceItemExists(itemName, null, itemType); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs index 09b99f2c..269add07 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs @@ -168,9 +168,9 @@ namespace WebsitePanel.EnterpriseServer return RemoveRdsServerFromCollectionInternal(itemId, rdsServer, rdsCollection); } - public static ResultObject RemoveRdsServerFromOrganization(int rdsServerId) + public static ResultObject RemoveRdsServerFromOrganization(int itemId, int rdsServerId) { - return RemoveRdsServerFromOrganizationInternal(rdsServerId); + return RemoveRdsServerFromOrganizationInternal(itemId, rdsServerId); } public static ResultObject UpdateRdsServer(RdsServer rdsServer) @@ -248,6 +248,81 @@ namespace WebsitePanel.EnterpriseServer return GetRdsCollectionSessionHostsInternal(collectionId); } + public static RdsServerInfo GetRdsServerInfo(int itemId, string fqdnName) + { + return GetRdsServerInfoInternal(itemId, fqdnName); + } + + public static string GetRdsServerStatus(int itemId, string fqdnName) + { + return GetRdsServerStatusInternal(itemId, fqdnName); + } + + public static ResultObject ShutDownRdsServer(int itemId, string fqdnName) + { + return ShutDownRdsServerInternal(itemId, fqdnName); + } + + public static ResultObject RestartRdsServer(int itemId, string fqdnName) + { + return RestartRdsServerInternal(itemId, fqdnName); + } + + public static List GetRdsCollectionLocalAdmins(int collectionId) + { + return GetRdsCollectionLocalAdminsInternal(collectionId); + } + + public static ResultObject SaveRdsCollectionLocalAdmins(OrganizationUser[] users, int collectionId) + { + return SaveRdsCollectionLocalAdminsInternal(users, collectionId); + } + + public static ResultObject InstallSessionHostsCertificate(int collectionId, byte[] certificate, string password) + { + return InstallSessionHostsCertificateInternal(collectionId, certificate, password); + } + + private static ResultObject InstallSessionHostsCertificateInternal(int collectionId, byte[] certificate, string password) + { + var result = TaskManager.StartResultTask("REMOTE_DESKTOP_SERVICES", "INSTALL_CERTIFICATE"); + + try + { + var collection = ObjectUtils.FillObjectFromDataReader(DataProvider.GetRDSCollectionById(collectionId)); + Organization org = OrganizationController.GetOrganization(collection.ItemId); + + if (org == null) + { + result.IsSuccess = false; + result.AddError("", new NullReferenceException("Organization not found")); + return result; + } + + var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); + var servers = ObjectUtils.CreateListFromDataReader(DataProvider.GetRDSServersByCollectionId(collection.Id)).ToList(); + + rds.InstallCertificate(certificate, password, servers.Select(s => s.FqdName).ToArray()); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + if (!result.IsSuccess) + { + TaskManager.CompleteResultTask(result); + } + else + { + TaskManager.CompleteResultTask(); + } + } + + return result; + } + private static RdsCollection GetRdsCollectionInternal(int collectionId) { var collection = ObjectUtils.FillObjectFromDataReader(DataProvider.GetRDSCollectionById(collectionId)); @@ -280,11 +355,87 @@ namespace WebsitePanel.EnterpriseServer return collection; } + private static List GetRdsCollectionLocalAdminsInternal(int collectionId) + { + var result = new List(); + var collection = ObjectUtils.FillObjectFromDataReader(DataProvider.GetRDSCollectionById(collectionId)); + var servers = ObjectUtils.CreateListFromDataReader(DataProvider.GetRDSServersByCollectionId(collection.Id)).ToList(); + Organization org = OrganizationController.GetOrganization(collection.ItemId); + + if (org == null) + { + return result; + } + + var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); + + var organizationUsers = OrganizationController.GetOrganizationUsersPaged(collection.ItemId, null, null, null, 0, Int32.MaxValue).PageUsers; + var organizationAdmins = rds.GetRdsCollectionLocalAdmins(servers.First().FqdName); + + return organizationUsers.Where(o => organizationAdmins.Select(a => a.ToLower()).Contains(o.DomainUserName.ToLower())).ToList(); + } + + private static ResultObject SaveRdsCollectionLocalAdminsInternal(OrganizationUser[] users, int collectionId) + { + var result = TaskManager.StartResultTask("REMOTE_DESKTOP_SERVICES", "SAVE_LOCAL_ADMINS"); + + try + { + var collection = ObjectUtils.FillObjectFromDataReader(DataProvider.GetRDSCollectionById(collectionId)); + Organization org = OrganizationController.GetOrganization(collection.ItemId); + + if (org == null) + { + result.IsSuccess = false; + result.AddError("", new NullReferenceException("Organization not found")); + return result; + } + + var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); + var servers = ObjectUtils.CreateListFromDataReader(DataProvider.GetRDSServersByCollectionId(collection.Id)).ToList(); + + rds.SaveRdsCollectionLocalAdmins(users, servers.Select(s => s.FqdName).ToArray()); + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + if (!result.IsSuccess) + { + TaskManager.CompleteResultTask(result); + } + else + { + TaskManager.CompleteResultTask(); + } + } + + return result; + } + private static RdsCollectionSettings GetRdsCollectionSettingsInternal(int collectionId) { - var collection = ObjectUtils.FillObjectFromDataReader(DataProvider.GetRDSCollectionById(collectionId)); - - return ObjectUtils.FillObjectFromDataReader(DataProvider.GetRdsCollectionSettingsByCollectionId(collectionId)); + var collection = ObjectUtils.FillObjectFromDataReader(DataProvider.GetRDSCollectionById(collectionId)); + var settings = ObjectUtils.FillObjectFromDataReader(DataProvider.GetRdsCollectionSettingsByCollectionId(collectionId)); + + if (settings.SecurityLayer == null) + { + settings.SecurityLayer = SecurityLayerValues.Negotiate.ToString(); + } + + if (settings.EncryptionLevel == null) + { + settings.EncryptionLevel = EncryptionLevel.ClientCompatible.ToString(); + } + + if (settings.AuthenticateUsingNLA == null) + { + settings.AuthenticateUsingNLA = true; + } + + return settings; } private static List GetOrganizationRdsCollectionsInternal(int itemId) @@ -336,7 +487,10 @@ namespace WebsitePanel.EnterpriseServer ClientPrinterRedirected = true, ClientPrinterAsDefault = true, RDEasyPrintDriverEnabled = true, - MaxRedirectedMonitors = 16 + MaxRedirectedMonitors = 16, + EncryptionLevel = EncryptionLevel.ClientCompatible.ToString(), + SecurityLayer = SecurityLayerValues.Negotiate.ToString(), + AuthenticateUsingNLA = true }; rds.CreateCollection(org.OrganizationId, collection); @@ -509,8 +663,8 @@ namespace WebsitePanel.EnterpriseServer } var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); - - rds.RemoveCollection(org.OrganizationId, collection.Name); + var servers = ObjectUtils.CreateListFromDataReader(DataProvider.GetRDSServersByCollectionId(collection.Id)).ToArray(); + rds.RemoveCollection(org.OrganizationId, collection.Name, servers); DataProvider.DeleteRDSCollection(collection.Id); } @@ -586,7 +740,7 @@ namespace WebsitePanel.EnterpriseServer foreach (var tmpServer in tmpServers) { - FillRdsServerData(tmpServer); + FillRdsServerData(tmpServer); } result.Servers = tmpServers.ToArray(); @@ -606,8 +760,21 @@ namespace WebsitePanel.EnterpriseServer } var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(organization.PackageId)); + var userSessions = rds.GetRdsUserSessions(collection.Name).ToList(); + var organizationUsers = OrganizationController.GetOrganizationUsersPaged(collection.ItemId, null, null, null, 0, Int32.MaxValue).PageUsers; - return rds.GetRdsUserSessions(collection.Name).ToList(); + foreach(var userSession in userSessions) + { + var organizationUser = organizationUsers.FirstOrDefault(o => o.SamAccountName.Equals(userSession.SamAccountName, StringComparison.CurrentCultureIgnoreCase)); + + if (organizationUser != null) + { + userSession.IsVip = organizationUser.IsVIP; + result.Add(userSession); + } + } + + return result; } private static RdsServersPaged GetFreeRdsServersPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) @@ -940,11 +1107,12 @@ namespace WebsitePanel.EnterpriseServer rds.AddSessionHostFeatureToServer(rdsServer.FqdName); } + rds.MoveRdsServerToTenantOU(rdsServer.FqdName, org.OrganizationId); DataProvider.AddRDSServerToOrganization(itemId, serverId); } catch (Exception ex) { - result.AddError("REMOTE_DESKTOP_SERVICES_ADD_RDS_SERVER_TO_ORGANIZATION", ex); + throw TaskManager.WriteError(ex); } finally { @@ -961,17 +1129,29 @@ namespace WebsitePanel.EnterpriseServer return result; } - private static ResultObject RemoveRdsServerFromOrganizationInternal(int rdsServerId) + private static ResultObject RemoveRdsServerFromOrganizationInternal(int itemId, int rdsServerId) { - var result = TaskManager.StartResultTask("REMOTE_DESKTOP_SERVICES", "REMOVE_RDS_SERVER_FROM_ORGANIZATION"); + var result = TaskManager.StartResultTask("REMOTE_DESKTOP_SERVICES", "REMOVE_RDS_SERVER_FROM_ORGANIZATION"); try { + Organization org = OrganizationController.GetOrganization(itemId); + + if (org == null) + { + result.IsSuccess = false; + result.AddError("", new NullReferenceException("Organization not found")); + return result; + } + + var rdsServer = ObjectUtils.FillObjectFromDataReader(DataProvider.GetRDSServerById(rdsServerId)); + var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); + rds.RemoveRdsServerFromTenantOU(rdsServer.FqdName, org.OrganizationId); DataProvider.RemoveRDSServerFromOrganization(rdsServerId); } catch (Exception ex) { - result.AddError("REMOTE_DESKTOP_SERVICES_REMOVE_RDS_SERVER_FROM_ORGANIZATION", ex); + throw TaskManager.WriteError(ex); } finally { @@ -1235,6 +1415,118 @@ namespace WebsitePanel.EnterpriseServer return result; } + private static RdsServerInfo GetRdsServerInfoInternal(int itemId, string fqdnName) + { + Organization org = OrganizationController.GetOrganization(itemId); + + if (org == null) + { + return new RdsServerInfo(); + } + + var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); + var result = rds.GetRdsServerInfo(fqdnName); + + return result; + } + + private static string GetRdsServerStatusInternal(int itemId, string fqdnName) + { + Organization org = OrganizationController.GetOrganization(itemId); + var result = "Unavailable"; + + if (org == null) + { + return result; + } + + var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); + + try + { + result = rds.GetRdsServerStatus(fqdnName); + } + catch + { + } + + return result; + } + + private static ResultObject ShutDownRdsServerInternal(int itemId, string fqdnName) + { + var result = TaskManager.StartResultTask("REMOTE_DESKTOP_SERVICES", "SHUTDOWN_RDS_SERVER"); + + try + { + Organization org = OrganizationController.GetOrganization(itemId); + + if (org == null) + { + result.IsSuccess = false; + result.AddError("", new NullReferenceException("Organization not found")); + return result; + } + + var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); + rds.ShutDownRdsServer(fqdnName); + } + catch (Exception ex) + { + result.AddError("REMOTE_DESKTOP_SERVICES_SHUTDOWN_RDS_SERVER", ex); + } + finally + { + if (!result.IsSuccess) + { + TaskManager.CompleteResultTask(result); + } + else + { + TaskManager.CompleteResultTask(); + } + } + + return result; + } + + private static ResultObject RestartRdsServerInternal(int itemId, string fqdnName) + { + var result = TaskManager.StartResultTask("REMOTE_DESKTOP_SERVICES", "RESTART_RDS_SERVER"); + + try + { + Organization org = OrganizationController.GetOrganization(itemId); + + if (org == null) + { + result.IsSuccess = false; + result.AddError("", new NullReferenceException("Organization not found")); + return result; + } + + var rds = GetRemoteDesktopServices(GetRemoteDesktopServiceID(org.PackageId)); + rds.RestartRdsServer(fqdnName); + } + catch (Exception ex) + { + result.AddError("REMOTE_DESKTOP_SERVICES_RESTART_RDS_SERVER", ex); + } + finally + { + if (!result.IsSuccess) + { + TaskManager.CompleteResultTask(result); + } + else + { + TaskManager.CompleteResultTask(); + } + } + + return result; + } + private static List GetCollectionRemoteApplicationsInternal(int itemId, string collectionName) { var result = new List(); @@ -1410,7 +1702,7 @@ namespace WebsitePanel.EnterpriseServer foreach (var server in servers) { - RemoveRdsServerFromOrganization(server.Id); + RemoveRdsServerFromOrganization(itemId, server.Id); } } catch (Exception ex) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Virtualization/VirtualizationServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Virtualization/VirtualizationServerController.cs index 75ea31ef..fb69ef50 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Virtualization/VirtualizationServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Virtualization/VirtualizationServerController.cs @@ -1074,10 +1074,14 @@ namespace WebsitePanel.EnterpriseServer } } - private static void CheckNumericQuota(PackageContext cntx, List errors, string quotaName, int currentVal, int val, string messageKey) + private static void CheckNumericQuota(PackageContext cntx, List errors, string quotaName, long currentVal, long val, string messageKey) { CheckQuotaValue(cntx, errors, quotaName, currentVal, val, messageKey); } + private static void CheckNumericQuota(PackageContext cntx, List errors, string quotaName, int currentVal, int val, string messageKey) + { + CheckQuotaValue(cntx, errors, quotaName, Convert.ToInt64(currentVal), Convert.ToInt64(val), messageKey); + } private static void CheckNumericQuota(PackageContext cntx, List errors, string quotaName, int val, string messageKey) { @@ -1094,7 +1098,7 @@ namespace WebsitePanel.EnterpriseServer CheckQuotaValue(cntx, errors, quotaName, 0, -1, messageKey); } - private static void CheckQuotaValue(PackageContext cntx, List errors, string quotaName, int currentVal, int val, string messageKey) + private static void CheckQuotaValue(PackageContext cntx, List errors, string quotaName, long currentVal, long val, string messageKey) { if (!cntx.Quotas.ContainsKey(quotaName)) return; @@ -1111,7 +1115,7 @@ namespace WebsitePanel.EnterpriseServer errors.Add(messageKey); else if (quota.QuotaTypeId == 2) { - int maxValue = quota.QuotaAllocatedValue - quota.QuotaUsedValue + currentVal; + long maxValue = quota.QuotaAllocatedValue - quota.QuotaUsedValue + currentVal; if(val > maxValue) errors.Add(messageKey + ":" + maxValue); } @@ -1795,8 +1799,9 @@ namespace WebsitePanel.EnterpriseServer else if (state == VirtualMachineRequestedState.Reboot) { // shutdown first - ResultObject shutdownResult = ChangeVirtualMachineState(itemId, VirtualMachineRequestedState.ShutDown); - if(!shutdownResult.IsSuccess) + ResultObject shutdownResult = ChangeVirtualMachineState(itemId, + VirtualMachineRequestedState.ShutDown); + if (!shutdownResult.IsSuccess) { TaskManager.CompleteResultTask(res); return shutdownResult; @@ -1817,20 +1822,29 @@ namespace WebsitePanel.EnterpriseServer JobResult result = vps.ChangeVirtualMachineState(machine.VirtualMachineId, state); - // check return - if (result.ReturnValue != ReturnCode.JobStarted) + if (result.Job.JobState == ConcreteJobState.Completed) { LogReturnValueResult(res, result); - TaskManager.CompleteResultTask(res); + TaskManager.CompleteTask(); return res; } - - // wait for completion - if (!JobCompleted(vps, result.Job)) + else { - LogJobResult(res, result.Job); - TaskManager.CompleteResultTask(res); - return res; + // check return + if (result.ReturnValue != ReturnCode.JobStarted) + { + LogReturnValueResult(res, result); + TaskManager.CompleteResultTask(res); + return res; + } + + // wait for completion + if (!JobCompleted(vps, result.Job)) + { + LogJobResult(res, result.Job); + TaskManager.CompleteResultTask(res); + return res; + } } } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esEnterpriseStorage.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esEnterpriseStorage.asmx.cs index deb4f45a..6668b40b 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esEnterpriseStorage.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esEnterpriseStorage.asmx.cs @@ -158,6 +158,24 @@ namespace WebsitePanel.EnterpriseServer return EnterpriseStorageController.CheckUsersDomainExists(itemId); } + [WebMethod] + public string GetWebDavPortalUserSettingsByAccountId(int accountId) + { + return EnterpriseStorageController.GetWebDavPortalUserSettingsByAccountId(accountId); + } + + [WebMethod] + public void UpdateWebDavPortalUserSettings(int accountId, string settings) + { + EnterpriseStorageController.UpdateUserSettings(accountId,settings); + } + + [WebMethod] + public SystemFile[] SearchFiles(int itemId, string[] searchPaths, string searchText, string userPrincipalName, bool recursive) + { + return EnterpriseStorageController.SearchFiles(itemId, searchPaths, searchText, userPrincipalName, recursive); + } + #region Directory Browsing [WebMethod] diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs index 82127d09..8cd3ecdb 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs @@ -189,9 +189,9 @@ namespace WebsitePanel.EnterpriseServer } [WebMethod] - public ResultObject RemoveRdsServerFromOrganization(int rdsServerId) + public ResultObject RemoveRdsServerFromOrganization(int itemId, int rdsServerId) { - return RemoteDesktopServicesController.RemoveRdsServerFromOrganization(rdsServerId); + return RemoteDesktopServicesController.RemoveRdsServerFromOrganization(itemId, rdsServerId); } [WebMethod] @@ -289,5 +289,47 @@ namespace WebsitePanel.EnterpriseServer { return RemoteDesktopServicesController.GetRdsCollectionSessionHosts(collectionId); } + + [WebMethod] + public RdsServerInfo GetRdsServerInfo(int itemId, string fqdnName) + { + return RemoteDesktopServicesController.GetRdsServerInfo(itemId, fqdnName); + } + + [WebMethod] + public string GetRdsServerStatus(int itemId, string fqdnName) + { + return RemoteDesktopServicesController.GetRdsServerStatus(itemId, fqdnName); + } + + [WebMethod] + public ResultObject ShutDownRdsServer(int itemId, string fqdnName) + { + return RemoteDesktopServicesController.ShutDownRdsServer(itemId, fqdnName); + } + + [WebMethod] + public ResultObject RestartRdsServer(int itemId, string fqdnName) + { + return RemoteDesktopServicesController.RestartRdsServer(itemId, fqdnName); + } + + [WebMethod] + public List GetRdsCollectionLocalAdmins(int collectionId) + { + return RemoteDesktopServicesController.GetRdsCollectionLocalAdmins(collectionId); + } + + [WebMethod] + public ResultObject SaveRdsCollectionLocalAdmins(OrganizationUser[] users, int collectionId) + { + return RemoteDesktopServicesController.SaveRdsCollectionLocalAdmins(users, collectionId); + } + + [WebMethod] + public ResultObject InstallSessionHostsCertificate(int collectionId, byte[] certificate, string password) + { + return RemoteDesktopServicesController.InstallSessionHostsCertificate(collectionId, certificate, password); + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/EnterpriseStorage/IEnterpriseStorage.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/EnterpriseStorage/IEnterpriseStorage.cs index 5693ea5e..892864a9 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/EnterpriseStorage/IEnterpriseStorage.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/EnterpriseStorage/IEnterpriseStorage.cs @@ -46,6 +46,6 @@ namespace WebsitePanel.Providers.EnterpriseStorage bool SetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules); WebDavFolderRule[] GetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting); bool CheckFileServicesInstallation(); - + SystemFile[] Search(string organizationId, string[] searchPaths, string searchText, string userPrincipalName, bool recursive); } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAccount.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAccount.cs index 3fbba76b..3dedd942 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAccount.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Mail/MailAccount.cs @@ -33,7 +33,7 @@ namespace WebsitePanel.Providers.Mail [Serializable] public class MailAccount : ServiceProviderItem { - private bool enabled; + private bool enabled = true; private string password; private string replyTo; private bool responderEnabled; diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs index 27478af4..830bccab 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/OS/SystemFile.cs @@ -144,6 +144,8 @@ namespace WebsitePanel.Providers.OS set { this.url = value; } } + public string RelativeUrl { get; set; } + public string DriveLetter { get { return this.driveLetter; } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs index e434048d..a176c00f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/IRemoteDesktopServices.cs @@ -31,6 +31,7 @@ using System.Collections; using System.Collections.Generic; using System.Net; using System.Net.Sockets; +using WebsitePanel.Providers.HostedSolution; namespace WebsitePanel.Providers.RemoteDesktopServices { @@ -42,7 +43,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices bool CreateCollection(string organizationId, RdsCollection collection); bool AddRdsServersToDeployment(RdsServer[] servers); RdsCollection GetCollection(string collectionName); - bool RemoveCollection(string organizationId, string collectionName); + bool RemoveCollection(string organizationId, string collectionName, List servers); bool SetUsersInCollection(string organizationId, string collectionName, List users); void AddSessionHostServerToCollection(string organizationId, string collectionName, RdsServer server); void AddSessionHostServersToCollection(string organizationId, string collectionName, List servers); @@ -69,5 +70,14 @@ namespace WebsitePanel.Providers.RemoteDesktopServices List GetRdsUserSessions(string collectionName); void LogOffRdsUser(string unifiedSessionId, string hostServer); List GetRdsCollectionSessionHosts(string collectionName); + RdsServerInfo GetRdsServerInfo(string serverName); + string GetRdsServerStatus(string serverName); + void ShutDownRdsServer(string serverName); + void RestartRdsServer(string serverName); + void SaveRdsCollectionLocalAdmins(List users, List hosts); + List GetRdsCollectionLocalAdmins(string hostName); + void MoveRdsServerToTenantOU(string hostName, string organizationId); + void RemoveRdsServerFromTenantOU(string hostName, string organizationId); + void InstallCertificate(byte[] certificate, string password, List hostNames); } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsCollectionSettings.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsCollectionSettings.cs index 5827ecc6..2ccae36a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsCollectionSettings.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsCollectionSettings.cs @@ -21,6 +21,9 @@ namespace WebsitePanel.Providers.RemoteDesktopServices public bool ClientPrinterRedirected { get; set; } public bool ClientPrinterAsDefault { get; set; } public bool RDEasyPrintDriverEnabled { get; set; } - public int MaxRedirectedMonitors { get; set; } + public int MaxRedirectedMonitors { get; set; } + public string SecurityLayer { get; set; } + public string EncryptionLevel { get; set; } + public bool AuthenticateUsingNLA { get; set; } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsServer.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsServer.cs index 1f89e9b8..aa181ba7 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsServer.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsServer.cs @@ -47,5 +47,6 @@ namespace WebsitePanel.Providers.RemoteDesktopServices public string ItemName { get; set; } public int? RdsCollectionId { get; set; } public bool ConnectionEnabled { get; set; } + public string Status { get; set; } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsServerDriveInfo.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsServerDriveInfo.cs new file mode 100644 index 00000000..1b29f46f --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsServerDriveInfo.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace WebsitePanel.Providers.RemoteDesktopServices +{ + public class RdsServerDriveInfo + { + public string DeviceId { get; set; } + public string VolumeName { get; set; } + public double SizeMb { get; set; } + public double FreeSpaceMb { get; set; } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsServerInfo.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsServerInfo.cs new file mode 100644 index 00000000..55056203 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsServerInfo.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace WebsitePanel.Providers.RemoteDesktopServices +{ + public class RdsServerInfo + { + public string Status { get; set; } + public int NumberOfCores { get; set; } + public int MaxClockSpeed { get; set; } + public int LoadPercentage { get; set; } + public double MemoryAllocatedMb { get; set; } + public double FreeMemoryMb { get; set; } + public RdsServerDriveInfo[] Drives { get; set; } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsUserSession.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsUserSession.cs index 8c3e9729..4d6b4e19 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsUserSession.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RdsUserSession.cs @@ -13,5 +13,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices public string SessionState { get; set; } public string HostServer { get; set; } public string DomainName { get; set; } + public bool IsVip { get; set; } + public string SamAccountName { get; set; } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RemoteApplication.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RemoteApplication.cs index 300f8b47..b0bda452 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RemoteApplication.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/RemoteDesktopServices/RemoteApplication.cs @@ -36,5 +36,6 @@ namespace WebsitePanel.Providers.RemoteDesktopServices public string FileVirtualPath { get; set; } public bool ShowInWebAccess { get; set; } public string RequiredCommandLine { get; set; } + public string[] Users { get; set; } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJobState.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJobState.cs index 468136e8..b316ef8f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJobState.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/ConcreteJobState.cs @@ -42,6 +42,9 @@ namespace WebsitePanel.Providers.Virtualization Completed = 7, Terminated = 8, Killed = 9, - Exception = 10 + Exception = 10, + + NotStarted = 11, + Failed = 12, } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/DvdDriveInfo.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/DvdDriveInfo.cs new file mode 100644 index 00000000..df548b0b --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/DvdDriveInfo.cs @@ -0,0 +1,43 @@ +// Copyright (c) 2014, Outercurve Foundation. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// - Redistributions of source code must retain the above copyright notice, this +// list of conditions and the following disclaimer. +// +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// - Neither the name of the Outercurve Foundation nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace WebsitePanel.Providers.Virtualization +{ + public class DvdDriveInfo + { + public ControllerType ControllerType { get; set; } + public int ControllerNumber { get; set; } + public int ControllerLocation { get; set; } + public string Name { get; set; } + public string Id { get; set; } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/MemoryInfo.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/MemoryInfo.cs index 0fe02369..7e79088a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/MemoryInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/MemoryInfo.cs @@ -35,9 +35,9 @@ namespace WebsitePanel.Providers.Virtualization public class MemoryInfo { public bool DynamicMemoryEnabled { get; set; } - public Int32 Startup { get; set; } - public Int32 Minimum { get; set; } - public Int32 Maximum { get; set; } + public Int64 Startup { get; set; } + public Int64 Minimum { get; set; } + public Int64 Maximum { get; set; } public int Buffer { get; set; } public int Priority { get; set; } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/OperationalStatus.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/OperationalStatus.cs index 808ff0dc..c10ebc26 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/OperationalStatus.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/OperationalStatus.cs @@ -35,9 +35,10 @@ namespace WebsitePanel.Providers.Virtualization public enum OperationalStatus { None = 0, - OK = 2, + Ok = 2, Error = 6, NoContact = 12, - LostCommunication = 13 + LostCommunication = 13, + Paused = 15 } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualHardDiskInfo.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualHardDiskInfo.cs index 36c9a29e..e327767f 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualHardDiskInfo.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualHardDiskInfo.cs @@ -41,8 +41,8 @@ namespace WebsitePanel.Providers.Virtualization public string ParentPath { get; set; } public VirtualHardDiskType DiskType { get; set; } public bool SupportPersistentReservations { get; set; } - public long MaximumIOPS { get; set; } - public long MinimumIOPS { get; set; } + public ulong MaximumIOPS { get; set; } + public ulong MinimumIOPS { get; set; } public ControllerType VHDControllerType { get; set; } public int ControllerNumber { get; set; } public int ControllerLocation { get; set; } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachine.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachine.cs index 763abf86..5f5847a8 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachine.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachine.cs @@ -69,8 +69,8 @@ namespace WebsitePanel.Providers.Virtualization public int CpuUsage { get; set; } [Persistent] - public int RamSize { get; set; } - public int RamUsage { get; set; } + public long RamSize { get; set; } + public long RamUsage { get; set; } [Persistent] public int HddSize { get; set; } public LogicalDisk[] HddLogicalDisks { get; set; } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineNetworkAdapter.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineNetworkAdapter.cs index fe2646d3..d1209d10 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineNetworkAdapter.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Virtualization/VirtualMachineNetworkAdapter.cs @@ -36,5 +36,6 @@ namespace WebsitePanel.Providers.Virtualization { public string Name { get; set; } public string MacAddress { get; set; } + public string SwitchName { get; set; } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj index 64efc261..f60340ee 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/WebsitePanel.Providers.Base.csproj @@ -135,6 +135,8 @@ + + @@ -307,6 +309,7 @@ + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.EnterpriseStorage.Windows2012/Windows2012.cs b/WebsitePanel/Sources/WebsitePanel.Providers.EnterpriseStorage.Windows2012/Windows2012.cs index fbd7b157..e5ff425c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.EnterpriseStorage.Windows2012/Windows2012.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.EnterpriseStorage.Windows2012/Windows2012.cs @@ -27,9 +27,12 @@ // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using System; +using System.Data.OleDb; using System.IO; using System.Collections; using System.Collections.Generic; +using System.Linq; +using System.Security.Principal; using System.Text; using Microsoft.Win32; @@ -62,6 +65,7 @@ namespace WebsitePanel.Providers.EnterpriseStorage #endregion #region Folders + public SystemFile[] GetFolders(string organizationId, WebDavSetting[] settings) { ArrayList items = new ArrayList(); @@ -70,7 +74,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage foreach (var setting in webDavSettings) { - string rootPath = string.Format("{0}:\\{1}\\{2}", setting.LocationDrive, setting.HomeFolder, organizationId); + string rootPath = string.Format("{0}:\\{1}\\{2}", setting.LocationDrive, setting.HomeFolder, + organizationId); var windows = new WebsitePanel.Providers.OS.Windows2012(); @@ -114,16 +119,17 @@ namespace WebsitePanel.Providers.EnterpriseStorage } } - return (SystemFile[])items.ToArray(typeof(SystemFile)); + return (SystemFile[]) items.ToArray(typeof (SystemFile)); } public SystemFile GetFolder(string organizationId, string folderName, WebDavSetting setting) { var webDavSetting = GetWebDavSetting(setting); - string fullName = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, organizationId, folderName); + string fullName = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, + organizationId, folderName); SystemFile folder = null; - + var windows = new WebsitePanel.Providers.OS.Windows2012(); if (Directory.Exists(fullName)) @@ -151,7 +157,7 @@ namespace WebsitePanel.Providers.EnterpriseStorage folder.FRSMQuotaGB = windows.ConvertMegaBytesToGB(folder.FRSMQuotaMB); folder.FsrmQuotaType = quota.QuotaType; } - + return folder; } @@ -159,17 +165,21 @@ namespace WebsitePanel.Providers.EnterpriseStorage { var webDavSetting = GetWebDavSetting(setting); - FileUtils.CreateDirectory(string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, organizationId, folder)); + FileUtils.CreateDirectory(string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, + webDavSetting.HomeFolder, organizationId, folder)); } - public SystemFile RenameFolder(string organizationId, string originalFolder, string newFolder, WebDavSetting setting) + public SystemFile RenameFolder(string organizationId, string originalFolder, string newFolder, + WebDavSetting setting) { var webDavSetting = GetWebDavSetting(setting); - var oldPath = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, organizationId, originalFolder); - var newPath = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, organizationId, newFolder); + var oldPath = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, + organizationId, originalFolder); + var newPath = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, + organizationId, newFolder); - FileUtils.MoveFile(oldPath,newPath); + FileUtils.MoveFile(oldPath, newPath); IWebDav webdav = new WebDav(webDavSetting); @@ -183,17 +193,20 @@ namespace WebsitePanel.Providers.EnterpriseStorage { var webDavSetting = GetWebDavSetting(setting); - string rootPath = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, organizationId, folder); + string rootPath = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, + organizationId, folder); DirectoryInfo treeRoot = new DirectoryInfo(rootPath); - + if (treeRoot.Exists) { DirectoryInfo[] dirs = treeRoot.GetDirectories(); while (dirs.Length > 0) { foreach (DirectoryInfo dir in dirs) - DeleteFolder(organizationId, folder != string.Empty ? string.Format("{0}\\{1}", folder, dir.Name) : dir.Name, webDavSetting); + DeleteFolder(organizationId, + folder != string.Empty ? string.Format("{0}\\{1}", folder, dir.Name) : dir.Name, + webDavSetting); dirs = treeRoot.GetDirectories(); } @@ -207,14 +220,15 @@ namespace WebsitePanel.Providers.EnterpriseStorage } IWebDav webdav = new WebDav(webDavSetting); - + webdav.DeleteAllWebDavRules(organizationId, folder); - + Directory.Delete(treeRoot.FullName, true); } } - public bool SetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules) + public bool SetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, + WebDavFolderRule[] rules) { var users = new List(); @@ -243,14 +257,15 @@ namespace WebsitePanel.Providers.EnterpriseStorage var webDavSetting = GetWebDavSetting(setting); - string path = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, organizationId, folder); + string path = string.Format("{0}:\\{1}\\{2}\\{3}", webDavSetting.LocationDrive, webDavSetting.HomeFolder, + organizationId, folder); SecurityUtils.ResetNtfsPermissions(path); SecurityUtils.GrantGroupNtfsPermissions(path, users.ToArray(), false, new RemoteServerSettings(), null, null); IWebDav webdav = new WebDav(webDavSetting); - + return webdav.SetFolderWebDavRules(organizationId, folder, rules); } @@ -270,6 +285,73 @@ namespace WebsitePanel.Providers.EnterpriseStorage #endregion + public SystemFile[] Search(string organizationId, string[] searchPaths, string searchText, string userPrincipalName, bool recursive) + { + var settings = GetWebDavSetting(null); + var result = new List(); + var isRootSearch = false; + + if (searchPaths.Any(string.IsNullOrEmpty)) + { + isRootSearch = true; + searchPaths = searchPaths.Where(x => !string.IsNullOrEmpty(x)).ToArray(); + } + + //using (new WindowsIdentity(userPrincipalName).Impersonate()) + { + using (var conn = new OleDbConnection("Provider=Search.CollatorDSO;Extended Properties='Application=Windows';")) + { + var rootFolder = Path.Combine(settings.LocationDrive + ":\\", settings.HomeFolder); + rootFolder = Path.Combine(rootFolder, organizationId); + + var wsSql = string.Format(@"SELECT System.FileName, System.DateModified, System.Size, System.Kind, System.ItemPathDisplay, System.ItemType FROM SYSTEMINDEX WHERE System.FileName LIKE '%{0}%' AND ({1})", + searchText, string.Join(" OR ", searchPaths.Select(x => string.Format("{0} = '{1}'", recursive ? "SCOPE" : "DIRECTORY", Path.Combine(rootFolder, x))).ToArray())); + + conn.Open(); + + var cmd = new OleDbCommand(wsSql, conn); + + using (OleDbDataReader reader = cmd.ExecuteReader()) + { + while (reader!= null && reader.Read()) + { + var file = new SystemFile {Name = reader[0] as string}; + + file.Changed = file.CreatedDate = reader[1] is DateTime ? (DateTime)reader[1] : new DateTime(); + file.Size = reader[2] is long ? (long) reader[2] : 0; + + var kind = reader[3] is IEnumerable ? ((IEnumerable)reader[3]).Cast().ToList() : null; + var itemType = reader[5] as string ?? string.Empty; + + if (kind != null && kind.Any() && itemType.ToLowerInvariant() != ".zip") + { + file.IsDirectory = kind.Any(x => x == "folder"); + } + + file.FullName = (reader[4] as string ?? string.Empty); + + if (isRootSearch) + { + file.RelativeUrl = file.FullName.Replace(rootFolder, "").Trim('\\'); + } + else + { + foreach (var searchPath in searchPaths) + { + file.RelativeUrl = file.FullName.Replace(Path.Combine(rootFolder, searchPath), "").Trim('\\'); + } + } + + result.Add(file); + } + } + } + } + + return result.ToArray(); + } + + #region HostingServiceProvider methods public override string[] Install() diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail10/SmarterMail10.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail10/SmarterMail10.cs index a4b1f28f..4c4f965a 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail10/SmarterMail10.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Mail.SmarterMail10/SmarterMail10.cs @@ -1171,8 +1171,13 @@ namespace WebsitePanel.Providers.Mail mailbox.IsDomainAdmin // domain admin is false ); - if (!result.Result) - throw new Exception(result.Message); + if (!result.Result) + { + if (result.ResultCode == -21) + throw new Exception("Password doesn't meet complexity", new Exception(result.Message)); + + throw new Exception(result.Message); + } // set forwarding settings result = users.UpdateUserForwardingInfo(AdminUsername, AdminPassword, @@ -1232,10 +1237,15 @@ namespace WebsitePanel.Providers.Mail GenericResult result = users.UpdateUser( AdminUsername, AdminPassword, mailbox.Name, strPassword, mailbox.FirstName, mailbox.LastName, mailbox.IsDomainAdmin); - if (!result.Result) - throw new Exception(result.Message); + if (!result.Result) + { + if (result.ResultCode == -21) + throw new Exception("Password doesn't meet complexity", new Exception(result.Message)); + + throw new Exception(result.Message); + } - // set forwarding settings + // set forwarding settings result = users.UpdateUserForwardingInfo(AdminUsername, AdminPassword, mailbox.Name, mailbox.DeleteOnForward, (mailbox.ForwardingAddresses != null ? String.Join(", ", mailbox.ForwardingAddresses) : "")); diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs index e6e8dba2..a0015101 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.TerminalServices.Windows2012/Windows2012.cs @@ -47,6 +47,9 @@ using System.Management; using System.Management.Automation; using System.Management.Automation.Runspaces; using System.Collections.ObjectModel; +using System.DirectoryServices; +using System.Security.Cryptography.X509Certificates; +using System.Collections; namespace WebsitePanel.Providers.RemoteDesktopServices @@ -64,6 +67,13 @@ namespace WebsitePanel.Providers.RemoteDesktopServices private const string RdsGroupFormat = "rds-{0}-{1}"; private const string RdsModuleName = "RemoteDesktopServices"; private const string AddNpsString = "netsh nps add np name=\"\"{0}\"\" policysource=\"1\" processingorder=\"{1}\" conditionid=\"0x3d\" conditiondata=\"^5$\" conditionid=\"0x1fb5\" conditiondata=\"{2}\" conditionid=\"0x1e\" conditiondata=\"UserAuthType:(PW|CA)\" profileid=\"0x1005\" profiledata=\"TRUE\" profileid=\"0x100f\" profiledata=\"TRUE\" profileid=\"0x1009\" profiledata=\"0x7\" profileid=\"0x1fe6\" profiledata=\"0x40000000\""; + private const string WspAdministratorsGroupName = "WSP-Org-Administrators"; + private const string WspAdministratorsGroupDescription = "WSP Org Administrators"; + private const string RdsServersOU = "RDSServers"; + private const string RDSHelpDeskComputerGroup = "Websitepanel-RDSHelpDesk-Computer"; + private const string RDSHelpDeskGroup = "WSP-HelpDeskAdministrators"; + private const string RDSHelpDeskGroupDescription = "WSP Help Desk Administrators"; + #endregion #region Properties @@ -300,6 +310,8 @@ namespace WebsitePanel.Providers.RemoteDesktopServices //ActiveDirectoryUtils.AddObjectToGroup(GetComputerPath(ConnectionBroker), GetComputerGroupPath(organizationId, collection.Name)); } + CheckOrCreateHelpDeskComputerGroup(); + if (!ActiveDirectoryUtils.AdObjectExists(GetUsersGroupPath(organizationId, collection.Name))) { //Create user group @@ -329,7 +341,13 @@ namespace WebsitePanel.Providers.RemoteDesktopServices //add session servers to group foreach (var rdsServer in collection.Servers) - { + { + if (!CheckLocalAdminsGroupExists(rdsServer.FqdName, runSpace)) + { + CreateLocalAdministratorsGroup(rdsServer.FqdName, runSpace); + } + + AddHelpDeskAdminsGroupToLocalAdmins(runSpace, rdsServer.FqdName); AddComputerToCollectionAdComputerGroup(organizationId, collection.Name, rdsServer); } } @@ -458,7 +476,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices return collection; } - public bool RemoveCollection(string organizationId, string collectionName) + public bool RemoveCollection(string organizationId, string collectionName, List servers) { var result = true; @@ -493,11 +511,13 @@ namespace WebsitePanel.Providers.RemoteDesktopServices RemoveNpsPolicy(runSpace, CentralNpsHost, capPolicyName); } - //Remove security group + foreach(var server in servers) + { + RemoveComputerFromCollectionAdComputerGroup(organizationId, collectionName, server); + } ActiveDirectoryUtils.DeleteADObject(GetComputerGroupPath(organizationId, collectionName)); - - ActiveDirectoryUtils.DeleteADObject(GetUsersGroupPath(organizationId, collectionName)); + ActiveDirectoryUtils.DeleteADObject(GetUsersGroupPath(organizationId, collectionName)); } catch (Exception e) { @@ -553,6 +573,14 @@ namespace WebsitePanel.Providers.RemoteDesktopServices ExecuteShellCommand(runSpace, cmd, false); + CheckOrCreateHelpDeskComputerGroup(); + + if (!CheckLocalAdminsGroupExists(server.FqdName, runSpace)) + { + CreateLocalAdministratorsGroup(server.FqdName, runSpace); + } + + AddHelpDeskAdminsGroupToLocalAdmins(runSpace, server.FqdName); AddComputerToCollectionAdComputerGroup(organizationId, collectionName, server); } catch (Exception e) @@ -948,6 +976,351 @@ namespace WebsitePanel.Providers.RemoteDesktopServices #endregion + #region Local Admins + + public void SaveRdsCollectionLocalAdmins(List users, List hosts) + { + Runspace runspace = null; + + try + { + runspace = OpenRunspace(); + var index = ServerSettings.ADRootDomain.LastIndexOf("."); + var domainName = ServerSettings.ADRootDomain; + + if (index > 0) + { + domainName = ServerSettings.ADRootDomain.Substring(0, index); + } + + foreach (var hostName in hosts) + { + if (!CheckLocalAdminsGroupExists(hostName, runspace)) + { + var errors = CreateLocalAdministratorsGroup(hostName, runspace); + + if (errors.Any()) + { + Log.WriteWarning(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray())); + throw new Exception(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray())); + } + } + + var existingAdmins = GetExistingLocalAdmins(hostName, runspace).Select(e => e.ToLower()); + var formUsers = users.Select(u => string.Format("{0}\\{1}", domainName, u.SamAccountName).ToLower()); + var newUsers = users.Where(u => !existingAdmins.Contains(string.Format("{0}\\{1}", domainName, u.SamAccountName).ToLower())); + var removedUsers = existingAdmins.Where(e => !formUsers.Contains(e)); + + foreach (var user in newUsers) + { + AddNewLocalAdmin(hostName, user.SamAccountName, runspace); + } + + foreach (var user in removedUsers) + { + RemoveLocalAdmin(hostName, user, runspace); + } + + AddHelpDeskAdminsGroupToLocalAdmins(runspace, hostName); + } + } + finally + { + CloseRunspace(runspace); + } + } + + public List GetRdsCollectionLocalAdmins(string hostName) + { + Runspace runspace = null; + var result = new List(); + + try + { + runspace = OpenRunspace(); + + if (CheckLocalAdminsGroupExists(hostName, runspace)) + { + result = GetExistingLocalAdmins(hostName, runspace); + } + } + finally + { + CloseRunspace(runspace); + } + + return result; + } + + private bool CheckLocalAdminsGroupExists(string hostName, Runspace runspace) + { + var scripts = new List + { + string.Format("net localgroup {0}", WspAdministratorsGroupName) + }; + + object[] errors = null; + var result = ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors); + + if (!errors.Any()) + { + return true; + } + + return false; + } + + private object[] CreateLocalAdministratorsGroup(string hostName, Runspace runspace) + { + var scripts = new List + { + string.Format("$cn = [ADSI]\"WinNT://{0}\"", hostName), + string.Format("$group = $cn.Create(\"Group\", \"{0}\")", WspAdministratorsGroupName), + "$group.setinfo()", + string.Format("$group.description = \"{0}\"", WspAdministratorsGroupDescription), + "$group.setinfo()" + }; + + object[] errors = null; + ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors); + + if (!errors.Any()) + { + scripts = new List + { + string.Format("$GroupObj = [ADSI]\"WinNT://{0}/Administrators\"", hostName), + string.Format("$GroupObj.Add(\"WinNT://{0}/{1}\")", hostName.ToLower().Replace(string.Format(".{0}", ServerSettings.ADRootDomain.ToLower()), ""), WspAdministratorsGroupName) + }; + + errors = null; + ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors); + } + + return errors; + } + + private List GetExistingLocalAdmins(string hostName, Runspace runspace) + { + var result = new List(); + + var scripts = new List + { + string.Format("net localgroup {0} | select -skip 6", WspAdministratorsGroupName) + }; + + object[] errors = null; + var exitingAdmins = ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors); + + if (!errors.Any()) + { + foreach(var user in exitingAdmins.Take(exitingAdmins.Count - 2)) + { + result.Add(user.ToString()); + } + } + + return result; + } + + private object[] AddNewLocalAdmin(string hostName, string samAccountName, Runspace runspace) + { + var scripts = new List + { + string.Format("$GroupObj = [ADSI]\"WinNT://{0}/{1}\"", hostName, WspAdministratorsGroupName), + string.Format("$GroupObj.Add(\"WinNT://{0}/{1}\")", ServerSettings.ADRootDomain, samAccountName) + }; + + object[] errors = null; + ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors); + + return errors; + } + + private object[] RemoveLocalAdmin(string hostName, string user, Runspace runspace) + { + var userObject = user.Split('\\'); + + var scripts = new List + { + string.Format("$GroupObj = [ADSI]\"WinNT://{0}/{1}\"", hostName, WspAdministratorsGroupName), + string.Format("$GroupObj.Remove(\"WinNT://{0}/{1}\")", userObject[0], userObject[1]) + }; + + object[] errors = null; + ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors); + + return errors; + } + + #endregion + + #region RDS Help Desk + + private string GetHelpDeskGroupPath(string groupName) + { + StringBuilder sb = new StringBuilder(); + + AppendProtocol(sb); + AppendDomainController(sb); + AppendCNPath(sb, groupName); + AppendOUPath(sb, RootOU); + AppendDomainPath(sb, RootDomain); + + return sb.ToString(); + } + + private void CheckOrCreateHelpDeskComputerGroup() + { + if (!ActiveDirectoryUtils.AdObjectExists(GetHelpDeskGroupPath(RDSHelpDeskComputerGroup))) + { + ActiveDirectoryUtils.CreateGroup(GetRootOUPath(), RDSHelpDeskComputerGroup); + } + } + + private void AddHelpDeskAdminsGroupToLocalAdmins(Runspace runspace, string hostName) + { + var helpDeskAdminsGroupPath = GetHelpDeskGroupPath(RDSHelpDeskGroup); + DirectoryEntry groupEntry = null; + + if (!ActiveDirectoryUtils.AdObjectExists(helpDeskAdminsGroupPath)) + { + ActiveDirectoryUtils.CreateGroup(GetRootOUPath(), RDSHelpDeskGroup); + groupEntry = ActiveDirectoryUtils.GetADObject(helpDeskAdminsGroupPath); + + if (groupEntry.Properties.Contains("Description")) + { + groupEntry.Properties["Description"][0] = RDSHelpDeskGroupDescription; + } + else + { + groupEntry.Properties["Description"].Add(RDSHelpDeskGroupDescription); + } + + groupEntry.CommitChanges(); + } + + if (groupEntry == null) + { + groupEntry = ActiveDirectoryUtils.GetADObject(helpDeskAdminsGroupPath); + } + + var samAccountName = ActiveDirectoryUtils.GetADObjectProperty(groupEntry, "sAMAccountName"); + + var scripts = new List + { + string.Format("$GroupObj = [ADSI]\"WinNT://{0}/{1}\"", hostName, WspAdministratorsGroupName), + string.Format("$GroupObj.Add(\"WinNT://{0}/{1}\")", ServerSettings.ADRootDomain, samAccountName) + }; + + object[] errors = null; + ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors); + } + + #endregion + + #region SSL + + public void InstallCertificate(byte[] certificate, string password, List hostNames) + { + Runspace runspace = null; + + try + { + var guid = Guid.NewGuid(); + var x509Cert = new X509Certificate2(certificate, password, X509KeyStorageFlags.Exportable); + //var content = x509Cert.Export(X509ContentType.Pfx); + var filePath = SaveCertificate(certificate, guid); + runspace = OpenRunspace(); + + foreach (var hostName in hostNames) + { + var destinationPath = string.Format("\\\\{0}\\c$\\{1}.pfx", hostName, guid); + var errors = CopyCertificateFile(runspace, filePath, destinationPath); + + if (!errors.Any()) + { + errors = ImportCertificate(runspace, hostName, password, string.Format("c:\\{0}.pfx", guid), x509Cert.Thumbprint); + } + + DeleteCertificateFile(destinationPath, runspace); + + if (errors.Any()) + { + Log.WriteWarning(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray())); + throw new Exception(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray())); + } + } + + if (File.Exists(filePath)) + { + File.Delete(filePath); + } + } + finally + { + CloseRunspace(runspace); + } + } + + private object[] ImportCertificate(Runspace runspace, string hostName, string password, string certificatePath, string thumbprint) + { + var scripts = new List + { + string.Format("$mypwd = ConvertTo-SecureString -String {0} -Force –AsPlainText", password), + string.Format("Import-PfxCertificate –FilePath \"{0}\" cert:\\localMachine\\my -Password $mypwd", certificatePath), + string.Format("$cert = Get-Item cert:\\LocalMachine\\My\\{0}", thumbprint), + string.Format("$path = (Get-WmiObject -class \"Win32_TSGeneralSetting\" -Namespace root\\cimv2\\terminalservices -Filter \"TerminalName='RDP-tcp'\").__path"), + string.Format("Set-WmiInstance -Path $path -argument @{0}", string.Format("{{SSLCertificateSHA1Hash=\"{0}\"}}", thumbprint)) + }; + + object[] errors = null; + ExecuteRemoteShellCommand(runspace, hostName, scripts, out errors); + + return errors; + } + + private string SaveCertificate(byte[] certificate, Guid guid) + { + var filePath = string.Format("{0}{1}.pfx", Path.GetTempPath(), guid); + + if (File.Exists(filePath)) + { + File.Delete(filePath); + } + + File.WriteAllBytes(filePath, certificate); + + return filePath; + } + + private object[] CopyCertificateFile(Runspace runspace, string filePath, string destinationPath) + { + var scripts = new List + { + string.Format("Copy-Item \"{0}\" -Destination \"{1}\" -Force", filePath, destinationPath) + }; + + object[] errors = null; + ExecuteShellCommand(runspace, scripts, out errors); + + return errors; + } + + private object[] DeleteCertificateFile(string destinationPath, Runspace runspace) + { + var scripts = new List + { + string.Format("Remove-Item -Path \"{0}\" -Force", destinationPath) + }; + + object[] errors = null; + ExecuteShellCommand(runspace, scripts, out errors); + + return errors; + } + + #endregion + private void AddRdsServerToDeployment(Runspace runSpace, RdsServer server) { Command cmd = new Command("Add-RDserver"); @@ -956,9 +1329,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices cmd.Parameters.Add("ConnectionBroker", ConnectionBroker); ExecuteShellCommand(runSpace, cmd, false); - } - - + } private bool ExistRdsServerInDeployment(Runspace runSpace, RdsServer server) { @@ -1028,7 +1399,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices } return users; - } + } private void AddUserGroupsToCollection(Runspace runSpace, string collectionName, List groups) { @@ -1043,7 +1414,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices private void AddComputerToCollectionAdComputerGroup(string organizationId, string collectionName, RdsServer server) { var computerPath = GetComputerPath(server.Name, false); - var computerGroupName = GetComputersGroupName( collectionName); + var computerGroupName = GetComputersGroupName( collectionName); if (!ActiveDirectoryUtils.AdObjectExists(computerPath)) { @@ -1059,6 +1430,11 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { ActiveDirectoryUtils.AddObjectToGroup(computerPath, GetComputerGroupPath(organizationId, collectionName)); } + + if (!ActiveDirectoryUtils.IsComputerInGroup(samName, RDSHelpDeskComputerGroup)) + { + ActiveDirectoryUtils.AddObjectToGroup(computerPath, GetHelpDeskGroupPath(RDSHelpDeskComputerGroup)); + } } SetRDServerNewConnectionAllowed(false, server); @@ -1083,6 +1459,14 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { ActiveDirectoryUtils.RemoveObjectFromGroup(computerPath, GetComputerGroupPath(organizationId, collectionName)); } + + if (ActiveDirectoryUtils.AdObjectExists(GetHelpDeskGroupPath(RDSHelpDeskComputerGroup))) + { + if (ActiveDirectoryUtils.IsComputerInGroup(samName, RDSHelpDeskComputerGroup)) + { + ActiveDirectoryUtils.RemoveObjectFromGroup(computerPath, GetHelpDeskGroupPath(RDSHelpDeskComputerGroup)); + } + } } } @@ -1105,6 +1489,63 @@ namespace WebsitePanel.Providers.RemoteDesktopServices return installationResult; } + public void MoveRdsServerToTenantOU(string hostName, string organizationId) + { + var tenantComputerGroupPath = GetTenantComputerGroupPath(organizationId); + + if (!ActiveDirectoryUtils.AdObjectExists(tenantComputerGroupPath)) + { + ActiveDirectoryUtils.CreateGroup(GetOrganizationPath(organizationId), RdsServersOU); + } + + hostName = hostName.ToLower().Replace(string.Format(".{0}", ServerSettings.ADRootDomain.ToLower()), ""); + var computerPath = GetComputerPath(hostName, true); + + if(!ActiveDirectoryUtils.AdObjectExists(computerPath)) + { + computerPath = GetComputerPath(hostName, false); + } + + if (ActiveDirectoryUtils.AdObjectExists(computerPath)) + { + var computerObject = ActiveDirectoryUtils.GetADObject(computerPath); + var samName = (string)ActiveDirectoryUtils.GetADObjectProperty(computerObject, "sAMAccountName"); + + if (!ActiveDirectoryUtils.IsComputerInGroup(samName, RdsServersOU)) + { + DirectoryEntry group = new DirectoryEntry(tenantComputerGroupPath); + group.Invoke("Add", computerObject.Path); + + group.CommitChanges(); + } + } + } + + public void RemoveRdsServerFromTenantOU(string hostName, string organizationId) + { + var tenantComputerGroupPath = GetTenantComputerGroupPath(organizationId); + hostName = hostName.ToLower().Replace(string.Format(".{0}", ServerSettings.ADRootDomain.ToLower()), ""); + var tenantComputerPath = GetTenantComputerPath(hostName, organizationId); + + var computerPath = GetComputerPath(hostName, true); + + if (!ActiveDirectoryUtils.AdObjectExists(computerPath)) + { + computerPath = GetComputerPath(hostName, false); + } + + if (ActiveDirectoryUtils.AdObjectExists(computerPath)) + { + var computerObject = ActiveDirectoryUtils.GetADObject(computerPath); + var samName = (string)ActiveDirectoryUtils.GetADObjectProperty(computerObject, "sAMAccountName"); + + if (ActiveDirectoryUtils.IsComputerInGroup(samName, RdsServersOU)) + { + ActiveDirectoryUtils.RemoveObjectFromGroup(computerPath, tenantComputerGroupPath); + } + } + } + public bool CheckSessionHostFeatureInstallation(string hostName) { bool isInstalled = false; @@ -1216,11 +1657,18 @@ namespace WebsitePanel.Providers.RemoteDesktopServices DisplayName = Convert.ToString(GetPSObjectProperty(psObject, "DisplayName")), FilePath = Convert.ToString(GetPSObjectProperty(psObject, "FilePath")), Alias = Convert.ToString(GetPSObjectProperty(psObject, "Alias")), - ShowInWebAccess = Convert.ToBoolean(GetPSObjectProperty(psObject, "ShowInWebAccess")) + ShowInWebAccess = Convert.ToBoolean(GetPSObjectProperty(psObject, "ShowInWebAccess")), + Users = null }; var requiredCommandLine = GetPSObjectProperty(psObject, "RequiredCommandLine"); remoteApp.RequiredCommandLine = requiredCommandLine == null ? null : requiredCommandLine.ToString(); + var users = (string[])(GetPSObjectProperty(psObject, "UserGroups")); + + if (users != null && users.Any()) + { + remoteApp.Users = users; + } return remoteApp; } @@ -1293,7 +1741,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices internal string GetComputerGroupPath(string organizationId, string collection) { StringBuilder sb = new StringBuilder(); - // append provider + AppendProtocol(sb); AppendDomainController(sb); AppendCNPath(sb, GetComputersGroupName(collection)); @@ -1302,16 +1750,16 @@ namespace WebsitePanel.Providers.RemoteDesktopServices AppendDomainPath(sb, RootDomain); return sb.ToString(); - } + } internal string GetUsersGroupPath(string organizationId, string collection) { StringBuilder sb = new StringBuilder(); - // append provider + AppendProtocol(sb); AppendDomainController(sb); AppendCNPath(sb, GetUsersGroupName(collection)); - AppendOUPath(sb, organizationId); + AppendOUPath(sb, organizationId); AppendOUPath(sb, RootOU); AppendDomainPath(sb, RootDomain); @@ -1332,6 +1780,18 @@ namespace WebsitePanel.Providers.RemoteDesktopServices return sb.ToString(); } + private string GetRootOUPath() + { + StringBuilder sb = new StringBuilder(); + // append provider + AppendProtocol(sb); + AppendDomainController(sb); + AppendOUPath(sb, RootOU); + AppendDomainPath(sb, RootDomain); + + return sb.ToString(); + } + private string GetOrganizationPath(string organizationId) { StringBuilder sb = new StringBuilder(); @@ -1350,7 +1810,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices StringBuilder sb = new StringBuilder(); // append provider AppendProtocol(sb); - AppendDomainController(sb); + AppendDomainController(sb); AppendCNPath(sb, objName); if (domainController) { @@ -1366,6 +1826,35 @@ namespace WebsitePanel.Providers.RemoteDesktopServices return sb.ToString(); } + private string GetTenantComputerPath(string objName, string organizationId) + { + StringBuilder sb = new StringBuilder(); + + AppendProtocol(sb); + AppendDomainController(sb); + AppendCNPath(sb, objName); + AppendCNPath(sb, RdsServersOU); + AppendOUPath(sb, organizationId); + AppendOUPath(sb, RootOU); + AppendDomainPath(sb, RootDomain); + + return sb.ToString(); + } + + internal string GetTenantComputerGroupPath(string organizationId) + { + StringBuilder sb = new StringBuilder(); + + AppendProtocol(sb); + AppendDomainController(sb); + AppendCNPath(sb, RdsServersOU); + AppendOUPath(sb, organizationId); + AppendOUPath(sb, RootOU); + AppendDomainPath(sb, RootDomain); + + return sb.ToString(); + } + private static void AppendCNPath(StringBuilder sb, string organizationId) { if (string.IsNullOrEmpty(organizationId)) @@ -1550,7 +2039,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices return ExecuteShellCommand(runSpace, invokeCommand, false, out errors); } - internal Collection ExecuteRemoteShellCommand(Runspace runSpace, string hostName, List scripts, params string[] moduleImports) + internal Collection ExecuteRemoteShellCommand(Runspace runSpace, string hostName, List scripts, out object[] errors, params string[] moduleImports) { Command invokeCommand = new Command("Invoke-Command"); invokeCommand.Parameters.Add("ComputerName", hostName); @@ -1564,7 +2053,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices invokeCommand.Parameters.Add("ScriptBlock", sb); - return ExecuteShellCommand(runSpace, invokeCommand, false); + return ExecuteShellCommand(runSpace, invokeCommand, false, out errors); } internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd) @@ -1801,18 +2290,22 @@ namespace WebsitePanel.Providers.RemoteDesktopServices cmd.Parameters.Add("CollectionName", collectionName); cmd.Parameters.Add("ConnectionBroker", ConnectionBroker); var userSessions = ExecuteShellCommand(runSpace, cmd, false, out errors); - var properties = typeof(RdsUserSession).GetProperties(); + var properties = typeof(RdsUserSession).GetProperties(); foreach(var userSession in userSessions) { - var session = new RdsUserSession(); - - foreach(var prop in properties) + var session = new RdsUserSession { - prop.SetValue(session, GetPSObjectProperty(userSession, prop.Name).ToString(), null); - } - - session.UserName = GetUserFullName(session.DomainName, session.UserName, runSpace); + CollectionName = GetPSObjectProperty(userSession, "CollectionName").ToString(), + DomainName = GetPSObjectProperty(userSession, "DomainName").ToString(), + HostServer = GetPSObjectProperty(userSession, "HostServer").ToString(), + SessionState = GetPSObjectProperty(userSession, "SessionState").ToString(), + UnifiedSessionId = GetPSObjectProperty(userSession, "UnifiedSessionId").ToString(), + SamAccountName = GetPSObjectProperty(userSession, "UserName").ToString(), + }; + + session.IsVip = false; + session.UserName = GetUserFullName(session.DomainName, session.SamAccountName, runSpace); result.Add(session); } @@ -1835,6 +2328,238 @@ namespace WebsitePanel.Providers.RemoteDesktopServices } #endregion + + #region Server Info + + public RdsServerInfo GetRdsServerInfo(string serverName) + { + var result = new RdsServerInfo(); + Runspace runspace = null; + + try + { + runspace = OpenRunspace(); + result = GetServerInfo(runspace, serverName); + result.Status = GetRdsServerStatus(runspace, serverName); + + } + finally + { + CloseRunspace(runspace); + } + + return result; + } + + public string GetRdsServerStatus(string serverName) + { + string result = ""; + Runspace runspace = null; + + try + { + runspace = OpenRunspace(); + result = GetRdsServerStatus(runspace, serverName); + + } + finally + { + CloseRunspace(runspace); + } + + return result; + } + + public void ShutDownRdsServer(string serverName) + { + Runspace runspace = null; + + try + { + runspace = OpenRunspace(); + var command = new Command("Stop-Computer"); + command.Parameters.Add("ComputerName", serverName); + command.Parameters.Add("Force", true); + object[] errors = null; + + ExecuteShellCommand(runspace, command, false, out errors); + + if (errors.Any()) + { + Log.WriteWarning(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray())); + throw new Exception(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray())); + } + } + finally + { + CloseRunspace(runspace); + } + } + + public void RestartRdsServer(string serverName) + { + Runspace runspace = null; + + try + { + runspace = OpenRunspace(); + var command = new Command("Restart-Computer"); + command.Parameters.Add("ComputerName", serverName); + command.Parameters.Add("Force", true); + object[] errors = null; + + ExecuteShellCommand(runspace, command, false, out errors); + + if (errors.Any()) + { + Log.WriteWarning(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray())); + throw new Exception(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray())); + } + } + finally + { + CloseRunspace(runspace); + } + } + + private RdsServerInfo GetServerInfo(Runspace runspace, string serverName) + { + var result = new RdsServerInfo(); + Command cmd = new Command("Get-WmiObject"); + cmd.Parameters.Add("Class", "Win32_Processor"); + cmd.Parameters.Add("ComputerName", serverName); + + object[] errors = null; + var psProcInfo = ExecuteShellCommand(runspace, cmd, false, out errors).First(); + + if (errors.Any()) + { + Log.WriteWarning(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray())); + return result; + } + + cmd = new Command("Get-WmiObject"); + cmd.Parameters.Add("Class", "Win32_OperatingSystem"); + cmd.Parameters.Add("ComputerName", serverName); + + var psMemoryInfo = ExecuteShellCommand(runspace, cmd, false, out errors).First(); + + if (errors.Any()) + { + Log.WriteWarning(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray())); + return result; + } + + result.NumberOfCores = Convert.ToInt32(GetPSObjectProperty(psProcInfo, "NumberOfCores")); + result.MaxClockSpeed = Convert.ToInt32(GetPSObjectProperty(psProcInfo, "MaxClockSpeed")); + result.LoadPercentage = Convert.ToInt32(GetPSObjectProperty(psProcInfo, "LoadPercentage")); + result.MemoryAllocatedMb = Math.Round(Convert.ToDouble(GetPSObjectProperty(psMemoryInfo, "TotalVisibleMemorySize")) / 1024, 1); + result.FreeMemoryMb = Math.Round(Convert.ToDouble(GetPSObjectProperty(psMemoryInfo, "FreePhysicalMemory")) / 1024, 1); + result.Drives = GetRdsServerDriveInfo(runspace, serverName).ToArray(); + + return result; + } + + private string GetRdsServerStatus (Runspace runspace, string serverName) + { + if (CheckServerAvailability(serverName)) + { + if (CheckPendingReboot(runspace, serverName)) + { + return "Online - Pending Reboot"; + } + + return "Online"; + } + else + { + return "Unavailable"; + } + } + + private List GetRdsServerDriveInfo(Runspace runspace, string serverName) + { + var result = new List(); + Command cmd = new Command("Get-WmiObject"); + cmd.Parameters.Add("Class", "Win32_LogicalDisk"); + cmd.Parameters.Add("Filter", "DriveType=3"); + cmd.Parameters.Add("ComputerName", serverName); + object[] errors = null; + var psDrives = ExecuteShellCommand(runspace, cmd, false, out errors); + + if (errors.Any()) + { + Log.WriteWarning(string.Join("\r\n", errors.Select(e => e.ToString()).ToArray())); + return result; + } + + foreach (var psDrive in psDrives) + { + var driveInfo = new RdsServerDriveInfo() + { + VolumeName = GetPSObjectProperty(psDrive, "VolumeName").ToString(), + DeviceId = GetPSObjectProperty(psDrive, "DeviceId").ToString(), + SizeMb = Math.Round(Convert.ToDouble(GetPSObjectProperty(psDrive, "Size"))/1024/1024, 1), + FreeSpaceMb = Math.Round(Convert.ToDouble(GetPSObjectProperty(psDrive, "FreeSpace"))/1024/1024, 1) + }; + + result.Add(driveInfo); + } + + return result; + } + + private bool CheckRDSServerAvaliability(string serverName) + { + var ping = new Ping(); + var reply = ping.Send(serverName, 1000); + + if (reply.Status == IPStatus.Success) + { + return true; + } + + return false; + } + + private bool CheckPendingReboot(Runspace runspace, string serverName) + { + if (CheckPendingReboot(runspace, serverName, @"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing", "RebootPending")) + { + return true; + } + + if (CheckPendingReboot(runspace, serverName, @"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update", "RebootRequired")) + { + return true; + } + + if (CheckPendingReboot(runspace, serverName, @"HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager", "PendingFileRenameOperations")) + { + return true; + } + + return false; + } + + private bool CheckPendingReboot(Runspace runspace, string serverName, string registryPath, string registryKey) + { + Command cmd = new Command("Get-ItemProperty"); + cmd.Parameters.Add("Path", registryPath); + cmd.Parameters.Add("Name", registryKey); + cmd.Parameters.Add("ErrorAction", "SilentlyContinue"); + + var feature = ExecuteRemoteShellCommand(runspace, serverName, cmd).FirstOrDefault(); + + if (feature != null) + { + return true; + } + + return false; + } + + #endregion } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/Extensions/PSObjectExtension.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/Extensions/PSObjectExtension.cs new file mode 100644 index 00000000..e1a50bfa --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/Extensions/PSObjectExtension.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using System.Threading.Tasks; + +namespace WebsitePanel.Providers.Virtualization +{ + static class PSObjectExtension + { + public static object GetProperty(this PSObject obj, string name) + { + return obj.Members[name].Value; + } + public static T GetProperty(this PSObject obj, string name) + { + return (T)obj.Members[name].Value; + } + public static T GetEnum(this PSObject obj, string name) where T : struct + { + return (T)Enum.Parse(typeof(T), GetProperty(obj, name).ToString()); + } + public static int GetInt(this PSObject obj, string name) + { + return Convert.ToInt32(obj.Members[name].Value); + } + public static long GetLong(this PSObject obj, string name) + { + return Convert.ToInt64(obj.Members[name].Value); + } + public static string GetString(this PSObject obj, string name) + { + return obj.Members[name].Value == null ? "" : obj.Members[name].Value.ToString(); + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/Helpers/DvdDriveHelper.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/Helpers/DvdDriveHelper.cs new file mode 100644 index 00000000..871e8fa3 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/Helpers/DvdDriveHelper.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using System.Management.Automation.Runspaces; +using System.Text; +using System.Threading.Tasks; + +namespace WebsitePanel.Providers.Virtualization +{ + public static class DvdDriveHelper + { + public static DvdDriveInfo Get(PowerShellManager powerShell, string vmName) + { + DvdDriveInfo info = new DvdDriveInfo(); + + Command cmd = new Command("Get-VMDvdDrive"); + + cmd.Parameters.Add("VMName", vmName); + + Collection result = powerShell.Execute(cmd, false); + + if (result != null && result.Count > 0) + { + info.Id = result[0].GetString("Id"); + info.Name = result[0].GetString("Name"); + info.ControllerType = result[0].GetEnum("ControllerType"); + info.ControllerNumber = result[0].GetInt("ControllerNumber"); + info.ControllerLocation = result[0].GetInt("ControllerLocation"); + } + return info; + } + + public static void Set(PowerShellManager powerShell, string vmName, string path) + { + var dvd = Get(powerShell, vmName); + + Command cmd = new Command("Set-VMDvdDrive"); + + cmd.Parameters.Add("VMName", vmName); + cmd.Parameters.Add("Path", path); + cmd.Parameters.Add("ControllerNumber", dvd.ControllerNumber); + cmd.Parameters.Add("ControllerLocation", dvd.ControllerLocation); + + powerShell.Execute(cmd, false); + } + + public static void Update(PowerShellManager powerShell, VirtualMachine vm, bool dvdDriveShouldBeInstalled) + { + if (!vm.DvdDriveInstalled && dvdDriveShouldBeInstalled) + Add(powerShell, vm.Name); + else if (vm.DvdDriveInstalled && !dvdDriveShouldBeInstalled) + Remove(powerShell, vm.Name); + } + + public static void Add(PowerShellManager powerShell, string vmName) + { + var dvd = Get(powerShell, vmName); + + Command cmd = new Command("Add-VMDvdDrive"); + + cmd.Parameters.Add("VMName", vmName); + cmd.Parameters.Add("ControllerNumber", dvd.ControllerNumber); + cmd.Parameters.Add("ControllerLocation", dvd.ControllerLocation); + + powerShell.Execute(cmd, false); + } + + public static void Remove(PowerShellManager powerShell, string vmName) + { + var dvd = Get(powerShell, vmName); + + Command cmd = new Command("Remove-VMDvdDrive"); + + cmd.Parameters.Add("VMName", vmName); + cmd.Parameters.Add("ControllerNumber", dvd.ControllerNumber); + cmd.Parameters.Add("ControllerLocation", dvd.ControllerLocation); + + powerShell.Execute(cmd, false); + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/Helpers/NetworkAdapterHelper.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/Helpers/NetworkAdapterHelper.cs new file mode 100644 index 00000000..c00ff956 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/Helpers/NetworkAdapterHelper.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using System.Management.Automation.Runspaces; +using System.Text; +using System.Threading.Tasks; + +namespace WebsitePanel.Providers.Virtualization +{ + public static class NetworkAdapterHelper + { + #region Constants + + private const string EXTERNAL_NETWORK_ADAPTER_NAME = "External Network Adapter"; + private const string PRIVATE_NETWORK_ADAPTER_NAME = "Private Network Adapter"; + private const string MANAGEMENT_NETWORK_ADAPTER_NAME = "Management Network Adapter"; + + #endregion + + public static VirtualMachineNetworkAdapter[] Get(PowerShellManager powerShell, string vmName) + { + List adapters = new List(); + + Command cmd = new Command("Get-VMNetworkAdapter"); + if (!string.IsNullOrEmpty(vmName)) cmd.Parameters.Add("VMName", vmName); + + Collection result = powerShell.Execute(cmd, false); + if (result != null && result.Count > 0) + { + foreach (PSObject psAdapter in result) + { + VirtualMachineNetworkAdapter adapter = new VirtualMachineNetworkAdapter(); + + adapter.Name = psAdapter.GetString("Name"); + adapter.MacAddress = psAdapter.GetString("MacAddress"); + adapter.SwitchName = psAdapter.GetString("SwitchName"); + + adapters.Add(adapter); + } + } + return adapters.ToArray(); + } + + public static VirtualMachineNetworkAdapter Get(PowerShellManager powerShell, string vmName, string macAddress) + { + var adapters = Get(powerShell, vmName); + return adapters.FirstOrDefault(a => a.MacAddress == macAddress); + } + + public static void Update(PowerShellManager powerShell, VirtualMachine vm, string switchId, string portName, string macAddress, string adapterName, bool legacyAdapter) + { + // External NIC + if (!vm.ExternalNetworkEnabled && !String.IsNullOrEmpty(vm.ExternalNicMacAddress)) + { + // delete adapter + Delete(powerShell, vm.Name, vm.ExternalNicMacAddress); + vm.ExternalNicMacAddress = null; // reset MAC + } + else if (vm.ExternalNetworkEnabled && !String.IsNullOrEmpty(vm.ExternalNicMacAddress)) + { + // add external adapter + Add(powerShell, vm.Name, vm.ExternalSwitchId, vm.ExternalNicMacAddress, EXTERNAL_NETWORK_ADAPTER_NAME, vm.LegacyNetworkAdapter); + } + + // Private NIC + if (!vm.PrivateNetworkEnabled && !String.IsNullOrEmpty(vm.PrivateNicMacAddress)) + { + Delete(powerShell, vm.Name, vm.PrivateNicMacAddress); + vm.PrivateNicMacAddress = null; // reset MAC + } + else if (vm.PrivateNetworkEnabled && !String.IsNullOrEmpty(vm.PrivateNicMacAddress)) + { + Add(powerShell, vm.Name, vm.ExternalSwitchId, vm.ExternalNicMacAddress, PRIVATE_NETWORK_ADAPTER_NAME, vm.LegacyNetworkAdapter); + } + } + + public static void Add(PowerShellManager powerShell, string vmName, string switchId, string macAddress, string adapterName, bool legacyAdapter) + { + //var dvd = Get(powerShell, vmName); + + //Command cmd = new Command("Add-VMDvdDrive"); + + //cmd.Parameters.Add("VMName", vmName); + //cmd.Parameters.Add("ControllerNumber", dvd.ControllerNumber); + //cmd.Parameters.Add("ControllerLocation", dvd.ControllerLocation); + + //powerShell.Execute(cmd, false); + } + public static void Delete(PowerShellManager powerShell, string vmName, string macAddress) + { + //var dvd = Get(powerShell, vmName); + + //Command cmd = new Command("Add-VMDvdDrive"); + + //cmd.Parameters.Add("VMName", vmName); + //cmd.Parameters.Add("ControllerNumber", dvd.ControllerNumber); + //cmd.Parameters.Add("ControllerLocation", dvd.ControllerLocation); + + //powerShell.Execute(cmd, false); + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/Helpers/VirtualMachineHelper.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/Helpers/VirtualMachineHelper.cs new file mode 100644 index 00000000..66958337 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/Helpers/VirtualMachineHelper.cs @@ -0,0 +1,195 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using System.Management.Automation.Runspaces; +using System.Text; +using System.Threading.Tasks; + +namespace WebsitePanel.Providers.Virtualization +{ + public static class VirtualMachineHelper + { + #region Constants + + private const Int64 Size1G = 0x40000000; + private const Int64 Size1M = 0x100000; + + #endregion + + public static OperationalStatus GetVMHeartBeatStatus(PowerShellManager powerShell, string name) + { + + OperationalStatus status = OperationalStatus.None; + + Command cmd = new Command("Get-VMIntegrationService"); + + cmd.Parameters.Add("VMName", name); + cmd.Parameters.Add("Name", "HeartBeat"); + + Collection result = powerShell.Execute(cmd, false); + if (result != null && result.Count > 0) + { + var statusString = result[0].GetProperty("PrimaryOperationalStatus"); + + if (statusString != null) + status = (OperationalStatus)Enum.Parse(typeof(OperationalStatus), statusString.ToString()); + } + return status; + } + + + public static int GetVMProcessors(PowerShellManager powerShell, string name) + { + + int procs = 0; + + Command cmd = new Command("Get-VMProcessor"); + + cmd.Parameters.Add("VMName", name); + + Collection result = powerShell.Execute(cmd, false); + if (result != null && result.Count > 0) + { + procs = Convert.ToInt32(result[0].GetProperty("Count")); + + } + return procs; + } + + public static MemoryInfo GetVMMemory(PowerShellManager powerShell, string name) + { + MemoryInfo info = new MemoryInfo(); + + Command cmd = new Command("Get-VMMemory"); + + cmd.Parameters.Add("VMName", name); + + Collection result = powerShell.Execute(cmd, false); + if (result != null && result.Count > 0) + { + info.DynamicMemoryEnabled = Convert.ToBoolean(result[0].GetProperty("DynamicMemoryEnabled")); + info.Startup = Convert.ToInt64(result[0].GetProperty("Startup")); + info.Minimum = Convert.ToInt64(result[0].GetProperty("Minimum")); + info.Maximum = Convert.ToInt64(result[0].GetProperty("Maximum")); + info.Buffer = Convert.ToInt32(result[0].GetProperty("Buffer")); + info.Priority = Convert.ToInt32(result[0].GetProperty("Priority")); + } + return info; + } + + public static BiosInfo GetVMBios(PowerShellManager powerShell, string name) + { + BiosInfo info = new BiosInfo(); + + Command cmd = new Command("Get-VMBios"); + + cmd.Parameters.Add("VMName", name); + + Collection result = powerShell.Execute(cmd, false); + if (result != null && result.Count > 0) + { + info.NumLockEnabled = Convert.ToBoolean(result[0].GetProperty("NumLockEnabled")); + + List startupOrders = new List(); + + foreach (var item in (IEnumerable)result[0].GetProperty("StartupOrder")) + startupOrders.Add(item.ToString()); + + info.StartupOrder = startupOrders.ToArray(); + } + return info; + } + + public static VirtualHardDiskInfo[] GetVirtualHardDisks(PowerShellManager powerShell, string name) + { + + List disks = new List(); + + Command cmd = new Command("Get-VMHardDiskDrive"); + cmd.Parameters.Add("VMName", name); + + Collection result = powerShell.Execute(cmd, false); + if (result != null && result.Count > 0) + { + foreach (PSObject d in result) + { + VirtualHardDiskInfo disk = new VirtualHardDiskInfo(); + + disk.SupportPersistentReservations = Convert.ToBoolean(d.GetProperty("SupportPersistentReservations")); + disk.MaximumIOPS = Convert.ToUInt64(d.GetProperty("MaximumIOPS")); + disk.MinimumIOPS = Convert.ToUInt64(d.GetProperty("MinimumIOPS")); + disk.VHDControllerType = d.GetEnum("ControllerType"); + disk.ControllerNumber = Convert.ToInt32(d.GetProperty("ControllerNumber")); + disk.ControllerLocation = Convert.ToInt32(d.GetProperty("ControllerLocation")); + disk.Path = d.GetProperty("Path").ToString(); + disk.Name = d.GetProperty("Name").ToString(); + + GetVirtualHardDiskDetail(powerShell, disk.Path, ref disk); + + disks.Add(disk); + } + } + return disks.ToArray(); + } + + public static void GetVirtualHardDiskDetail(PowerShellManager powerShell, string path, ref VirtualHardDiskInfo disk) + { + if (!string.IsNullOrEmpty(path)) + { + Command cmd = new Command("Get-VHD"); + cmd.Parameters.Add("Path", path); + Collection result = powerShell.Execute(cmd, false); + if (result != null && result.Count > 0) + { + disk.DiskFormat = result[0].GetEnum("VhdFormat"); + disk.DiskType = result[0].GetEnum("VhdType"); + disk.ParentPath = result[0].GetProperty("ParentPath"); + disk.MaxInternalSize = Convert.ToInt64(result[0].GetProperty("Size")) / Size1G; + disk.FileSize = Convert.ToInt64(result[0].GetProperty("FileSize")) / Size1G; + disk.Attached = Convert.ToBoolean(result[0].GetProperty("Attached")); + } + } + } + + + + + public static void UpdateBios(PowerShellManager powerShell, VirtualMachine vm, bool bootFromCD, bool numLockEnabled) + { + Command cmd = new Command("Set-VMBios"); + + cmd.Parameters.Add("VMName", vm.Name); + cmd.Parameters.Add(numLockEnabled ? "EnableNumLock" : "DisableNumLock"); + var bootOrder = bootFromCD + ? new[] { "CD", "IDE", "LegacyNetworkAdapter", "Floppy" } + : new[] { "IDE", "CD", "LegacyNetworkAdapter", "Floppy" }; + cmd.Parameters.Add("StartupOrder", bootOrder); + + powerShell.Execute(cmd, false); + } + public static void UpdateProcessors(PowerShellManager powerShell, VirtualMachine vm, int cpuCores, int cpuLimitSettings, int cpuReserveSettings, int cpuWeightSettings) + { + Command cmd = new Command("Set-VMProcessor"); + + cmd.Parameters.Add("VMName", vm.Name); + cmd.Parameters.Add("Count", cpuCores); + cmd.Parameters.Add("Maximum", Convert.ToInt64(cpuLimitSettings * 1000)); + cmd.Parameters.Add("Reserve", Convert.ToInt64(cpuReserveSettings * 1000)); + cmd.Parameters.Add("RelativeWeight", cpuWeightSettings); + + powerShell.Execute(cmd, false); + } + public static void UpdateMemory(PowerShellManager powerShell, VirtualMachine vm, long ramMB) + { + Command cmd = new Command("Set-VMMemory"); + + cmd.Parameters.Add("VMName", vm.Name); + cmd.Parameters.Add("StartupBytes", ramMB); + + powerShell.Execute(cmd, false); + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/HyperV2012R2.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/HyperV2012R2.cs index 6aa31177..2247adf7 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/HyperV2012R2.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/HyperV2012R2.cs @@ -51,6 +51,7 @@ using WebsitePanel.Server.Utils; using Vds = Microsoft.Storage.Vds; using System.Configuration; +using System.Linq; namespace WebsitePanel.Providers.Virtualization { @@ -69,8 +70,6 @@ namespace WebsitePanel.Providers.Virtualization private const string KVP_RAM_SUMMARY_KEY = "VM-RAM-Summary"; private const string KVP_HDD_SUMMARY_KEY = "VM-HDD-Summary"; - private const Int64 Size1G = 0x40000000; - private const Int64 Size1M = 0x100000; #endregion @@ -140,72 +139,73 @@ namespace WebsitePanel.Providers.Virtualization public VirtualMachine GetVirtualMachine(string vmId) { - return GetVirtualMachineInternal( vmId, false); + return GetVirtualMachineInternal(vmId, false); } - public VirtualMachine GetVirtualMachineInternal(string vmId, bool extendedInfo) + public VirtualMachine GetVirtualMachineEx(string vmId) { + return GetVirtualMachineInternal(vmId, true); + } + protected VirtualMachine GetVirtualMachineInternal(string vmId, bool extendedInfo) + { HostedSolutionLog.LogStart("GetVirtualMachine"); HostedSolutionLog.DebugInfo("Virtual Machine: {0}", vmId); - Runspace runSpace = null; VirtualMachine vm = new VirtualMachine(); try { - runSpace = OpenRunspace(); Command cmd = new Command("Get-VM"); cmd.Parameters.Add("Id", vmId); - - Collection result = ExecuteShellCommand(runSpace, cmd, false); + + Collection result = PowerShell.Execute(cmd, false); if (result != null && result.Count > 0) { - vm.Name = GetPSObjectProperty(result[0], "Name").ToString(); - vm.State = (VirtualMachineState)Enum.Parse(typeof(VirtualMachineState), GetPSObjectProperty(result[0], "State").ToString()); - vm.CpuUsage = ConvertNullableToInt32((UInt32?)GetPSObjectProperty(result[0], "CpuUsage")); - vm.RamUsage = ConvertNullableToInt32((UInt32?)GetPSObjectProperty(result[0], "MemoryAssigned")); - vm.Uptime = TimeSpan.Parse(GetPSObjectProperty(result[0], "Uptime").ToString()).Ticks; - vm.Status = GetPSObjectProperty(result[0], "Status").ToString(); - vm.ReplicationState = GetPSObjectProperty(result[0], "ReplicationState").ToString(); - - vm.Heartbeat = GetVMHeartBeatStatus(runSpace, vm.Name); + vm.Name = result[0].GetProperty("Name").ToString(); + vm.State = result[0].GetEnum("State"); + vm.CpuUsage = ConvertNullableToInt32(result[0].GetProperty("CpuUsage")); + vm.RamUsage = ConvertNullableToInt64(result[0].GetProperty("MemoryAssigned")); + vm.Uptime = Convert.ToInt64(result[0].GetProperty("UpTime").TotalMilliseconds); + vm.Status = result[0].GetProperty("Status").ToString(); + vm.ReplicationState = result[0].GetProperty("ReplicationState").ToString(); + + vm.Heartbeat = VirtualMachineHelper.GetVMHeartBeatStatus(PowerShell, vm.Name); vm.CreatedDate = DateTime.Now; if (extendedInfo) { - vm.CpuCores = GetVMProcessors(runSpace, vm.Name); + vm.CpuCores = VirtualMachineHelper.GetVMProcessors(PowerShell, vm.Name); - MemoryInfo memoryInfo = GetVMMemory(runSpace, vm.Name); + MemoryInfo memoryInfo = VirtualMachineHelper.GetVMMemory(PowerShell, vm.Name); vm.RamSize = memoryInfo.Startup; - BiosInfo biosInfo = GetVMBios(runSpace, vm.Name); + // BIOS + BiosInfo biosInfo = VirtualMachineHelper.GetVMBios(PowerShell, vm.Name); vm.NumLockEnabled = biosInfo.NumLockEnabled; vm.BootFromCD = false; if ((biosInfo.StartupOrder != null) && (biosInfo.StartupOrder.Length > 0)) vm.BootFromCD = (biosInfo.StartupOrder[0] == "CD"); - cmd = new Command("Get-VMDvdDrive"); - cmd.Parameters.Add("VMName", vm.Name); + // DVD drive + var dvdInfo = DvdDriveHelper.Get(PowerShell, vm.Name); + vm.DvdDriveInstalled = dvdInfo != null; - result = ExecuteShellCommand(runSpace, cmd, false); - vm.DvdDriveInstalled = (result != null && result.Count > 0); - - vm.Disks = GetVirtualHardDisks(runSpace, vm.Name); + // HDD + vm.Disks = VirtualMachineHelper.GetVirtualHardDisks(PowerShell, vm.Name); - if ((vm.Disks != null) & (vm.Disks.GetLength(0) > 0)) + if (vm.Disks != null && vm.Disks.GetLength(0) > 0) { vm.VirtualHardDrivePath = vm.Disks[0].Path; vm.HddSize = Convert.ToInt32(vm.Disks[0].FileSize); } - - + // network adapters + vm.Adapters = NetworkAdapterHelper.Get(PowerShell, vm.Name); } - } } catch (Exception ex) @@ -213,192 +213,52 @@ namespace WebsitePanel.Providers.Virtualization HostedSolutionLog.LogError("GetVirtualMachine", ex); throw; } - finally - { - CloseRunspace(runSpace); - } HostedSolutionLog.LogEnd("GetVirtualMachine"); return vm; } - - internal OperationalStatus GetVMHeartBeatStatus(Runspace runSpace, string name) - { - - OperationalStatus status = OperationalStatus.None; - - Command cmd = new Command("Get-VMIntegrationService"); - - cmd.Parameters.Add("VMName", name); - cmd.Parameters.Add("Name", "HeartBeat"); - - Collection result = ExecuteShellCommand(runSpace, cmd, false); - if (result != null && result.Count > 0) - { - status = (OperationalStatus)Enum.Parse(typeof(OperationalStatus), GetPSObjectProperty(result[0], "PrimaryOperationalStatus").ToString()); - } - return status; - } - - public VirtualMachine GetVirtualMachineEx(string vmId) - { - return GetVirtualMachineInternal( vmId, true); - } - - - internal int GetVMProcessors(Runspace runSpace, string name) - { - - int procs = 0; - - Command cmd = new Command("Get-VMProcessor"); - - cmd.Parameters.Add("VMName", name); - - Collection result = ExecuteShellCommand(runSpace, cmd, false); - if (result != null && result.Count > 0) - { - procs = Convert.ToInt32(GetPSObjectProperty(result[0], "Count")); - - } - return procs; - } - - internal MemoryInfo GetVMMemory(Runspace runSpace, string name) - { - - MemoryInfo info = new MemoryInfo(); - - Command cmd = new Command("Get-VMMemory"); - - cmd.Parameters.Add("VMName", name); - - Collection result = ExecuteShellCommand(runSpace, cmd, false); - if (result != null && result.Count > 0) - { - info.DynamicMemoryEnabled = Convert.ToBoolean(GetPSObjectProperty(result[0], "DynamicMemoryEnabled")); - info.Startup = Convert.ToInt32(GetPSObjectProperty(result[0], "Startup")); - info.Minimum = Convert.ToInt32(GetPSObjectProperty(result[0], "Minimum")); - info.Maximum = Convert.ToInt32(GetPSObjectProperty(result[0], "Maximum")); - info.Buffer = Convert.ToInt16(GetPSObjectProperty(result[0], "Buffer")); - info.Priority = Convert.ToInt16(GetPSObjectProperty(result[0], "Prioriy")); - } - return info; - } - - internal BiosInfo GetVMBios(Runspace runSpace, string name) - { - - BiosInfo info = new BiosInfo(); - - Command cmd = new Command("Get-VMBios"); - - cmd.Parameters.Add("VMName", name); - - Collection result = ExecuteShellCommand(runSpace, cmd, false); - if (result != null && result.Count > 0) - { - info.NumLockEnabled = Convert.ToBoolean(GetPSObjectProperty(result[0], "NumLockEnabled")); - info.StartupOrder = (string[])GetPSObjectProperty(result[0], "StartupOrder"); - } - return info; - } - - internal VirtualHardDiskInfo[] GetVirtualHardDisks(Runspace runSpace, string name) - { - - List disks = new List(); - - Command cmd = new Command("Get-VMHardDiskDrive"); - cmd.Parameters.Add("VMName", name); - - Collection result = ExecuteShellCommand(runSpace, cmd, false); - if (result != null && result.Count > 0) - { - foreach(PSObject d in result) - { - VirtualHardDiskInfo disk = new VirtualHardDiskInfo(); - - disk.SupportPersistentReservations = Convert.ToBoolean(GetPSObjectProperty(d, "SupportPersistentReservations")); - disk.MaximumIOPS= Convert.ToInt32(GetPSObjectProperty(d, "MaximumIOPS")); - disk.MinimumIOPS= Convert.ToInt32(GetPSObjectProperty(d, "MinimumIOPS")); - disk.VHDControllerType = (ControllerType)Enum.Parse(typeof(ControllerType), GetPSObjectProperty(d, "ControllerType").ToString()); - disk.ControllerNumber = Convert.ToInt16(GetPSObjectProperty(d, "ControllerNumber")); - disk.ControllerLocation = Convert.ToInt16(GetPSObjectProperty(d, "ControllerLocation")); - disk.Path = GetPSObjectProperty(d, "Path").ToString(); - disk.Name = GetPSObjectProperty(d, "Name").ToString(); - - GetVirtualHardDiskDetail(runSpace, disk.Path, ref disk); - - disks.Add(disk); - } - } - return disks.ToArray(); - } - - internal void GetVirtualHardDiskDetail(Runspace runSpace, string path, ref VirtualHardDiskInfo disk) - { - if (!string.IsNullOrEmpty(path)) - { - Command cmd = new Command("Get-VHD"); - cmd.Parameters.Add("Path", path); - Collection result = ExecuteShellCommand(runSpace, cmd, false); - if (result != null && result.Count > 0) - { - disk.DiskFormat = (VirtualHardDiskFormat)Enum.Parse(typeof(VirtualHardDiskFormat), GetPSObjectProperty(result[0], "VhdFormat").ToString()); - disk.DiskType = (VirtualHardDiskType)Enum.Parse(typeof(VirtualHardDiskType), GetPSObjectProperty(result[0], "Type").ToString()); - disk.ParentPath = GetPSObjectProperty(result[0], "ParentPath").ToString(); - disk.MaxInternalSize = Convert.ToInt32(GetPSObjectProperty(result[0], "Size")) / Size1G; - disk.FileSize = Convert.ToInt32(GetPSObjectProperty(result[0], "FileSize")) / Size1G; - disk.Attached = Convert.ToBoolean(GetPSObjectProperty(result[0], "Attached")); - } - } - } - - - /* - public VirtualMachine GetVirtualMachineExInternal(runSpace, string vmId) - { - - - - - // network adapters - List nics = new List(); - ManagementObject objVM = GetVirtualMachineObject(vmId); - - // synthetic adapters - foreach (ManagementObject objNic in wmi.GetWmiObjects("Msvm_SyntheticEthernetPortSettingData", "InstanceID like 'Microsoft:{0}%'", vmId)) - nics.Add(new VirtualMachineNetworkAdapter() { Name = (string)objNic["ElementName"], MacAddress = (string)objNic["Address"] }); - - // legacy adapters - foreach (ManagementObject objNic in wmi.GetWmiObjects("Msvm_EmulatedEthernetPortSettingData", "InstanceID like 'Microsoft:{0}%'", vmId)) - nics.Add(new VirtualMachineNetworkAdapter() { Name = (string)objNic["ElementName"], MacAddress = (string)objNic["Address"] }); - - vm.Adapters = nics.ToArray(); - - return vm; - - } - */ - public List GetVirtualMachines() { - List vms = new List(); - /* - ManagementObjectCollection objVms = wmi.ExecuteWmiQuery("select * from msvm_ComputerSystem where Name <> ElementName"); - foreach (ManagementObject objVm in objVms) - vms.Add(CreateVirtualMachineFromWmiObject(objVm)); - */ - return vms; + HostedSolutionLog.LogStart("GetVirtualMachines"); + + List vmachines = new List(); + + try + { + Command cmd = new Command("Get-VM"); + + Collection result = PowerShell.Execute(cmd, false); + foreach (PSObject current in result) + { + VirtualMachine vm = new VirtualMachine + { + VirtualMachineId = current.GetProperty("Id").ToString(), + Name = current.GetProperty("Name").ToString(), + State = (VirtualMachineState)Enum.Parse(typeof(VirtualMachineState), current.GetProperty("State").ToString()), + Uptime = Convert.ToInt64(current.GetProperty("UpTime").TotalMilliseconds) + }; + vmachines.Add(vm); + } + } + catch (Exception ex) + { + HostedSolutionLog.LogError("GetVirtualMachines", ex); + throw; + } + + HostedSolutionLog.LogEnd("GetVirtualMachines"); + return vmachines; + } public byte[] GetVirtualMachineThumbnailImage(string vmId, ThumbnailSize size) { - ManagementBaseObject objSummary = GetVirtualMachineSummaryInformation(vmId, (SummaryInformationRequest)size); - wmi.Dump(objSummary); - return GetTumbnailFromSummaryInformation(objSummary, size); + //ManagementBaseObject objSummary = GetVirtualMachineSummaryInformation(vmId, (SummaryInformationRequest)size); + //wmi.Dump(objSummary); + //return GetTumbnailFromSummaryInformation(objSummary, size); + // TODO: + return (byte[]) (new ImageConverter()).ConvertTo(new Bitmap(80, 60), typeof (byte[])); } private byte[] GetTumbnailFromSummaryInformation(ManagementBaseObject objSummary, ThumbnailSize size) @@ -508,11 +368,11 @@ namespace WebsitePanel.Providers.Virtualization vmID = (string)objVM["Name"]; // update general settings - UpdateVirtualMachineGeneralSettings(vmID, objVM, - vm.CpuCores, - vm.RamSize, - vm.BootFromCD, - vm.NumLockEnabled); + //UpdateVirtualMachineGeneralSettings(vmID, objVM, + // vm.CpuCores, + // vm.RamSize, + // vm.BootFromCD, + // vm.NumLockEnabled); // hard disks // load IDE 0 controller @@ -567,113 +427,32 @@ namespace WebsitePanel.Providers.Virtualization public VirtualMachine UpdateVirtualMachine(VirtualMachine vm) { - string vmId = vm.VirtualMachineId; + HostedSolutionLog.LogStart("UpdateVirtualMachine"); + HostedSolutionLog.DebugInfo("Virtual Machine: {0}", vm.VirtualMachineId); - // get VM object - ManagementObject objVM = GetVirtualMachineObject(vmId); + Runspace runSpace = null; - // update general settings - UpdateVirtualMachineGeneralSettings(vmId, objVM, - vm.CpuCores, - vm.RamSize, - vm.BootFromCD, - vm.NumLockEnabled); - - // check DVD drive - ManagementObject objDvdDrive = wmi.GetWmiObject( - "Msvm_ResourceAllocationSettingData", "ResourceSubType = 'Microsoft Synthetic DVD Drive'" - + " and InstanceID like 'Microsoft:{0}%' and Address = 0", vmId); - - if (vm.DvdDriveInstalled && objDvdDrive == null) - AddVirtualMachineDvdDrive(vmId, objVM); - else if (!vm.DvdDriveInstalled && objDvdDrive != null) - RemoveVirtualMachineResources(objVM, objDvdDrive); - - // External NIC - if (!vm.ExternalNetworkEnabled - && !String.IsNullOrEmpty(vm.ExternalNicMacAddress)) + try { - // delete adapter - DeleteNetworkAdapter(objVM, vm.ExternalNicMacAddress); + var realVm = GetVirtualMachine(vm.VirtualMachineId); + + VirtualMachineHelper.UpdateBios(PowerShell, realVm, vm.BootFromCD, vm.NumLockEnabled); + VirtualMachineHelper.UpdateProcessors(PowerShell, realVm, vm.CpuCores, CpuLimitSettings, CpuReserveSettings, CpuWeightSettings); + VirtualMachineHelper.UpdateMemory(PowerShell, realVm, vm.RamSize); + DvdDriveHelper.Update(PowerShell, realVm, vm.DvdDriveInstalled); - // reset MAC - vm.ExternalNicMacAddress = null; } - else if (vm.ExternalNetworkEnabled - && !String.IsNullOrEmpty(vm.ExternalNicMacAddress)) + catch (Exception ex) { - // add external adapter - AddNetworkAdapter(objVM, vm.ExternalSwitchId, vm.Name, vm.ExternalNicMacAddress, EXTERNAL_NETWORK_ADAPTER_NAME, vm.LegacyNetworkAdapter); - } - - - // Private NIC - if (!vm.PrivateNetworkEnabled - && !String.IsNullOrEmpty(vm.PrivateNicMacAddress)) - { - // delete adapter - DeleteNetworkAdapter(objVM, vm.PrivateNicMacAddress); - - // reset MAC - vm.PrivateNicMacAddress = null; - } - else if (vm.PrivateNetworkEnabled - && !String.IsNullOrEmpty(vm.PrivateNicMacAddress)) - { - // add private adapter - AddNetworkAdapter(objVM, vm.PrivateSwitchId, vm.Name, vm.PrivateNicMacAddress, PRIVATE_NETWORK_ADAPTER_NAME, vm.LegacyNetworkAdapter); + HostedSolutionLog.LogError("UpdateVirtualMachine", ex); + throw; } + HostedSolutionLog.LogEnd("UpdateVirtualMachine"); + return vm; } - private void UpdateVirtualMachineGeneralSettings(string vmId, ManagementObject objVM, int cpuCores, int ramMB, bool bootFromCD, bool numLockEnabled) - { - // request management service - ManagementObject objVmsvc = GetVirtualSystemManagementService(); - - // VM resources - List vmConfig = new List(); - - // get system settings - ManagementObject objSettings = GetVirtualMachineSettingsObject(vmId); - - // BIOS (num lock) - objSettings["BIOSNumLock"] = numLockEnabled; - - // BIOS (boot order) - // BootOrder = 0 - Boot from floppy, 1 - Boot from CD, 2 - Boot from disk, 3 - PXE Boot - objSettings["BootOrder"] = bootFromCD ? new int[] { 1, 2, 3, 0 } : new int[] { 2, 1, 3, 0 }; - - // modify machine settings - ManagementBaseObject inParams = objVmsvc.GetMethodParameters("ModifyVirtualSystem"); - inParams["ComputerSystem"] = objVM; - inParams["SystemSettingData"] = objSettings.GetText(TextFormat.CimDtd20); - ManagementBaseObject outParams = objVmsvc.InvokeMethod("ModifyVirtualSystem", inParams, null); - JobResult job = CreateJobResultFromWmiMethodResults(outParams); - - // setup CPU - ManagementObject objCpu = wmi.GetWmiObject("Msvm_ProcessorSettingData", "InstanceID Like 'Microsoft:{0}%'", vmId); - objCpu["VirtualQuantity"] = cpuCores; - objCpu["Limit"] = Convert.ToInt64(CpuLimitSettings * 1000); - objCpu["Reservation"] = Convert.ToInt64(CpuReserveSettings * 1000); - objCpu["Weight"] = CpuWeightSettings; - vmConfig.Add(objCpu.GetText(TextFormat.CimDtd20)); - - // setup RAM - ManagementObject objRam = wmi.GetWmiObject("Msvm_MemorySettingData", "InstanceID Like 'Microsoft:{0}%'", vmId); - objRam["VirtualQuantity"] = ramMB.ToString(); - objRam["Reservation"] = ramMB.ToString(); - objRam["Limit"] = ramMB.ToString(); - vmConfig.Add(objRam.GetText(TextFormat.CimDtd20)); - - // modify machine resources - inParams = objVmsvc.GetMethodParameters("ModifyVirtualSystemResources"); - inParams["ComputerSystem"] = objVM; - inParams["ResourceSettingData"] = vmConfig.ToArray(); - outParams = objVmsvc.InvokeMethod("ModifyVirtualSystemResources", inParams, null); - job = CreateJobResultFromWmiMethodResults(outParams); - } private void AddVirtualMachineDvdDrive(string vmId, ManagementObject objVM) { @@ -838,32 +617,90 @@ namespace WebsitePanel.Providers.Virtualization public JobResult ChangeVirtualMachineState(string vmId, VirtualMachineRequestedState newState) { - // target computer - ManagementObject objVm = GetVirtualMachineObject(vmId); + HostedSolutionLog.LogStart("ChangeVirtualMachineState"); + var jobResult = new JobResult(); - // get method - ManagementBaseObject inParams = objVm.GetMethodParameters("RequestStateChange"); - inParams["RequestedState"] = (Int32)newState; + var vm = GetVirtualMachine(vmId); - // invoke method - ManagementBaseObject outParams = objVm.InvokeMethod("RequestStateChange", inParams, null); - return CreateJobResultFromWmiMethodResults(outParams); + try + { + string cmdTxt; + List paramList = new List(); + + switch (newState) + { + case VirtualMachineRequestedState.Start: + cmdTxt = "Start-VM"; + break; + case VirtualMachineRequestedState.Pause: + cmdTxt = "Suspend-VM"; + break; + case VirtualMachineRequestedState.Reset: + cmdTxt = "Restart-VM"; + break; + case VirtualMachineRequestedState.Resume: + cmdTxt = "Resume-VM"; + break; + case VirtualMachineRequestedState.ShutDown: + cmdTxt = "Stop-VM"; + break; + case VirtualMachineRequestedState.TurnOff: + cmdTxt = "Stop-VM"; + paramList.Add("TurnOff"); + break; + case VirtualMachineRequestedState.Save: + cmdTxt = "Save-VM"; + break; + default: + throw new ArgumentOutOfRangeException("newState"); + } + + Command cmd = new Command(cmdTxt); + + cmd.Parameters.Add("Name", vm.Name); + //cmd.Parameters.Add("AsJob"); + paramList.ForEach(p => cmd.Parameters.Add(p)); + + PowerShell.Execute(cmd, false); + jobResult = CreateSuccessJobResult(); + } + catch (Exception ex) + { + HostedSolutionLog.LogError("ChangeVirtualMachineState", ex); + throw; + } + + HostedSolutionLog.LogEnd("ChangeVirtualMachineState"); + + return jobResult; } public ReturnCode ShutDownVirtualMachine(string vmId, bool force, string reason) { - // load virtual machine object - ManagementObject objVm = GetVirtualMachineObject(vmId); - ManagementObject objShutdown = wmi.GetRelatedWmiObject(objVm, "msvm_ShutdownComponent"); + HostedSolutionLog.LogStart("ShutDownVirtualMachine"); + ReturnCode returnCode = ReturnCode.OK; - // execute InitiateShutdown method - ManagementBaseObject inParams = objShutdown.GetMethodParameters("InitiateShutdown"); - inParams["Force"] = force; - inParams["Reason"] = reason; + var vm = GetVirtualMachine(vmId); - // invoke method - ManagementBaseObject outParams = objShutdown.InvokeMethod("InitiateShutdown", inParams, null); - return (ReturnCode)Convert.ToInt32(outParams["ReturnValue"]); + try + { + Command cmd = new Command("Stop-VM"); + + cmd.Parameters.Add("Name", vm.Name); + if (force) cmd.Parameters.Add("Force"); + //if (!string.IsNullOrEmpty(reason)) cmd.Parameters.Add("Reason", reason); + + PowerShell.Execute(cmd, false); + } + catch (Exception ex) + { + HostedSolutionLog.LogError("ShutDownVirtualMachine", ex); + throw; + } + + HostedSolutionLog.LogEnd("ShutDownVirtualMachine"); + + return returnCode; } public List GetVirtualMachineJobs(string vmId) @@ -1221,14 +1058,7 @@ namespace WebsitePanel.Providers.Virtualization #region Virtual Switches public List GetSwitches() { - List switches = new List(); - - // load wmi objects - ManagementObjectCollection objSwitches = wmi.GetWmiObjects("msvm_VirtualSwitch"); - foreach (ManagementObject objSwitch in objSwitches) - switches.Add(CreateSwitchFromWmiObject(objSwitch)); - - return switches; + return GetSwitches(null, null); } public List GetExternalSwitches(string computerName) @@ -1246,19 +1076,19 @@ namespace WebsitePanel.Providers.Virtualization try { - runSpace = OpenRunspace(); + Command cmd = new Command("Get-VMSwitch"); if (!string.IsNullOrEmpty(computerName)) cmd.Parameters.Add("ComputerName", computerName); if (!string.IsNullOrEmpty(type)) cmd.Parameters.Add("SwitchType", type); - Collection result = ExecuteShellCommand(runSpace, cmd,false); + Collection result = PowerShell.Execute(cmd,false); foreach (PSObject current in result) { VirtualSwitch sw = new VirtualSwitch(); - sw.SwitchId = GetPSObjectProperty(current, "Id").ToString(); - sw.Name = GetPSObjectProperty(current, "Name").ToString(); - sw.SwitchType = GetPSObjectProperty(current, "SwitchType").ToString(); + sw.SwitchId = current.GetProperty("Name").ToString(); + sw.Name = current.GetProperty("Name").ToString(); + sw.SwitchType = current.GetProperty("SwitchType").ToString(); switches.Add(sw); } } @@ -1267,10 +1097,6 @@ namespace WebsitePanel.Providers.Virtualization HostedSolutionLog.LogError("GetSwitches", ex); throw; } - finally - { - CloseRunspace(runSpace); - } HostedSolutionLog.LogEnd("GetSwitches"); return switches; @@ -1987,8 +1813,30 @@ exit", Convert.ToInt32(objDisk["Index"]))); #region Jobs public ConcreteJob GetJob(string jobId) { - ManagementObject objJob = wmi.GetWmiObject("CIM_ConcreteJob", "InstanceID = '{0}'", jobId); - return CreateJobFromWmiObject(objJob); + HostedSolutionLog.LogStart("GetJob"); + HostedSolutionLog.DebugInfo("jobId: {0}", jobId); + + Runspace runSpace = null; + ConcreteJob job; + + try + { + + Command cmd = new Command("Get-Job"); + + if (!string.IsNullOrEmpty(jobId)) cmd.Parameters.Add("Id", jobId); + + Collection result = PowerShell.Execute( cmd, false); + job = CreateJobFromPSObject(result); + } + catch (Exception ex) + { + HostedSolutionLog.LogError("GetJob", ex); + throw; + } + + HostedSolutionLog.LogEnd("GetJob"); + return job; } public List GetAllJobs() @@ -2254,6 +2102,35 @@ exit", Convert.ToInt32(objDisk["Index"]))); #endregion #region Private Methods + protected JobResult CreateSuccessJobResult() + { + JobResult result = new JobResult(); + + result.Job = new ConcreteJob(){JobState = ConcreteJobState.Completed}; + result.ReturnValue = ReturnCode.OK; + + return result; + } + protected JobResult CreateJobResultFromPSResults(Collection objJob) + { + if (objJob == null || objJob.Count == 0) + return null; + + JobResult result = new JobResult(); + + result.Job = CreateJobFromPSObject(objJob); + + result.ReturnValue = ReturnCode.JobStarted; + switch (result.Job.JobState) + { + case ConcreteJobState.Failed: + result.ReturnValue = ReturnCode.Failed; + break; + } + + return result; + } + protected JobResult CreateJobResultFromWmiMethodResults(ManagementBaseObject outParams) { JobResult result = new JobResult(); @@ -2337,6 +2214,36 @@ exit", Convert.ToInt32(objDisk["Index"]))); return sw; } + private ConcreteJob CreateJobFromPSObject(Collection objJob) + { + if (objJob == null || objJob.Count == 0) + return null; + + ConcreteJob job = new ConcreteJob(); + job.Id = objJob[0].GetProperty("Id").ToString(); + job.JobState = objJob[0].GetEnum("JobStateInfo"); + job.Caption = objJob[0].GetProperty("Name"); + job.Description = objJob[0].GetProperty("Command"); + job.StartTime = objJob[0].GetProperty("PSBeginTime"); + job.ElapsedTime = objJob[0].GetProperty("PSEndTime") ?? DateTime.Now; + + // PercentComplete + job.PercentComplete = 0; + var progress = (PSDataCollection)objJob[0].GetProperty("Progress"); + if (progress != null && progress.Count > 0) + job.PercentComplete = progress[0].PercentComplete; + + // Errors + var errors = (PSDataCollection)objJob[0].GetProperty("Error"); + if (errors != null && errors.Count > 0) + { + job.ErrorDescription = errors[0].ErrorDetails.Message + ". " + errors[0].ErrorDetails.RecommendedAction; + job.ErrorCode = errors[0].Exception != null ? -1 : 0; + } + + return job; + } + private ConcreteJob CreateJobFromWmiObject(ManagementBaseObject objJob) { if (objJob == null || objJob.Properties.Count == 0) @@ -2623,155 +2530,24 @@ exit", Convert.ToInt32(objDisk["Index"]))); #endregion Hyper-V Cloud #region PowerShell integration - private static InitialSessionState session = null; - internal virtual Runspace OpenRunspace() + private PowerShellManager _powerShell; + protected PowerShellManager PowerShell { - HostedSolutionLog.LogStart("OpenRunspace"); - - if (session == null) - { - session = InitialSessionState.CreateDefault(); - session.ImportPSModule(new string[] { "Hyper-V" }); - } - Runspace runSpace = RunspaceFactory.CreateRunspace(session); - // - runSpace.Open(); - // - runSpace.SessionStateProxy.SetVariable("ConfirmPreference", "none"); - HostedSolutionLog.LogEnd("OpenRunspace"); - return runSpace; + get { return _powerShell ?? (_powerShell = new PowerShellManager()); } } - internal void CloseRunspace(Runspace runspace) - { - try - { - if (runspace != null && runspace.RunspaceStateInfo.State == RunspaceState.Opened) - { - runspace.Close(); - } - } - catch (Exception ex) - { - HostedSolutionLog.LogError("Runspace error", ex); - } - } - - internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd) - { - return ExecuteShellCommand(runSpace, cmd, true); - } - - internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController) - { - object[] errors; - return ExecuteShellCommand(runSpace, cmd, useDomainController, out errors); - } - - internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd, out object[] errors) - { - return ExecuteShellCommand(runSpace, cmd, true, out errors); - } - - internal Collection ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController, out object[] errors) - { - HostedSolutionLog.LogStart("ExecuteShellCommand"); - List errorList = new List(); - - HostedSolutionLog.DebugCommand(cmd); - Collection results = null; - // Create a pipeline - Pipeline pipeLine = runSpace.CreatePipeline(); - using (pipeLine) - { - // Add the command - pipeLine.Commands.Add(cmd); - // Execute the pipeline and save the objects returned. - results = pipeLine.Invoke(); - - // Log out any errors in the pipeline execution - // NOTE: These errors are NOT thrown as exceptions! - // Be sure to check this to ensure that no errors - // happened while executing the command. - if (pipeLine.Error != null && pipeLine.Error.Count > 0) - { - foreach (object item in pipeLine.Error.ReadToEnd()) - { - errorList.Add(item); - string errorMessage = string.Format("Invoke error: {0}", item); - HostedSolutionLog.LogWarning(errorMessage); - } - } - } - pipeLine = null; - errors = errorList.ToArray(); - HostedSolutionLog.LogEnd("ExecuteShellCommand"); - return results; - } - - internal object GetPSObjectProperty(PSObject obj, string name) - { - return obj.Members[name].Value; - } - - /// - /// Returns the identity of the object from the shell execution result - /// - /// - /// - internal string GetResultObjectIdentity(Collection result) - { - HostedSolutionLog.LogStart("GetResultObjectIdentity"); - if (result == null) - throw new ArgumentNullException("result", "Execution result is not specified"); - - if (result.Count < 1) - throw new ArgumentException("Execution result is empty", "result"); - - if (result.Count > 1) - throw new ArgumentException("Execution result contains more than one object", "result"); - - PSMemberInfo info = result[0].Members["Identity"]; - if (info == null) - throw new ArgumentException("Execution result does not contain Identity property", "result"); - - string ret = info.Value.ToString(); - HostedSolutionLog.LogEnd("GetResultObjectIdentity"); - return ret; - } - - internal string GetResultObjectDN(Collection result) - { - HostedSolutionLog.LogStart("GetResultObjectDN"); - if (result == null) - throw new ArgumentNullException("result", "Execution result is not specified"); - - if (result.Count < 1) - throw new ArgumentException("Execution result does not contain any object"); - - if (result.Count > 1) - throw new ArgumentException("Execution result contains more than one object"); - - PSMemberInfo info = result[0].Members["DistinguishedName"]; - if (info == null) - throw new ArgumentException("Execution result does not contain DistinguishedName property", "result"); - - string ret = info.Value.ToString(); - HostedSolutionLog.LogEnd("GetResultObjectDN"); - return ret; - } #endregion - internal int ConvertNullableToInt32(Nullable value) where T : struct + internal int ConvertNullableToInt32(object value) { - int ret = 0; - if (value.HasValue) - { - ret = Convert.ToInt32(value.Value); - } - return ret; + return value == null ? 0 : Convert.ToInt32(value); + } + + internal long ConvertNullableToInt64(object value) + { + return value == null ? 0 : Convert.ToInt64(value); } } diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/PowerShellManager.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/PowerShellManager.cs new file mode 100644 index 00000000..949b08bd --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/PowerShellManager.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Management.Automation; +using System.Management.Automation.Runspaces; +using System.Text; +using System.Threading.Tasks; +using WebsitePanel.Providers.HostedSolution; + +namespace WebsitePanel.Providers.Virtualization +{ + public class PowerShellManager : IDisposable + { + protected static InitialSessionState session = null; + + protected Runspace RunSpace { get; set; } + + public PowerShellManager() + { + OpenRunspace(); + } + + protected void OpenRunspace() + { + HostedSolutionLog.LogStart("OpenRunspace"); + + if (session == null) + { + session = InitialSessionState.CreateDefault(); + session.ImportPSModule(new[] {"Hyper-V"}); + } + + Runspace runSpace = RunspaceFactory.CreateRunspace(session); + runSpace.Open(); + runSpace.SessionStateProxy.SetVariable("ConfirmPreference", "none"); + + RunSpace = runSpace; + + HostedSolutionLog.LogEnd("OpenRunspace"); + } + + public void Dispose() + { + try + { + if (RunSpace != null && RunSpace.RunspaceStateInfo.State == RunspaceState.Opened) + { + RunSpace.Close(); + RunSpace = null; + } + } + catch (Exception ex) + { + HostedSolutionLog.LogError("Runspace error", ex); + } + } + + public Collection Execute(Command cmd) + { + return Execute(cmd, true); + } + + public Collection Execute(Command cmd, bool useDomainController) + { + object[] errors; + return Execute(cmd, useDomainController, out errors); + } + + public Collection Execute(Command cmd, out object[] errors) + { + return Execute(cmd, true, out errors); + } + + public Collection Execute(Command cmd, bool useDomainController, out object[] errors) + { + HostedSolutionLog.LogStart("Execute"); + List errorList = new List(); + + HostedSolutionLog.DebugCommand(cmd); + Collection results = null; + // Create a pipeline + Pipeline pipeLine = RunSpace.CreatePipeline(); + using (pipeLine) + { + // Add the command + pipeLine.Commands.Add(cmd); + // Execute the pipeline and save the objects returned. + results = pipeLine.Invoke(); + + // Log out any errors in the pipeline execution + // NOTE: These errors are NOT thrown as exceptions! + // Be sure to check this to ensure that no errors + // happened while executing the command. + if (pipeLine.Error != null && pipeLine.Error.Count > 0) + { + foreach (object item in pipeLine.Error.ReadToEnd()) + { + errorList.Add(item); + string errorMessage = string.Format("Invoke error: {0}", item); + HostedSolutionLog.LogWarning(errorMessage); + } + } + } + pipeLine = null; + errors = errorList.ToArray(); + HostedSolutionLog.LogEnd("Execute"); + return results; + } + + + /// + /// Returns the identity of the object from the shell execution result + /// + /// + /// + public static string GetResultObjectIdentity(Collection result) + { + HostedSolutionLog.LogStart("GetResultObjectIdentity"); + if (result == null) + throw new ArgumentNullException("result", "Execution result is not specified"); + + if (result.Count < 1) + throw new ArgumentException("Execution result is empty", "result"); + + if (result.Count > 1) + throw new ArgumentException("Execution result contains more than one object", "result"); + + PSMemberInfo info = result[0].Members["Identity"]; + if (info == null) + throw new ArgumentException("Execution result does not contain Identity property", "result"); + + string ret = info.Value.ToString(); + HostedSolutionLog.LogEnd("GetResultObjectIdentity"); + return ret; + } + + public static string GetResultObjectDN(Collection result) + { + HostedSolutionLog.LogStart("GetResultObjectDN"); + if (result == null) + throw new ArgumentNullException("result", "Execution result is not specified"); + + if (result.Count < 1) + throw new ArgumentException("Execution result does not contain any object"); + + if (result.Count > 1) + throw new ArgumentException("Execution result contains more than one object"); + + PSMemberInfo info = result[0].Members["DistinguishedName"]; + if (info == null) + throw new ArgumentException("Execution result does not contain DistinguishedName property", "result"); + + string ret = info.Value.ToString(); + HostedSolutionLog.LogEnd("GetResultObjectDN"); + return ret; + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/WebsitePanel.Providers.Virtualization.HyperV2012R2.csproj b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/WebsitePanel.Providers.Virtualization.HyperV2012R2.csproj index 31e9533c..2198fbaa 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/WebsitePanel.Providers.Virtualization.HyperV2012R2.csproj +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV-2012R2/WebsitePanel.Providers.Virtualization.HyperV2012R2.csproj @@ -53,8 +53,13 @@ VersionInfo.cs + + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV/HyperV.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV/HyperV.cs index c01a5528..2658df64 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV/HyperV.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Virtualization.HyperV/HyperV.cs @@ -488,7 +488,7 @@ namespace WebsitePanel.Providers.Virtualization return vm; } - private void UpdateVirtualMachineGeneralSettings(string vmId, ManagementObject objVM, int cpuCores, int ramMB, bool bootFromCD, bool numLockEnabled) + private void UpdateVirtualMachineGeneralSettings(string vmId, ManagementObject objVM, int cpuCores, long ramMB, bool bootFromCD, bool numLockEnabled) { // request management service ManagementObject objVmsvc = GetVirtualSystemManagementService(); diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/EnterpriseStorageProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/EnterpriseStorageProxy.cs index 1984ec72..f43357e6 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/EnterpriseStorageProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/EnterpriseStorageProxy.cs @@ -1,197 +1,167 @@ -// Copyright (c) 2015, Outercurve Foundation. -// All rights reserved. +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.7905 // -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ // -// This source code was auto-generated by wsdl, Version=2.0.50727.42. +// This source code was auto-generated by wsdl, Version=2.0.50727.3038. // using WebsitePanel.Providers.OS; using WebsitePanel.Providers.Web; -namespace WebsitePanel.Providers.EnterpriseStorage -{ +namespace WebsitePanel.Providers.EnterpriseStorage { using System.Xml.Serialization; using System.Web.Services; using System.ComponentModel; using System.Web.Services.Protocols; using System; using System.Diagnostics; - - + + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Web.Services.WebServiceBindingAttribute(Name = "EnterpriseStorageSoap", Namespace = "http://smbsaas/websitepanel/server/")] + [System.Web.Services.WebServiceBindingAttribute(Name="EnterpriseStorageSoap", Namespace="http://smbsaas/websitepanel/server/")] [System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))] - public partial class EnterpriseStorage : Microsoft.Web.Services3.WebServicesClientProtocol - { - + public partial class EnterpriseStorage : Microsoft.Web.Services3.WebServicesClientProtocol { + public ServiceProviderSettingsSoapHeader ServiceProviderSettingsSoapHeaderValue; - + private System.Threading.SendOrPostCallback GetFoldersOperationCompleted; - + private System.Threading.SendOrPostCallback GetFolderOperationCompleted; - + private System.Threading.SendOrPostCallback CreateFolderOperationCompleted; - + private System.Threading.SendOrPostCallback DeleteFolderOperationCompleted; - + private System.Threading.SendOrPostCallback SetFolderWebDavRulesOperationCompleted; - + private System.Threading.SendOrPostCallback GetFolderWebDavRulesOperationCompleted; - + private System.Threading.SendOrPostCallback CheckFileServicesInstallationOperationCompleted; - + + private System.Threading.SendOrPostCallback SearchOperationCompleted; + private System.Threading.SendOrPostCallback RenameFolderOperationCompleted; - + /// - public EnterpriseStorage() - { - this.Url = "http://localhost:9004/EnterpriseStorage.asmx"; + public EnterpriseStorage() { + this.Url = "http://localhost:9003/EnterpriseStorage.asmx"; } - + /// public event GetFoldersCompletedEventHandler GetFoldersCompleted; - + /// public event GetFolderCompletedEventHandler GetFolderCompleted; - + /// public event CreateFolderCompletedEventHandler CreateFolderCompleted; - + /// public event DeleteFolderCompletedEventHandler DeleteFolderCompleted; - + /// public event SetFolderWebDavRulesCompletedEventHandler SetFolderWebDavRulesCompleted; - + /// public event GetFolderWebDavRulesCompletedEventHandler GetFolderWebDavRulesCompleted; - + /// public event CheckFileServicesInstallationCompletedEventHandler CheckFileServicesInstallationCompleted; - + + /// + public event SearchCompletedEventHandler SearchCompleted; + /// public event RenameFolderCompletedEventHandler RenameFolderCompleted; - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFolders", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SystemFile[] GetFolders(string organizationId, WebDavSetting[] settings) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFolders", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SystemFile[] GetFolders(string organizationId, WebDavSetting[] settings) { object[] results = this.Invoke("GetFolders", new object[] { organizationId, settings}); return ((SystemFile[])(results[0])); } - + /// - public System.IAsyncResult BeginGetFolders(string organizationId, WebDavSetting[] settings, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetFolders(string organizationId, WebDavSetting[] settings, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetFolders", new object[] { organizationId, settings}, callback, asyncState); } - + /// - public SystemFile[] EndGetFolders(System.IAsyncResult asyncResult) - { + public SystemFile[] EndGetFolders(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SystemFile[])(results[0])); } - + /// - public void GetFoldersAsync(string organizationId, WebDavSetting[] settings) - { + public void GetFoldersAsync(string organizationId, WebDavSetting[] settings) { this.GetFoldersAsync(organizationId, settings, null); } - + /// - public void GetFoldersAsync(string organizationId, WebDavSetting[] settings, object userState) - { - if ((this.GetFoldersOperationCompleted == null)) - { + public void GetFoldersAsync(string organizationId, WebDavSetting[] settings, object userState) { + if ((this.GetFoldersOperationCompleted == null)) { this.GetFoldersOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFoldersOperationCompleted); } this.InvokeAsync("GetFolders", new object[] { organizationId, settings}, this.GetFoldersOperationCompleted, userState); } - - private void OnGetFoldersOperationCompleted(object arg) - { - if ((this.GetFoldersCompleted != null)) - { + + private void OnGetFoldersOperationCompleted(object arg) { + if ((this.GetFoldersCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetFoldersCompleted(this, new GetFoldersCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFolder", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SystemFile GetFolder(string organizationId, string folder, WebDavSetting setting) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFolder", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SystemFile GetFolder(string organizationId, string folder, WebDavSetting setting) { object[] results = this.Invoke("GetFolder", new object[] { organizationId, folder, setting}); return ((SystemFile)(results[0])); } - + /// - public System.IAsyncResult BeginGetFolder(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetFolder(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetFolder", new object[] { organizationId, folder, setting}, callback, asyncState); } - + /// - public SystemFile EndGetFolder(System.IAsyncResult asyncResult) - { + public SystemFile EndGetFolder(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SystemFile)(results[0])); } - + /// - public void GetFolderAsync(string organizationId, string folder, WebDavSetting setting) - { + public void GetFolderAsync(string organizationId, string folder, WebDavSetting setting) { this.GetFolderAsync(organizationId, folder, setting, null); } - + /// - public void GetFolderAsync(string organizationId, string folder, WebDavSetting setting, object userState) - { - if ((this.GetFolderOperationCompleted == null)) - { + public void GetFolderAsync(string organizationId, string folder, WebDavSetting setting, object userState) { + if ((this.GetFolderOperationCompleted == null)) { this.GetFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFolderOperationCompleted); } this.InvokeAsync("GetFolder", new object[] { @@ -199,53 +169,45 @@ namespace WebsitePanel.Providers.EnterpriseStorage folder, setting}, this.GetFolderOperationCompleted, userState); } - - private void OnGetFolderOperationCompleted(object arg) - { - if ((this.GetFolderCompleted != null)) - { + + private void OnGetFolderOperationCompleted(object arg) { + if ((this.GetFolderCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetFolderCompleted(this, new GetFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateFolder", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void CreateFolder(string organizationId, string folder, WebDavSetting setting) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateFolder", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void CreateFolder(string organizationId, string folder, WebDavSetting setting) { this.Invoke("CreateFolder", new object[] { organizationId, folder, setting}); } - + /// - public System.IAsyncResult BeginCreateFolder(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCreateFolder(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreateFolder", new object[] { organizationId, folder, setting}, callback, asyncState); } - + /// - public void EndCreateFolder(System.IAsyncResult asyncResult) - { + public void EndCreateFolder(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } - + /// - public void CreateFolderAsync(string organizationId, string folder, WebDavSetting setting) - { + public void CreateFolderAsync(string organizationId, string folder, WebDavSetting setting) { this.CreateFolderAsync(organizationId, folder, setting, null); } - + /// - public void CreateFolderAsync(string organizationId, string folder, WebDavSetting setting, object userState) - { - if ((this.CreateFolderOperationCompleted == null)) - { + public void CreateFolderAsync(string organizationId, string folder, WebDavSetting setting, object userState) { + if ((this.CreateFolderOperationCompleted == null)) { this.CreateFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateFolderOperationCompleted); } this.InvokeAsync("CreateFolder", new object[] { @@ -253,53 +215,45 @@ namespace WebsitePanel.Providers.EnterpriseStorage folder, setting}, this.CreateFolderOperationCompleted, userState); } - - private void OnCreateFolderOperationCompleted(object arg) - { - if ((this.CreateFolderCompleted != null)) - { + + private void OnCreateFolderOperationCompleted(object arg) { + if ((this.CreateFolderCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateFolderCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteFolder", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public void DeleteFolder(string organizationId, string folder, WebDavSetting setting) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteFolder", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void DeleteFolder(string organizationId, string folder, WebDavSetting setting) { this.Invoke("DeleteFolder", new object[] { organizationId, folder, setting}); } - + /// - public System.IAsyncResult BeginDeleteFolder(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginDeleteFolder(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeleteFolder", new object[] { organizationId, folder, setting}, callback, asyncState); } - + /// - public void EndDeleteFolder(System.IAsyncResult asyncResult) - { + public void EndDeleteFolder(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } - + /// - public void DeleteFolderAsync(string organizationId, string folder, WebDavSetting setting) - { + public void DeleteFolderAsync(string organizationId, string folder, WebDavSetting setting) { this.DeleteFolderAsync(organizationId, folder, setting, null); } - + /// - public void DeleteFolderAsync(string organizationId, string folder, WebDavSetting setting, object userState) - { - if ((this.DeleteFolderOperationCompleted == null)) - { + public void DeleteFolderAsync(string organizationId, string folder, WebDavSetting setting, object userState) { + if ((this.DeleteFolderOperationCompleted == null)) { this.DeleteFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteFolderOperationCompleted); } this.InvokeAsync("DeleteFolder", new object[] { @@ -307,21 +261,18 @@ namespace WebsitePanel.Providers.EnterpriseStorage folder, setting}, this.DeleteFolderOperationCompleted, userState); } - - private void OnDeleteFolderOperationCompleted(object arg) - { - if ((this.DeleteFolderCompleted != null)) - { + + private void OnDeleteFolderOperationCompleted(object arg) { + if ((this.DeleteFolderCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteFolderCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetFolderWebDavRules", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool SetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetFolderWebDavRules", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool SetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules) { object[] results = this.Invoke("SetFolderWebDavRules", new object[] { organizationId, folder, @@ -329,35 +280,30 @@ namespace WebsitePanel.Providers.EnterpriseStorage rules}); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginSetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginSetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetFolderWebDavRules", new object[] { organizationId, folder, setting, rules}, callback, asyncState); } - + /// - public bool EndSetFolderWebDavRules(System.IAsyncResult asyncResult) - { + public bool EndSetFolderWebDavRules(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void SetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules) - { + public void SetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules) { this.SetFolderWebDavRulesAsync(organizationId, folder, setting, rules, null); } - + /// - public void SetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules, object userState) - { - if ((this.SetFolderWebDavRulesOperationCompleted == null)) - { + public void SetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting, WebDavFolderRule[] rules, object userState) { + if ((this.SetFolderWebDavRulesOperationCompleted == null)) { this.SetFolderWebDavRulesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetFolderWebDavRulesOperationCompleted); } this.InvokeAsync("SetFolderWebDavRules", new object[] { @@ -366,55 +312,47 @@ namespace WebsitePanel.Providers.EnterpriseStorage setting, rules}, this.SetFolderWebDavRulesOperationCompleted, userState); } - - private void OnSetFolderWebDavRulesOperationCompleted(object arg) - { - if ((this.SetFolderWebDavRulesCompleted != null)) - { + + private void OnSetFolderWebDavRulesOperationCompleted(object arg) { + if ((this.SetFolderWebDavRulesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetFolderWebDavRulesCompleted(this, new SetFolderWebDavRulesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFolderWebDavRules", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public WebDavFolderRule[] GetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetFolderWebDavRules", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public WebDavFolderRule[] GetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting) { object[] results = this.Invoke("GetFolderWebDavRules", new object[] { organizationId, folder, setting}); return ((WebDavFolderRule[])(results[0])); } - + /// - public System.IAsyncResult BeginGetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginGetFolderWebDavRules(string organizationId, string folder, WebDavSetting setting, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetFolderWebDavRules", new object[] { organizationId, folder, setting}, callback, asyncState); } - + /// - public WebDavFolderRule[] EndGetFolderWebDavRules(System.IAsyncResult asyncResult) - { + public WebDavFolderRule[] EndGetFolderWebDavRules(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((WebDavFolderRule[])(results[0])); } - + /// - public void GetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting) - { + public void GetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting) { this.GetFolderWebDavRulesAsync(organizationId, folder, setting, null); } - + /// - public void GetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting, object userState) - { - if ((this.GetFolderWebDavRulesOperationCompleted == null)) - { + public void GetFolderWebDavRulesAsync(string organizationId, string folder, WebDavSetting setting, object userState) { + if ((this.GetFolderWebDavRulesOperationCompleted == null)) { this.GetFolderWebDavRulesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFolderWebDavRulesOperationCompleted); } this.InvokeAsync("GetFolderWebDavRules", new object[] { @@ -422,68 +360,111 @@ namespace WebsitePanel.Providers.EnterpriseStorage folder, setting}, this.GetFolderWebDavRulesOperationCompleted, userState); } - - private void OnGetFolderWebDavRulesOperationCompleted(object arg) - { - if ((this.GetFolderWebDavRulesCompleted != null)) - { + + private void OnGetFolderWebDavRulesOperationCompleted(object arg) { + if ((this.GetFolderWebDavRulesCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetFolderWebDavRulesCompleted(this, new GetFolderWebDavRulesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CheckFileServicesInstallation", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool CheckFileServicesInstallation() - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CheckFileServicesInstallation", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool CheckFileServicesInstallation() { object[] results = this.Invoke("CheckFileServicesInstallation", new object[0]); return ((bool)(results[0])); } - + /// - public System.IAsyncResult BeginCheckFileServicesInstallation(System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginCheckFileServicesInstallation(System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CheckFileServicesInstallation", new object[0], callback, asyncState); } - + /// - public bool EndCheckFileServicesInstallation(System.IAsyncResult asyncResult) - { + public bool EndCheckFileServicesInstallation(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((bool)(results[0])); } - + /// - public void CheckFileServicesInstallationAsync() - { + public void CheckFileServicesInstallationAsync() { this.CheckFileServicesInstallationAsync(null); } - + /// - public void CheckFileServicesInstallationAsync(object userState) - { - if ((this.CheckFileServicesInstallationOperationCompleted == null)) - { + public void CheckFileServicesInstallationAsync(object userState) { + if ((this.CheckFileServicesInstallationOperationCompleted == null)) { this.CheckFileServicesInstallationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckFileServicesInstallationOperationCompleted); } this.InvokeAsync("CheckFileServicesInstallation", new object[0], this.CheckFileServicesInstallationOperationCompleted, userState); } - - private void OnCheckFileServicesInstallationOperationCompleted(object arg) - { - if ((this.CheckFileServicesInstallationCompleted != null)) - { + + private void OnCheckFileServicesInstallationOperationCompleted(object arg) { + if ((this.CheckFileServicesInstallationCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CheckFileServicesInstallationCompleted(this, new CheckFileServicesInstallationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RenameFolder", RequestNamespace = "http://smbsaas/websitepanel/server/", ResponseNamespace = "http://smbsaas/websitepanel/server/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SystemFile RenameFolder(string organizationId, string originalFolder, string newFolder, WebDavSetting setting) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/Search", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SystemFile[] Search(string organizationId, string[] searchPaths, string searchText, string userPrincipalName, bool recursive) { + object[] results = this.Invoke("Search", new object[] { + organizationId, + searchPaths, + searchText, + userPrincipalName, + recursive}); + return ((SystemFile[])(results[0])); + } + + /// + public System.IAsyncResult BeginSearch(string organizationId, string[] searchPaths, string searchText, string userPrincipalName, bool recursive, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("Search", new object[] { + organizationId, + searchPaths, + searchText, + userPrincipalName, + recursive}, callback, asyncState); + } + + /// + public SystemFile[] EndSearch(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((SystemFile[])(results[0])); + } + + /// + public void SearchAsync(string organizationId, string[] searchPaths, string searchText, string userPrincipalName, bool recursive) { + this.SearchAsync(organizationId, searchPaths, searchText, userPrincipalName, recursive, null); + } + + /// + public void SearchAsync(string organizationId, string[] searchPaths, string searchText, string userPrincipalName, bool recursive, object userState) { + if ((this.SearchOperationCompleted == null)) { + this.SearchOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchOperationCompleted); + } + this.InvokeAsync("Search", new object[] { + organizationId, + searchPaths, + searchText, + userPrincipalName, + recursive}, this.SearchOperationCompleted, userState); + } + + private void OnSearchOperationCompleted(object arg) { + if ((this.SearchCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SearchCompleted(this, new SearchCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RenameFolder", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public SystemFile RenameFolder(string organizationId, string originalFolder, string newFolder, WebDavSetting setting) { object[] results = this.Invoke("RenameFolder", new object[] { organizationId, originalFolder, @@ -491,35 +472,30 @@ namespace WebsitePanel.Providers.EnterpriseStorage setting}); return ((SystemFile)(results[0])); } - + /// - public System.IAsyncResult BeginRenameFolder(string organizationId, string originalFolder, string newFolder, WebDavSetting setting, System.AsyncCallback callback, object asyncState) - { + public System.IAsyncResult BeginRenameFolder(string organizationId, string originalFolder, string newFolder, WebDavSetting setting, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("RenameFolder", new object[] { organizationId, originalFolder, newFolder, setting}, callback, asyncState); } - + /// - public SystemFile EndRenameFolder(System.IAsyncResult asyncResult) - { + public SystemFile EndRenameFolder(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((SystemFile)(results[0])); } - + /// - public void RenameFolderAsync(string organizationId, string originalFolder, string newFolder, WebDavSetting setting) - { + public void RenameFolderAsync(string organizationId, string originalFolder, string newFolder, WebDavSetting setting) { this.RenameFolderAsync(organizationId, originalFolder, newFolder, setting, null); } - + /// - public void RenameFolderAsync(string organizationId, string originalFolder, string newFolder, WebDavSetting setting, object userState) - { - if ((this.RenameFolderOperationCompleted == null)) - { + public void RenameFolderAsync(string organizationId, string originalFolder, string newFolder, WebDavSetting setting, object userState) { + if ((this.RenameFolderOperationCompleted == null)) { this.RenameFolderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRenameFolderOperationCompleted); } this.InvokeAsync("RenameFolder", new object[] { @@ -528,205 +504,204 @@ namespace WebsitePanel.Providers.EnterpriseStorage newFolder, setting}, this.RenameFolderOperationCompleted, userState); } - - private void OnRenameFolderOperationCompleted(object arg) - { - if ((this.RenameFolderCompleted != null)) - { + + private void OnRenameFolderOperationCompleted(object arg) { + if ((this.RenameFolderCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.RenameFolderCompleted(this, new RenameFolderCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// - public new void CancelAsync(object userState) - { + public new void CancelAsync(object userState) { base.CancelAsync(userState); } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetFoldersCompletedEventHandler(object sender, GetFoldersCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetFoldersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetFoldersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetFoldersCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SystemFile[] Result - { - get - { + public SystemFile[] Result { + get { this.RaiseExceptionIfNecessary(); return ((SystemFile[])(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetFolderCompletedEventHandler(object sender, GetFolderCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SystemFile Result - { - get - { + public SystemFile Result { + get { this.RaiseExceptionIfNecessary(); return ((SystemFile)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CreateFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void DeleteFolderCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetFolderWebDavRulesCompletedEventHandler(object sender, SetFolderWebDavRulesCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class SetFolderWebDavRulesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SetFolderWebDavRulesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SetFolderWebDavRulesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SetFolderWebDavRulesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetFolderWebDavRulesCompletedEventHandler(object sender, GetFolderWebDavRulesCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class GetFolderWebDavRulesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class GetFolderWebDavRulesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal GetFolderWebDavRulesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal GetFolderWebDavRulesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public WebDavFolderRule[] Result - { - get - { + public WebDavFolderRule[] Result { + get { this.RaiseExceptionIfNecessary(); return ((WebDavFolderRule[])(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CheckFileServicesInstallationCompletedEventHandler(object sender, CheckFileServicesInstallationCompletedEventArgs e); - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class CheckFileServicesInstallationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class CheckFileServicesInstallationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal CheckFileServicesInstallationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal CheckFileServicesInstallationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public bool Result - { - get - { + public bool Result { + get { this.RaiseExceptionIfNecessary(); return ((bool)(this.results[0])); } } } - + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] - public delegate void RenameFolderCompletedEventHandler(object sender, RenameFolderCompletedEventArgs e); - + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void SearchCompletedEventHandler(object sender, SearchCompletedEventArgs e); + /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class RenameFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs - { - + public partial class SearchCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal RenameFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SearchCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// - public SystemFile Result - { - get - { + public SystemFile[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((SystemFile[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void RenameFolderCompletedEventHandler(object sender, RenameFolderCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class RenameFolderCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal RenameFolderCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public SystemFile Result { + get { this.RaiseExceptionIfNecessary(); return ((SystemFile)(this.results[0])); } diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs index d32659ee..7d50298d 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/RemoteDesktopServicesProxy.cs @@ -18,6 +18,7 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { using System.Web.Services.Protocols; using System; using System.Diagnostics; + using WebsitePanel.Providers.HostedSolution; /// @@ -81,6 +82,24 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { private System.Threading.SendOrPostCallback GetRdsCollectionSessionHostsOperationCompleted; + private System.Threading.SendOrPostCallback GetRdsServerInfoOperationCompleted; + + private System.Threading.SendOrPostCallback GetRdsServerStatusOperationCompleted; + + private System.Threading.SendOrPostCallback ShutDownRdsServerOperationCompleted; + + private System.Threading.SendOrPostCallback RestartRdsServerOperationCompleted; + + private System.Threading.SendOrPostCallback SaveRdsCollectionLocalAdminsOperationCompleted; + + private System.Threading.SendOrPostCallback GetRdsCollectionLocalAdminsOperationCompleted; + + private System.Threading.SendOrPostCallback MoveRdsServerToTenantOUOperationCompleted; + + private System.Threading.SendOrPostCallback RemoveRdsServerFromTenantOUOperationCompleted; + + private System.Threading.SendOrPostCallback InstallCertificateOperationCompleted; + /// public RemoteDesktopServices() { this.Url = "http://localhost:9003/RemoteDesktopServices.asmx"; @@ -164,6 +183,33 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { /// public event GetRdsCollectionSessionHostsCompletedEventHandler GetRdsCollectionSessionHostsCompleted; + /// + public event GetRdsServerInfoCompletedEventHandler GetRdsServerInfoCompleted; + + /// + public event GetRdsServerStatusCompletedEventHandler GetRdsServerStatusCompleted; + + /// + public event ShutDownRdsServerCompletedEventHandler ShutDownRdsServerCompleted; + + /// + public event RestartRdsServerCompletedEventHandler RestartRdsServerCompleted; + + /// + public event SaveRdsCollectionLocalAdminsCompletedEventHandler SaveRdsCollectionLocalAdminsCompleted; + + /// + public event GetRdsCollectionLocalAdminsCompletedEventHandler GetRdsCollectionLocalAdminsCompleted; + + /// + public event MoveRdsServerToTenantOUCompletedEventHandler MoveRdsServerToTenantOUCompleted; + + /// + public event RemoveRdsServerFromTenantOUCompletedEventHandler RemoveRdsServerFromTenantOUCompleted; + + /// + public event InstallCertificateCompletedEventHandler InstallCertificateCompleted; + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] @@ -378,18 +424,20 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveCollection", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public bool RemoveCollection(string organizationId, string collectionName) { + public bool RemoveCollection(string organizationId, string collectionName, RdsServer[] servers) { object[] results = this.Invoke("RemoveCollection", new object[] { organizationId, - collectionName}); + collectionName, + servers}); return ((bool)(results[0])); } /// - public System.IAsyncResult BeginRemoveCollection(string organizationId, string collectionName, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginRemoveCollection(string organizationId, string collectionName, RdsServer[] servers, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("RemoveCollection", new object[] { organizationId, - collectionName}, callback, asyncState); + collectionName, + servers}, callback, asyncState); } /// @@ -399,18 +447,19 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { } /// - public void RemoveCollectionAsync(string organizationId, string collectionName) { - this.RemoveCollectionAsync(organizationId, collectionName, null); + public void RemoveCollectionAsync(string organizationId, string collectionName, RdsServer[] servers) { + this.RemoveCollectionAsync(organizationId, collectionName, servers, null); } /// - public void RemoveCollectionAsync(string organizationId, string collectionName, object userState) { + public void RemoveCollectionAsync(string organizationId, string collectionName, RdsServer[] servers, object userState) { if ((this.RemoveCollectionOperationCompleted == null)) { this.RemoveCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveCollectionOperationCompleted); } this.InvokeAsync("RemoveCollection", new object[] { organizationId, - collectionName}, this.RemoveCollectionOperationCompleted, userState); + collectionName, + servers}, this.RemoveCollectionOperationCompleted, userState); } private void OnRemoveCollectionOperationCompleted(object arg) { @@ -1299,6 +1348,387 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { } } + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetRdsServerInfo", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public RdsServerInfo GetRdsServerInfo(string serverName) { + object[] results = this.Invoke("GetRdsServerInfo", new object[] { + serverName}); + return ((RdsServerInfo)(results[0])); + } + + /// + public System.IAsyncResult BeginGetRdsServerInfo(string serverName, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetRdsServerInfo", new object[] { + serverName}, callback, asyncState); + } + + /// + public RdsServerInfo EndGetRdsServerInfo(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((RdsServerInfo)(results[0])); + } + + /// + public void GetRdsServerInfoAsync(string serverName) { + this.GetRdsServerInfoAsync(serverName, null); + } + + /// + public void GetRdsServerInfoAsync(string serverName, object userState) { + if ((this.GetRdsServerInfoOperationCompleted == null)) { + this.GetRdsServerInfoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsServerInfoOperationCompleted); + } + this.InvokeAsync("GetRdsServerInfo", new object[] { + serverName}, this.GetRdsServerInfoOperationCompleted, userState); + } + + private void OnGetRdsServerInfoOperationCompleted(object arg) { + if ((this.GetRdsServerInfoCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetRdsServerInfoCompleted(this, new GetRdsServerInfoCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetRdsServerStatus", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string GetRdsServerStatus(string serverName) { + object[] results = this.Invoke("GetRdsServerStatus", new object[] { + serverName}); + return ((string)(results[0])); + } + + /// + public System.IAsyncResult BeginGetRdsServerStatus(string serverName, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetRdsServerStatus", new object[] { + serverName}, callback, asyncState); + } + + /// + public string EndGetRdsServerStatus(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((string)(results[0])); + } + + /// + public void GetRdsServerStatusAsync(string serverName) { + this.GetRdsServerStatusAsync(serverName, null); + } + + /// + public void GetRdsServerStatusAsync(string serverName, object userState) { + if ((this.GetRdsServerStatusOperationCompleted == null)) { + this.GetRdsServerStatusOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsServerStatusOperationCompleted); + } + this.InvokeAsync("GetRdsServerStatus", new object[] { + serverName}, this.GetRdsServerStatusOperationCompleted, userState); + } + + private void OnGetRdsServerStatusOperationCompleted(object arg) { + if ((this.GetRdsServerStatusCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetRdsServerStatusCompleted(this, new GetRdsServerStatusCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/ShutDownRdsServer", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void ShutDownRdsServer(string serverName) { + this.Invoke("ShutDownRdsServer", new object[] { + serverName}); + } + + /// + public System.IAsyncResult BeginShutDownRdsServer(string serverName, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("ShutDownRdsServer", new object[] { + serverName}, callback, asyncState); + } + + /// + public void EndShutDownRdsServer(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void ShutDownRdsServerAsync(string serverName) { + this.ShutDownRdsServerAsync(serverName, null); + } + + /// + public void ShutDownRdsServerAsync(string serverName, object userState) { + if ((this.ShutDownRdsServerOperationCompleted == null)) { + this.ShutDownRdsServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnShutDownRdsServerOperationCompleted); + } + this.InvokeAsync("ShutDownRdsServer", new object[] { + serverName}, this.ShutDownRdsServerOperationCompleted, userState); + } + + private void OnShutDownRdsServerOperationCompleted(object arg) { + if ((this.ShutDownRdsServerCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.ShutDownRdsServerCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RestartRdsServer", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void RestartRdsServer(string serverName) { + this.Invoke("RestartRdsServer", new object[] { + serverName}); + } + + /// + public System.IAsyncResult BeginRestartRdsServer(string serverName, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("RestartRdsServer", new object[] { + serverName}, callback, asyncState); + } + + /// + public void EndRestartRdsServer(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void RestartRdsServerAsync(string serverName) { + this.RestartRdsServerAsync(serverName, null); + } + + /// + public void RestartRdsServerAsync(string serverName, object userState) { + if ((this.RestartRdsServerOperationCompleted == null)) { + this.RestartRdsServerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRestartRdsServerOperationCompleted); + } + this.InvokeAsync("RestartRdsServer", new object[] { + serverName}, this.RestartRdsServerOperationCompleted, userState); + } + + private void OnRestartRdsServerOperationCompleted(object arg) { + if ((this.RestartRdsServerCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.RestartRdsServerCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SaveRdsCollectionLocalAdmins", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void SaveRdsCollectionLocalAdmins(OrganizationUser[] users, string[] hosts) { + this.Invoke("SaveRdsCollectionLocalAdmins", new object[] { + users, + hosts}); + } + + /// + public System.IAsyncResult BeginSaveRdsCollectionLocalAdmins(OrganizationUser[] users, string[] hosts, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("SaveRdsCollectionLocalAdmins", new object[] { + users, + hosts}, callback, asyncState); + } + + /// + public void EndSaveRdsCollectionLocalAdmins(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void SaveRdsCollectionLocalAdminsAsync(OrganizationUser[] users, string[] hosts) { + this.SaveRdsCollectionLocalAdminsAsync(users, hosts, null); + } + + /// + public void SaveRdsCollectionLocalAdminsAsync(OrganizationUser[] users, string[] hosts, object userState) { + if ((this.SaveRdsCollectionLocalAdminsOperationCompleted == null)) { + this.SaveRdsCollectionLocalAdminsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSaveRdsCollectionLocalAdminsOperationCompleted); + } + this.InvokeAsync("SaveRdsCollectionLocalAdmins", new object[] { + users, + hosts}, this.SaveRdsCollectionLocalAdminsOperationCompleted, userState); + } + + private void OnSaveRdsCollectionLocalAdminsOperationCompleted(object arg) { + if ((this.SaveRdsCollectionLocalAdminsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SaveRdsCollectionLocalAdminsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetRdsCollectionLocalAdmins", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string[] GetRdsCollectionLocalAdmins(string hostName) { + object[] results = this.Invoke("GetRdsCollectionLocalAdmins", new object[] { + hostName}); + return ((string[])(results[0])); + } + + /// + public System.IAsyncResult BeginGetRdsCollectionLocalAdmins(string hostName, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetRdsCollectionLocalAdmins", new object[] { + hostName}, callback, asyncState); + } + + /// + public string[] EndGetRdsCollectionLocalAdmins(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((string[])(results[0])); + } + + /// + public void GetRdsCollectionLocalAdminsAsync(string hostName) { + this.GetRdsCollectionLocalAdminsAsync(hostName, null); + } + + /// + public void GetRdsCollectionLocalAdminsAsync(string hostName, object userState) { + if ((this.GetRdsCollectionLocalAdminsOperationCompleted == null)) { + this.GetRdsCollectionLocalAdminsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsCollectionLocalAdminsOperationCompleted); + } + this.InvokeAsync("GetRdsCollectionLocalAdmins", new object[] { + hostName}, this.GetRdsCollectionLocalAdminsOperationCompleted, userState); + } + + private void OnGetRdsCollectionLocalAdminsOperationCompleted(object arg) { + if ((this.GetRdsCollectionLocalAdminsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetRdsCollectionLocalAdminsCompleted(this, new GetRdsCollectionLocalAdminsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/MoveRdsServerToTenantOU", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void MoveRdsServerToTenantOU(string hostName, string organizationId) { + this.Invoke("MoveRdsServerToTenantOU", new object[] { + hostName, + organizationId}); + } + + /// + public System.IAsyncResult BeginMoveRdsServerToTenantOU(string hostName, string organizationId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("MoveRdsServerToTenantOU", new object[] { + hostName, + organizationId}, callback, asyncState); + } + + /// + public void EndMoveRdsServerToTenantOU(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void MoveRdsServerToTenantOUAsync(string hostName, string organizationId) { + this.MoveRdsServerToTenantOUAsync(hostName, organizationId, null); + } + + /// + public void MoveRdsServerToTenantOUAsync(string hostName, string organizationId, object userState) { + if ((this.MoveRdsServerToTenantOUOperationCompleted == null)) { + this.MoveRdsServerToTenantOUOperationCompleted = new System.Threading.SendOrPostCallback(this.OnMoveRdsServerToTenantOUOperationCompleted); + } + this.InvokeAsync("MoveRdsServerToTenantOU", new object[] { + hostName, + organizationId}, this.MoveRdsServerToTenantOUOperationCompleted, userState); + } + + private void OnMoveRdsServerToTenantOUOperationCompleted(object arg) { + if ((this.MoveRdsServerToTenantOUCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.MoveRdsServerToTenantOUCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/RemoveRdsServerFromTenantOU", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void RemoveRdsServerFromTenantOU(string hostName, string organizationId) { + this.Invoke("RemoveRdsServerFromTenantOU", new object[] { + hostName, + organizationId}); + } + + /// + public System.IAsyncResult BeginRemoveRdsServerFromTenantOU(string hostName, string organizationId, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("RemoveRdsServerFromTenantOU", new object[] { + hostName, + organizationId}, callback, asyncState); + } + + /// + public void EndRemoveRdsServerFromTenantOU(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void RemoveRdsServerFromTenantOUAsync(string hostName, string organizationId) { + this.RemoveRdsServerFromTenantOUAsync(hostName, organizationId, null); + } + + /// + public void RemoveRdsServerFromTenantOUAsync(string hostName, string organizationId, object userState) { + if ((this.RemoveRdsServerFromTenantOUOperationCompleted == null)) { + this.RemoveRdsServerFromTenantOUOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRemoveRdsServerFromTenantOUOperationCompleted); + } + this.InvokeAsync("RemoveRdsServerFromTenantOU", new object[] { + hostName, + organizationId}, this.RemoveRdsServerFromTenantOUOperationCompleted, userState); + } + + private void OnRemoveRdsServerFromTenantOUOperationCompleted(object arg) { + if ((this.RemoveRdsServerFromTenantOUCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.RemoveRdsServerFromTenantOUCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/InstallCertificate", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public void InstallCertificate([System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] byte[] certificate, string password, string[] hostNames) { + this.Invoke("InstallCertificate", new object[] { + certificate, + password, + hostNames}); + } + + /// + public System.IAsyncResult BeginInstallCertificate(byte[] certificate, string password, string[] hostNames, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("InstallCertificate", new object[] { + certificate, + password, + hostNames}, callback, asyncState); + } + + /// + public void EndInstallCertificate(System.IAsyncResult asyncResult) { + this.EndInvoke(asyncResult); + } + + /// + public void InstallCertificateAsync(byte[] certificate, string password, string[] hostNames) { + this.InstallCertificateAsync(certificate, password, hostNames, null); + } + + /// + public void InstallCertificateAsync(byte[] certificate, string password, string[] hostNames, object userState) { + if ((this.InstallCertificateOperationCompleted == null)) { + this.InstallCertificateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnInstallCertificateOperationCompleted); + } + this.InvokeAsync("InstallCertificate", new object[] { + certificate, + password, + hostNames}, this.InstallCertificateOperationCompleted, userState); + } + + private void OnInstallCertificateOperationCompleted(object arg) { + if ((this.InstallCertificateCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.InstallCertificateCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// public new void CancelAsync(object userState) { base.CancelAsync(userState); @@ -1826,4 +2256,106 @@ namespace WebsitePanel.Providers.RemoteDesktopServices { } } } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void GetRdsServerInfoCompletedEventHandler(object sender, GetRdsServerInfoCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetRdsServerInfoCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetRdsServerInfoCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public RdsServerInfo Result { + get { + this.RaiseExceptionIfNecessary(); + return ((RdsServerInfo)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void GetRdsServerStatusCompletedEventHandler(object sender, GetRdsServerStatusCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetRdsServerStatusCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetRdsServerStatusCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void ShutDownRdsServerCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void RestartRdsServerCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void SaveRdsCollectionLocalAdminsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void GetRdsCollectionLocalAdminsCompletedEventHandler(object sender, GetRdsCollectionLocalAdminsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetRdsCollectionLocalAdminsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetRdsCollectionLocalAdminsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public string[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string[])(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void MoveRdsServerToTenantOUCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void RemoveRdsServerFromTenantOUCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void InstallCertificateCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); } diff --git a/WebsitePanel/Sources/WebsitePanel.Server.sln b/WebsitePanel/Sources/WebsitePanel.Server.sln index 9fecc65b..2b573470 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.sln +++ b/WebsitePanel/Sources/WebsitePanel.Server.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.30723.0 +VisualStudioVersion = 12.0.21005.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Caching Application Block", "Caching Application Block", "{C8E6F2E4-A5B8-486A-A56E-92D864524682}" ProjectSection(SolutionItems) = preProject diff --git a/WebsitePanel/Sources/WebsitePanel.Server/EnterpriseStorage.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/EnterpriseStorage.asmx.cs index 3643dc96..ecd4878c 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/EnterpriseStorage.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/EnterpriseStorage.asmx.cs @@ -175,6 +175,23 @@ namespace WebsitePanel.Server } } + [WebMethod, SoapHeader("settings")] + public SystemFile[] Search(string organizationId, string[] searchPaths, string searchText, string userPrincipalName, bool recursive) + { + try + { + Log.WriteStart("'{0}' Search", ProviderSettings.ProviderName); + var searchResults = EnterpriseStorageProvider.Search(organizationId, searchPaths, searchText, userPrincipalName, recursive); + Log.WriteEnd("'{0}' Search", ProviderSettings.ProviderName); + return searchResults; + } + catch (Exception ex) + { + Log.WriteError(String.Format("'{0}' Search", ProviderSettings.ProviderName), ex); + throw; + } + } + [WebMethod, SoapHeader("settings")] public SystemFile RenameFolder(string organizationId, string originalFolder, string newFolder, WebDavSetting setting) { diff --git a/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs index cb3e79dd..038cc907 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/RemoteDesktopServices.asmx.cs @@ -42,6 +42,7 @@ using WebsitePanel.Providers; using WebsitePanel.Providers.OS; using WebsitePanel.Providers.RemoteDesktopServices; using WebsitePanel.Server.Utils; +using WebsitePanel.Providers.HostedSolution; namespace WebsitePanel.Server { @@ -145,12 +146,12 @@ namespace WebsitePanel.Server } [WebMethod, SoapHeader("settings")] - public bool RemoveCollection(string organizationId, string collectionName) + public bool RemoveCollection(string organizationId, string collectionName, List servers) { try { Log.WriteStart("'{0}' RemoveCollection", ProviderSettings.ProviderName); - var result = RDSProvider.RemoveCollection(organizationId, collectionName); + var result = RDSProvider.RemoveCollection(organizationId, collectionName, servers); Log.WriteEnd("'{0}' RemoveCollection", ProviderSettings.ProviderName); return result; } @@ -495,5 +496,155 @@ namespace WebsitePanel.Server throw; } } + + [WebMethod, SoapHeader("settings")] + public RdsServerInfo GetRdsServerInfo(string serverName) + { + try + { + Log.WriteStart("'{0}' GetRdsServerInfo", ProviderSettings.ProviderName); + var result = RDSProvider.GetRdsServerInfo(serverName); + Log.WriteEnd("'{0}' GetRdsServerInfo", ProviderSettings.ProviderName); + + return result; + } + catch (Exception ex) + { + Log.WriteError(String.Format("'{0}' GetRdsServerInfo", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public string GetRdsServerStatus(string serverName) + { + try + { + Log.WriteStart("'{0}' GetRdsServerStatus", ProviderSettings.ProviderName); + var result = RDSProvider.GetRdsServerStatus(serverName); + Log.WriteEnd("'{0}' GetRdsServerStatus", ProviderSettings.ProviderName); + + return result; + } + catch (Exception ex) + { + Log.WriteError(String.Format("'{0}' GetRdsServerStatus", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void ShutDownRdsServer(string serverName) + { + try + { + Log.WriteStart("'{0}' ShutDownRdsServer", ProviderSettings.ProviderName); + RDSProvider.ShutDownRdsServer(serverName); + Log.WriteEnd("'{0}' ShutDownRdsServer", ProviderSettings.ProviderName); + } + catch (Exception ex) + { + Log.WriteError(String.Format("'{0}' ShutDownRdsServer", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void RestartRdsServer(string serverName) + { + try + { + Log.WriteStart("'{0}' RestartRdsServer", ProviderSettings.ProviderName); + RDSProvider.RestartRdsServer(serverName); + Log.WriteEnd("'{0}' RestartRdsServer", ProviderSettings.ProviderName); + } + catch (Exception ex) + { + Log.WriteError(String.Format("'{0}' RestartRdsServer", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void SaveRdsCollectionLocalAdmins(List users, List hosts) + { + try + { + Log.WriteStart("'{0}' SaveRdsCollectionLocalAdmins", ProviderSettings.ProviderName); + RDSProvider.SaveRdsCollectionLocalAdmins(users, hosts); + Log.WriteEnd("'{0}' SaveRdsCollectionLocalAdmins", ProviderSettings.ProviderName); + } + catch (Exception ex) + { + Log.WriteError(String.Format("'{0}' SaveRdsCollectionLocalAdmins", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public List GetRdsCollectionLocalAdmins(string hostName) + { + try + { + Log.WriteStart("'{0}' GetRdsCollectionLocalAdmins", ProviderSettings.ProviderName); + var result = RDSProvider.GetRdsCollectionLocalAdmins(hostName); + Log.WriteEnd("'{0}' GetRdsCollectionLocalAdmins", ProviderSettings.ProviderName); + + return result; + } + catch (Exception ex) + { + Log.WriteError(String.Format("'{0}' GetRdsCollectionLocalAdmins", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void MoveRdsServerToTenantOU(string hostName, string organizationId) + { + try + { + Log.WriteStart("'{0}' MoveRdsServerToTenantOU", ProviderSettings.ProviderName); + RDSProvider.MoveRdsServerToTenantOU(hostName, organizationId); + Log.WriteEnd("'{0}' MoveRdsServerToTenantOU", ProviderSettings.ProviderName); + } + catch (Exception ex) + { + Log.WriteError(String.Format("'{0}' MoveRdsServerToTenantOU", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void RemoveRdsServerFromTenantOU(string hostName, string organizationId) + { + try + { + Log.WriteStart("'{0}' RemoveRdsServerFromTenantOU", ProviderSettings.ProviderName); + RDSProvider.RemoveRdsServerFromTenantOU(hostName, organizationId); + Log.WriteEnd("'{0}' RemoveRdsServerFromTenantOU", ProviderSettings.ProviderName); + } + catch (Exception ex) + { + Log.WriteError(String.Format("'{0}' RemoveRdsServerFromTenantOU", ProviderSettings.ProviderName), ex); + throw; + } + } + + [WebMethod, SoapHeader("settings")] + public void InstallCertificate(byte[] certificate, string password, List hostNames) + { + try + { + Log.WriteStart("'{0}' InstallCertificate", ProviderSettings.ProviderName); + RDSProvider.InstallCertificate(certificate, password, hostNames); + Log.WriteEnd("'{0}' InstallCertificate", ProviderSettings.ProviderName); + } + catch (Exception ex) + { + Log.WriteError(String.Format("'{0}' InstallCertificate", ProviderSettings.ProviderName), ex); + throw; + } + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Attributes/Resources/LocalizedDescriptionAttribute.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Attributes/Resources/LocalizedDescriptionAttribute.cs new file mode 100644 index 00000000..83cb4428 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Attributes/Resources/LocalizedDescriptionAttribute.cs @@ -0,0 +1,29 @@ +using System; +using System.ComponentModel; +using System.Resources; + +namespace WebsitePanel.WebDav.Core.Attributes.Resources +{ + public class LocalizedDescriptionAttribute : DescriptionAttribute + { + private readonly string _resourceKey; + private readonly ResourceManager _resource; + public LocalizedDescriptionAttribute(Type resourceType, string resourceKey) + { + _resource = new ResourceManager(resourceType); + _resourceKey = resourceKey; + } + + public override string Description + { + get + { + string displayName = _resource.GetString(_resourceKey); + + return string.IsNullOrEmpty(displayName) + ? string.Format("[[{0}]]", _resourceKey) + : displayName; + } + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/ElementsRendering.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/ElementsRendering.cs index f6f33649..59d4de63 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/ElementsRendering.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/ElementsRendering.cs @@ -7,13 +7,11 @@ namespace WebsitePanel.WebDav.Core.Config.Entities { public int DefaultCount { get; private set; } public int AddElementsCount { get; private set; } - public List ElementsToIgnore { get; private set; } public ElementsRendering() { DefaultCount = ConfigSection.ElementsRendering.DefaultCount; AddElementsCount = ConfigSection.ElementsRendering.AddElementsCount; - ElementsToIgnore = ConfigSection.ElementsRendering.ElementsToIgnore.Split(',').ToList(); } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/FileIconsDictionary.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/FileIconsDictionary.cs index 6bd7b26c..8ad79350 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/FileIconsDictionary.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/FileIconsDictionary.cs @@ -12,10 +12,12 @@ namespace WebsitePanel.WebDav.Core.Config.Entities public FileIconsDictionary() { DefaultPath = ConfigSection.FileIcons.DefaultPath; + FolderPath = ConfigSection.FileIcons.FolderPath; _fileIcons = ConfigSection.FileIcons.Cast().ToDictionary(x => x.Extension, y => y.Path); } public string DefaultPath { get; private set; } + public string FolderPath { get; private set; } public IEnumerator> GetEnumerator() { @@ -57,4 +59,4 @@ namespace WebsitePanel.WebDav.Core.Config.Entities get { return _fileIcons.Values; } } } -} \ No newline at end of file +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/FilesToIgnoreCollection.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/FilesToIgnoreCollection.cs new file mode 100644 index 00000000..25a9a52d --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/FilesToIgnoreCollection.cs @@ -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 + { + private readonly IList _filesToIgnore; + + public FilesToIgnoreCollection() + { + _filesToIgnore = ConfigSection.FilesToIgnore.Cast().ToList(); + } + + public IEnumerator 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); + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/OpenerCollection.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/OpenerCollection.cs new file mode 100644 index 00000000..3ec0e347 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/OpenerCollection.cs @@ -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 OpenerCollection : AbstractConfigCollection, IReadOnlyCollection + { + private readonly IList _targetBlankMimeTypeExtensions; + + public OpenerCollection() + { + _targetBlankMimeTypeExtensions = ConfigSection.TypeOpener.Cast().ToList(); + } + + public IEnumerator GetEnumerator() + { + return _targetBlankMimeTypeExtensions.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public int Count + { + get { return _targetBlankMimeTypeExtensions.Count; } + } + + public bool Contains(string extension) + { + return _targetBlankMimeTypeExtensions.Any(x => x.Extension == extension); + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/IWebDavAppConfig.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/IWebDavAppConfig.cs index d46df2bd..86ce78de 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/IWebDavAppConfig.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/IWebDavAppConfig.cs @@ -13,5 +13,7 @@ namespace WebsitePanel.WebDav.Core.Config HttpErrorsCollection HttpErrors { get; } OfficeOnlineCollection OfficeOnline { get; } OwaSupportedBrowsersCollection OwaSupportedBrowsers { get; } + FilesToIgnoreCollection FilesToIgnore { get; } + OpenerCollection FileOpener { get; } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/ElementsRenderingElement.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/ElementsRenderingElement.cs index f25b2034..b5c5166e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/ElementsRenderingElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/ElementsRenderingElement.cs @@ -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; } - } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/EnterpriseServerElement.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/EnterpriseServerElement.cs new file mode 100644 index 00000000..e58704b6 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/EnterpriseServerElement.cs @@ -0,0 +1,16 @@ +using System.Configuration; + +namespace WebsitePanel.WebDav.Core.Config.WebConfigSections +{ + public class EnterpriseServerElement : ConfigurationElement + { + private const string ValueKey = "url"; + + [ConfigurationProperty(ValueKey, IsKey = true, IsRequired = true)] + public string Value + { + get { return (string)this[ValueKey]; } + set { this[ValueKey] = value; } + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/FileIconsElementCollection.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/FileIconsElementCollection.cs index fb3d5340..1309c639 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/FileIconsElementCollection.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/FileIconsElementCollection.cs @@ -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(); diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/FilesToIgnoreElement.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/FilesToIgnoreElement.cs new file mode 100644 index 00000000..e2fc0b9c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/FilesToIgnoreElement.cs @@ -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; } + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/FilesToIgnoreElementCollection.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/FilesToIgnoreElementCollection.cs new file mode 100644 index 00000000..9c4a8c30 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/FilesToIgnoreElementCollection.cs @@ -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; + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/OfficeOnlineElement.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/OfficeOnlineElement.cs index 4df1d52a..560b6964 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/OfficeOnlineElement.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/OfficeOnlineElement.cs @@ -7,6 +7,7 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections private const string ExtensionKey = "extension"; private const string OwaViewKey = "OwaView"; private const string OwaEditorKey = "OwaEditor"; + private const string OwaMobileViewKey = "OwaMobileView"; [ConfigurationProperty(ExtensionKey, IsKey = true, IsRequired = true)] public string Extension @@ -28,5 +29,13 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections get { return this[OwaEditorKey].ToString(); } set { this[OwaEditorKey] = value; } } + + + [ConfigurationProperty(OwaMobileViewKey, IsKey = true, IsRequired = true)] + public string OwaMobileViev + { + get { return this[OwaMobileViewKey].ToString(); } + set { this[OwaMobileViewKey] = value; } + } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/OpenerElement.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/OpenerElement.cs new file mode 100644 index 00000000..8df1ac80 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/OpenerElement.cs @@ -0,0 +1,33 @@ +using System; +using System.Configuration; + +namespace WebsitePanel.WebDav.Core.Config.WebConfigSections +{ + public class OpenerElement : ConfigurationElement + { + private const string ExtensionKey = "extension"; + private const string MemeTypeKey = "mimeType"; + private const string TargetBlankKey = "isTargetBlank"; + + [ConfigurationProperty(ExtensionKey, IsKey = true, IsRequired = true)] + public string Extension + { + get { return this[ExtensionKey].ToString(); } + set { this[ExtensionKey] = value; } + } + + [ConfigurationProperty(MemeTypeKey, IsKey = true, IsRequired = true)] + public string MimeType + { + get { return this[MemeTypeKey].ToString(); } + set { this[MemeTypeKey] = value; } + } + + [ConfigurationProperty(TargetBlankKey, IsKey = true, IsRequired = true)] + public bool IstargetBlank + { + get { return Convert.ToBoolean(this[TargetBlankKey]); } + set { this[TargetBlankKey] = value; } + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/OpenerElementCollection.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/OpenerElementCollection.cs new file mode 100644 index 00000000..5d32ba9c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/OpenerElementCollection.cs @@ -0,0 +1,19 @@ +using System; +using System.Configuration; + +namespace WebsitePanel.WebDav.Core.Config.WebConfigSections +{ + [ConfigurationCollection(typeof(OpenerElement))] + public class OpenerElementCollection : ConfigurationElementCollection + { + protected override ConfigurationElement CreateNewElement() + { + return new OpenerElement(); + } + + protected override object GetElementKey(ConfigurationElement element) + { + return ((OpenerElement)element).Extension; + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs index a51b9460..d471a912 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs @@ -9,6 +9,7 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections private const string WebdavRootKey = "webdavRoot"; private const string AuthTimeoutCookieNameKey = "authTimeoutCookieName"; private const string AppName = "applicationName"; + private const string EnterpriseServerUrlNameKey = "enterpriseServer"; private const string WebsitePanelConstantUserKey = "websitePanelConstantUser"; private const string ElementsRenderingKey = "elementsRendering"; private const string Rfc2898CryptographyKey = "rfc2898Cryptography"; @@ -17,6 +18,8 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections private const string FileIconsKey = "fileIcons"; private const string OwaSupportedBrowsersKey = "owaSupportedBrowsers"; private const string OfficeOnlineKey = "officeOnline"; + private const string FilesToIgnoreKey = "filesToIgnore"; + private const string TypeOpenerKey = "typeOpener"; public const string SectionName = "webDavExplorerConfigurationSettings"; @@ -27,6 +30,13 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections set { this[AuthTimeoutCookieNameKey] = value; } } + [ConfigurationProperty(EnterpriseServerUrlNameKey, IsRequired = true)] + public EnterpriseServerElement EnterpriseServerUrl + { + get { return (EnterpriseServerElement)this[EnterpriseServerUrlNameKey]; } + set { this[EnterpriseServerUrlNameKey] = value; } + } + [ConfigurationProperty(WebdavRootKey, IsRequired = true)] public WebdavRootElement WebdavRoot { @@ -89,5 +99,19 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections get { return (OfficeOnlineElementCollection)this[OfficeOnlineKey]; } set { this[OfficeOnlineKey] = value; } } + + [ConfigurationProperty(TypeOpenerKey, IsDefaultCollection = false)] + public OpenerElementCollection TypeOpener + { + get { return (OpenerElementCollection)this[TypeOpenerKey]; } + set { this[TypeOpenerKey] = value; } + } + + [ConfigurationProperty(FilesToIgnoreKey, IsDefaultCollection = false)] + public FilesToIgnoreElementCollection FilesToIgnore + { + get { return (FilesToIgnoreElementCollection)this[FilesToIgnoreKey]; } + set { this[FilesToIgnoreKey] = value; } + } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs index f6925e5b..696c1d54 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs @@ -19,6 +19,8 @@ namespace WebsitePanel.WebDav.Core.Config HttpErrors = new HttpErrorsCollection(); OfficeOnline = new OfficeOnlineCollection(); OwaSupportedBrowsers = new OwaSupportedBrowsersCollection(); + FilesToIgnore = new FilesToIgnoreCollection(); + FileOpener = new OpenerCollection(); } public static WebDavAppConfigManager Instance @@ -46,6 +48,11 @@ namespace WebsitePanel.WebDav.Core.Config get { return _configSection.AuthTimeoutCookieName.Value; } } + public string EnterpriseServerUrl + { + get { return _configSection.EnterpriseServerUrl.Value; } + } + public ElementsRendering ElementsRendering { get; private set; } public WebsitePanelConstantUserParameters WebsitePanelConstantUserParameters { get; private set; } public SessionKeysCollection SessionKeys { get; private set; } @@ -53,5 +60,7 @@ 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; } + public OpenerCollection FileOpener { get; private set; } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Entities/Account/Enums/FolderViewTypes.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Entities/Account/Enums/FolderViewTypes.cs new file mode 100644 index 00000000..51d2e381 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Entities/Account/Enums/FolderViewTypes.cs @@ -0,0 +1,8 @@ +namespace WebsitePanel.WebDav.Core.Entities.Account.Enums +{ + public enum FolderViewTypes + { + BigIcons, + Table + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Entities/Account/UserPortalSettings.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Entities/Account/UserPortalSettings.cs new file mode 100644 index 00000000..69e30be4 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Entities/Account/UserPortalSettings.cs @@ -0,0 +1,9 @@ +using WebsitePanel.WebDav.Core.Entities.Account.Enums; + +namespace WebsitePanel.WebDav.Core.Entities.Account +{ + public class UserPortalSettings + { + public FolderViewTypes WebDavViewType { get; set; } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Extensions/EnumExtensions.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Extensions/EnumExtensions.cs new file mode 100644 index 00000000..6d5b1092 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Extensions/EnumExtensions.cs @@ -0,0 +1,23 @@ +using System; +using System.ComponentModel; +using System.Linq; +using System.Reflection; +using System.Resources; +using WebsitePanel.WebDav.Core.Attributes.Resources; + +namespace WebsitePanel.WebDav.Core.Extensions +{ + public static class EnumExtensions + { + public static string GetDescription(this Enum value) + { + FieldInfo field = value.GetType().GetField(value.ToString()); + + DescriptionAttribute attribute + = Attribute.GetCustomAttribute(field, typeof(DescriptionAttribute)) + as DescriptionAttribute; + + return attribute == null ? value.ToString() : attribute.Description; + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Helper/SerializeHelper.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Helper/SerializeHelper.cs new file mode 100644 index 00000000..83a40d52 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Helper/SerializeHelper.cs @@ -0,0 +1,41 @@ +using System.IO; +using System.Xml; +using System.Xml.Serialization; + +namespace WebsitePanel.WebDav.Core.Helper +{ + public class SerializeHelper + { + public static TResult Deserialize(string inputString) + { + TResult result; + + var serializer = new XmlSerializer(typeof(TResult)); + + using (TextReader reader = new StringReader(inputString)) + { + result = (TResult)serializer.Deserialize(reader); + } + + return result; + } + + public static string Serialize(TEntity entity) + { + string result = string.Empty; + + var xmlSerializer = new XmlSerializer(typeof(TEntity)); + + using (var stringWriter = new StringWriter()) + { + using (XmlWriter writer = XmlWriter.Create(stringWriter)) + { + xmlSerializer.Serialize(writer, entity); + result = stringWriter.ToString(); + } + } + + return result; + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/IFolder.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/IFolder.cs index 6d587fc9..f37b9f94 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/IFolder.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/IFolder.cs @@ -218,6 +218,68 @@ namespace WebsitePanel.WebDav.Core Open(); } + public void OpenPaged(string path) + { + _path = new Uri(path); + OpenPaged(); + } + + public void OpenPaged() + { + var request = (HttpWebRequest)WebRequest.Create(_path); + //request.PreAuthenticate = true; + request.Method = "SEARCH"; + + //TODO Disable SSL + ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; }); + + var credentials = (NetworkCredential)_credentials; + if (credentials != null && credentials.UserName != null) + { + request.Credentials = _credentials; + + string auth = "Basic " + Convert.ToBase64String(Encoding.Default.GetBytes(credentials.UserName + ":" + credentials.Password)); + request.Headers.Add("Authorization", auth); + } + + var strQuery = "" + + "SELECT \"DAV:displayname\" FROM \"" + _path + "\"" + + "WHERE \"DAV:ishidden\" = false" + + ""; + + try + { + var bytes = Encoding.UTF8.GetBytes(strQuery); + + request.ContentLength = bytes.Length; + + using (var requestStream = request.GetRequestStream()) + { + // Write the SQL query to the request stream. + requestStream.Write(bytes, 0, bytes.Length); + } + + request.ContentType = "text/xml"; + + using (var response = (HttpWebResponse)request.GetResponse()) + { + using (var responseStream = new StreamReader(response.GetResponseStream())) + { + string responseString = responseStream.ReadToEnd(); + ProcessResponse(responseString); + } + } + } + catch (WebException e) + { + if (e.Status == WebExceptionStatus.ProtocolError) + { + throw new UnauthorizedException(); + } + throw e; + } + } + /// /// Processes the response from the server. /// @@ -356,6 +418,7 @@ namespace WebsitePanel.WebDav.Core SetComment(item.Comment); SetCreatorDisplayName(item.CreatorDisplayName); SetLastModified(item.LastModified); + foreach (Property property in item.Properties) { SetProperty(property); diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/IHierarchyItem.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/IHierarchyItem.cs index 55369709..9617281c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/IHierarchyItem.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/IHierarchyItem.cs @@ -159,7 +159,7 @@ namespace WebsitePanel.WebDav.Core { _creationDate = DateTime.Parse(creationDate); } - + public void SetCreationDate(DateTime creationDate) { _creationDate = creationDate; diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/IResource.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/IResource.cs index a4c2fc08..d1545431 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/IResource.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/IResource.cs @@ -2,8 +2,10 @@ using System.IO; using System.Linq; using System.Net; +using System.Net.Mime; using System.Net.Security; using System.Net.Sockets; +using System.Reflection; using System.Text; using System.Text.RegularExpressions; using System.Threading; @@ -27,7 +29,6 @@ namespace WebsitePanel.WebDav.Core private bool _checkedOut = false; private string _comment = ""; private long _contentLength; - private string _contentType = ""; private DateTime _creationDate = new DateTime(0); private string _creatorDisplayName = ""; private ICredentials _credentials = new NetworkCredential(); @@ -44,6 +45,15 @@ namespace WebsitePanel.WebDav.Core AllowWriteStreamBuffering = false; } + public WebDavResource(ICredentials credentials, IHierarchyItem item) + { + SendChunked = false; + AllowWriteStreamBuffering = false; + + SetCredentials(credentials); + SetHierarchyItem(item); + } + public Uri BaseUri { get { return _baseUri; } @@ -69,7 +79,13 @@ namespace WebsitePanel.WebDav.Core public string ContentType { - get { return _contentType; } + get + { + { + var property = _properties.FirstOrDefault(x => x.Name.Name == "getcontenttype"); + return property == null ? MediaTypeNames.Application.Octet : property.StringValue; + } + } } /// @@ -124,7 +140,7 @@ namespace WebsitePanel.WebDav.Core var webClient = new WebClient(); webClient.Credentials = credentials; webClient.Headers.Add("Authorization", auth); - + ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; webClient.UploadData(Href, "PUT", data); } @@ -143,6 +159,7 @@ namespace WebsitePanel.WebDav.Core webClient.Headers.Add("Authorization", auth); //TODO Disable SSL ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate{ return true; }); + return webClient.OpenRead(_href); } @@ -240,14 +257,14 @@ namespace WebsitePanel.WebDav.Core { get { - string displayName = _href.AbsoluteUri.Replace(_baseUri.AbsoluteUri, ""); + string displayName = _href.AbsoluteUri.Trim('/').Replace(_baseUri.AbsoluteUri.Trim('/'), ""); displayName = Regex.Replace(displayName, "\\/$", ""); Match displayNameMatch = Regex.Match(displayName, "([\\/]+)$"); if (displayNameMatch.Success) { displayName = displayNameMatch.Groups[1].Value; } - return HttpUtility.UrlDecode(displayName); + return HttpUtility.UrlDecode(displayName.Trim('/')); } } @@ -462,15 +479,10 @@ namespace WebsitePanel.WebDav.Core public void SetHref(Uri href) { _href = href; - string baseUri = _href.Scheme + "://" + _href.Host; - for (int i = 0; i < _href.Segments.Length - 1; i++) - { - if (_href.Segments[i] != "/") - { - baseUri += "/" + _href.Segments[i]; - } - } - _baseUri = new Uri(baseUri); + + var baseUrl = href.AbsoluteUri.Remove(href.AbsoluteUri.Length - href.Segments.Last().Length); + + _baseUri = new Uri(baseUrl); } /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IWebDavManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IWebDavManager.cs index c2b8f360..fd1fdc3a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IWebDavManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/IWebDavManager.cs @@ -14,6 +14,7 @@ namespace WebsitePanel.WebDav.Core.Interfaces.Managers void UploadFile(string path, HttpPostedFileBase file); void UploadFile(string path, byte[] bytes); void UploadFile(string path, Stream stream); + IEnumerable SearchFiles(int itemId, string pathPart, string searchValue, string uesrPrincipalName, bool recursive); IResource GetResource(string path); string GetFileUrl(string path); void DeleteResource(string path); diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/Users/IUserSettingsManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/Users/IUserSettingsManager.cs new file mode 100644 index 00000000..cad99315 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Managers/Users/IUserSettingsManager.cs @@ -0,0 +1,12 @@ +using WebsitePanel.WebDav.Core.Entities.Account; +using WebsitePanel.WebDav.Core.Entities.Account.Enums; + +namespace WebsitePanel.WebDav.Core.Interfaces.Managers.Users +{ + public interface IUserSettingsManager + { + UserPortalSettings GetUserSettings(int accountId); + void UpdateSettings(int accountId, UserPortalSettings settings); + void ChangeWebDavViewType(int accountId, FolderViewTypes type); + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Storages/ITtlStorage.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Storages/ITtlStorage.cs index f41dfa9f..315792de 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Storages/ITtlStorage.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Storages/ITtlStorage.cs @@ -1,6 +1,4 @@ -using WebsitePanel.Ecommerce.EnterpriseServer; - -namespace WebsitePanel.WebDav.Core.Interfaces.Storages +namespace WebsitePanel.WebDav.Core.Interfaces.Storages { public interface ITtlStorage : IKeyValueStorage { diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/ItemType.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/ItemType.cs index c706ddd2..9302b36b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/ItemType.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/ItemType.cs @@ -1,10 +1,15 @@ +using WebsitePanel.WebDav.Core.Attributes.Resources; +using WebsitePanel.WebDav.Core.Resources; + namespace WebsitePanel.WebDav.Core { namespace Client { public enum ItemType { + [LocalizedDescription(typeof(WebDavResources), "ItemTypeResource")] Resource, + [LocalizedDescription(typeof(WebDavResources), "ItemTypeFolder")] Folder, Version, VersionHistory diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/Users/UserSettingsManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/Users/UserSettingsManager.cs new file mode 100644 index 00000000..5099997d --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/Users/UserSettingsManager.cs @@ -0,0 +1,39 @@ +using WebsitePanel.WebDav.Core.Entities.Account; +using WebsitePanel.WebDav.Core.Entities.Account.Enums; +using WebsitePanel.WebDav.Core.Helper; +using WebsitePanel.WebDav.Core.Interfaces.Managers.Users; +using WebsitePanel.WebDav.Core.Wsp.Framework; + +namespace WebsitePanel.WebDav.Core.Managers.Users +{ + public class UserSettingsManager : IUserSettingsManager + { + public UserPortalSettings GetUserSettings(int accountId) + { + string xml = WSP.Services.EnterpriseStorage.GetWebDavPortalUserSettingsByAccountId(accountId); + + if (string.IsNullOrEmpty(xml)) + { + return new UserPortalSettings(); + } + + return SerializeHelper.Deserialize(xml); + } + + public void UpdateSettings(int accountId, UserPortalSettings settings) + { + var xml = SerializeHelper.Serialize(settings); + + WSP.Services.EnterpriseStorage.UpdateWebDavPortalUserSettings(accountId, xml); + } + + public void ChangeWebDavViewType(int accountId, FolderViewTypes type) + { + var settings = GetUserSettings(accountId); + + settings.WebDavViewType = type; + + UpdateSettings(accountId, settings); + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs index 93d17679..98ea32ec 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Managers/WebDavManager.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using System.Net; using System.Text; +using System.Text.RegularExpressions; using System.Web; using System.Xml.Serialization; using log4net; @@ -13,6 +14,7 @@ using WebsitePanel.WebDav.Core.Config; using WebsitePanel.WebDav.Core.Exceptions; using WebsitePanel.WebDav.Core.Extensions; using WebsitePanel.WebDav.Core.Interfaces.Managers; +using WebsitePanel.WebDav.Core.Interfaces.Security; using WebsitePanel.WebDav.Core.Resources; using WebsitePanel.WebDav.Core.Security.Cryptography; using WebsitePanel.WebDav.Core.Wsp.Framework; @@ -23,15 +25,17 @@ namespace WebsitePanel.WebDav.Core.Managers { private readonly ICryptography _cryptography; private readonly WebDavSession _webDavSession; + private readonly IWebDavAuthorizationService _webDavAuthorizationService; private readonly ILog Log; private bool _isRoot = true; private IFolder _currentFolder; - public WebDavManager(ICryptography cryptography) + public WebDavManager(ICryptography cryptography, IWebDavAuthorizationService webDavAuthorizationService) { _cryptography = cryptography; + _webDavAuthorizationService = webDavAuthorizationService; Log = LogManager.GetLogger(this.GetType()); _webDavSession = new WebDavSession(); @@ -43,25 +47,14 @@ namespace WebsitePanel.WebDav.Core.Managers if (string.IsNullOrWhiteSpace(pathPart)) { - var resources = ConnectToWebDavServer().Select(x => new WebDavResource { Href = new Uri(x.Url), ItemType = ItemType.Folder }).ToArray(); - - var items = WSP.Services.EnterpriseStorage.GetEnterpriseFolders(WspContext.User.ItemId); - - foreach (var resource in resources) + children = ConnectToWebDavServer().Select(x => new WebDavResource { - var folder = items.FirstOrDefault(x => x.Name == resource.DisplayName); - - if (folder == null) - { - continue; - } - - resource.ContentLength = folder.Size; - resource.AllocatedSpace = folder.FRSMQuotaMB; - resource.IsRootItem = true; - } - - children = resources; + Href = new Uri(x.Url), + ItemType = ItemType.Folder, + ContentLength = x.Size, + AllocatedSpace = x.FRSMQuotaMB, + IsRootItem = true + }).ToArray(); } else { @@ -74,7 +67,7 @@ namespace WebsitePanel.WebDav.Core.Managers _currentFolder = _webDavSession.OpenFolder(string.Format("{0}{1}/{2}", WebDavAppConfigManager.Instance.WebdavRoot, WspContext.User.OrganizationId, pathPart.TrimStart('/'))); } - children = _currentFolder.GetChildren().Where(x => !WebDavAppConfigManager.Instance.ElementsRendering.ElementsToIgnore.Contains(x.DisplayName.Trim('/'))).ToArray(); + children = FilterResult(_currentFolder.GetChildren()).ToArray(); } List sortedChildren = children.Where(x => x.ItemType == ItemType.Folder).OrderBy(x => x.DisplayName).ToList(); @@ -83,6 +76,31 @@ namespace WebsitePanel.WebDav.Core.Managers return sortedChildren; } + public IEnumerable SearchFiles(int itemId, string pathPart, string searchValue, string uesrPrincipalName, bool recursive) + { + pathPart = (pathPart ?? string.Empty).Replace("/","\\"); + + SystemFile[] items; + + + if (string.IsNullOrWhiteSpace(pathPart)) + { + var rootItems = ConnectToWebDavServer().Select(x => x.Name).ToList(); + rootItems.Insert(0, string.Empty); + + items = WspContext.Services.EnterpriseStorage.SearchFiles(itemId, rootItems.ToArray(), searchValue, uesrPrincipalName, recursive); + } + else + { + items = WspContext.Services.EnterpriseStorage.SearchFiles(itemId, new []{pathPart}, searchValue, uesrPrincipalName, recursive); + } + + var resources = Convert(items, new Uri(WebDavAppConfigManager.Instance.WebdavRoot).Append(WspContext.User.OrganizationId, pathPart)); + + + return FilterResult(resources); + } + public bool IsFile(string path) { string folder = GetFileFolder(path); @@ -289,6 +307,7 @@ namespace WebsitePanel.WebDav.Core.Managers } } } + return rootFolders; } @@ -306,6 +325,33 @@ namespace WebsitePanel.WebDav.Core.Managers return pathPart.StartsWith('/' + toRemove) ? pathPart.Substring(toRemove.Length + 1) : pathPart; } + private IEnumerable Convert(IEnumerable files, Uri baseUri) + { + var convertResult = new List(); + + var credentials = new NetworkCredential(WspContext.User.Login, + _cryptography.Decrypt(WspContext.User.EncryptedPassword), + WebDavAppConfigManager.Instance.UserDomain); + + foreach (var file in files) + { + var webDavitem = new WebDavResource(); + + webDavitem.SetCredentials(credentials); + + webDavitem.SetHref(baseUri.Append(file.RelativeUrl.Replace("\\","/"))); + + webDavitem.SetItemType(file.IsDirectory? ItemType.Folder : ItemType.Resource); + webDavitem.SetLastModified(file.Changed); + webDavitem.ContentLength = file.Size; + webDavitem.AllocatedSpace = file.FRSMQuotaMB; + + convertResult.Add(webDavitem); + } + + return convertResult; + } + private byte[] ReadFully(Stream input) { var buffer = new byte[16 * 1024]; @@ -352,7 +398,31 @@ namespace WebsitePanel.WebDav.Core.Managers } return path.Split('/').Last(); ; - } + } + + private IEnumerable FilterResult(IEnumerable items) + { + var result = items.ToList(); + + foreach (var item in items) + { + foreach (var itemToIgnore in WebDavAppConfigManager.Instance.FilesToIgnore) + { + var regex = new Regex(itemToIgnore.Regex); + + Match match = regex.Match(item.DisplayName.Trim('/')); + + if (match.Success && result.Contains(item)) + { + result.Remove(item); + + break; + } + } + } + + return result; + } #endregion } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Resources/WebDavResources.Designer.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Resources/WebDavResources.Designer.cs index 2cb3ad80..996a2806 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Resources/WebDavResources.Designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Resources/WebDavResources.Designer.cs @@ -68,5 +68,23 @@ namespace WebsitePanel.WebDav.Core.Resources { return ResourceManager.GetString("FolderIsNotEmptyFormat", resourceCulture); } } + + /// + /// Looks up a localized string similar to Folder. + /// + internal static string ItemTypeFolder { + get { + return ResourceManager.GetString("ItemTypeFolder", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Document. + /// + internal static string ItemTypeResource { + get { + return ResourceManager.GetString("ItemTypeResource", resourceCulture); + } + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Resources/WebDavResources.resx b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Resources/WebDavResources.resx index fb231645..bf52d5f6 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Resources/WebDavResources.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Resources/WebDavResources.resx @@ -120,4 +120,10 @@ Folder {0} is not empty. + + Folder + + + Document + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebDavSession.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebDavSession.cs index bc69a061..de80e53b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebDavSession.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebDavSession.cs @@ -39,6 +39,19 @@ namespace WebsitePanel.WebDav.Core return folder; } + /// + /// Returns IFolder corresponding to path. + /// + /// Path to the folder. + /// Folder corresponding to requested path. + public IFolder OpenFolderPaged(string path) + { + var folder = new WebDavFolder(); + folder.SetCredentials(Credentials); + folder.OpenPaged(path); + return folder; + } + /// /// Returns IResource corresponding to path. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj index 9cbc1f07..67043bd5 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj @@ -44,8 +44,7 @@ False - ..\..\..\..\Scheduler Domains\WebsitePanel\Bin\Microsoft.Web.Services3.dll - True + ..\..\Bin\Microsoft.Web.Services3.dll @@ -89,41 +88,51 @@ - ..\WebsitePanel.WebPortal\Bin\WebsitePanel.EnterpriseServer.Base.dll + ..\..\Bin\WebsitePanel.EnterpriseServer.Base.dll - ..\WebsitePanel.WebPortal\Bin\WebsitePanel.EnterpriseServer.Client.dll + ..\..\Bin\WebsitePanel.EnterpriseServer.Client.dll - ..\WebsitePanel.WebPortal\Bin\WebsitePanel.Providers.Base.dll + ..\..\Bin\WebsitePanel.Providers.Base.dll + + + + + + + + + + @@ -131,14 +140,18 @@ + + + + @@ -186,12 +199,6 @@ - - - {C99EFB18-FFE7-45BB-8CA8-29336F3E8C68} - WebsitePanel.WebPortal - - ResXFileCodeGenerator diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Wsp/Framework/WSP.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Wsp/Framework/WSP.cs index bb91b65d..1a62f030 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Wsp/Framework/WSP.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Wsp/Framework/WSP.cs @@ -34,7 +34,6 @@ using WebsitePanel.EnterpriseServer; using WebsitePanel.EnterpriseServer.HostedSolution; using WebsitePanel.WebDav.Core.Config; using WebsitePanel.WebDav.Core.Security.Cryptography; -using WebsitePanel.WebPortal; namespace WebsitePanel.WebDav.Core.Wsp.Framework { @@ -268,7 +267,7 @@ namespace WebsitePanel.WebDav.Core.Wsp.Framework public void ConfigureEnterpriseServerProxy(WebServicesClientProtocol proxy, bool applyPolicy) { // load ES properties - string serverUrl = PortalConfiguration.SiteSettings["EnterpriseServer"]; + string serverUrl = WebDavAppConfigManager.Instance.EnterpriseServerUrl; EnterpriseServerProxyConfigurator cnfg = new EnterpriseServerProxyConfigurator(); cnfg.EnterpriseServerUrl = serverUrl; diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WspContext.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WspContext.cs index 73468739..5d33a341 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WspContext.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WspContext.cs @@ -5,11 +5,13 @@ using System.Text; using System.Threading.Tasks; using System.Web; using WebsitePanel.WebDav.Core.Security.Authentication.Principals; +using WebsitePanel.WebDav.Core.Wsp.Framework; namespace WebsitePanel.WebDav.Core { public class WspContext { public static WspPrincipal User { get { return HttpContext.Current.User as WspPrincipal; } } + public static WSP Services { get { return WSP.Services; } } } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Countries.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Countries.config deleted file mode 100644 index efcb98ee..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Countries.config +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/CountryStates.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/CountryStates.config deleted file mode 100644 index 8202f271..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/CountryStates.config +++ /dev/null @@ -1,411 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/ESModule_ControlsHierarchy.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/ESModule_ControlsHierarchy.config deleted file mode 100644 index f2f41087..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/ESModule_ControlsHierarchy.config +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Ecommerce_Modules.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Ecommerce_Modules.config deleted file mode 100644 index 9a80329a..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Ecommerce_Modules.config +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Ecommerce_Pages.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Ecommerce_Pages.config deleted file mode 100644 index 08a8c928..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/Ecommerce_Pages.config +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/ModulesData.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/ModulesData.config deleted file mode 100644 index 54627906..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/ModulesData.config +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SiteSettings.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SiteSettings.config deleted file mode 100644 index 4fc71ff6..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SiteSettings.config +++ /dev/null @@ -1,43 +0,0 @@ - - - - WebsitePanel - - http://localhost:9002 - - UserCulture - UserTheme - - - - - - - - - - - - - - - Home - Login - Home - UserCustomers - SpaceHome - NestedSpaces - SearchUsers - SearchSpaces - LoggedUserDetails - - Browse2.ascx - Browse.ascx - Edit.ascx - Edit.ascx - - false - false - false - - diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SupportedLocales.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SupportedLocales.config deleted file mode 100644 index aec48dea..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SupportedLocales.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SupportedThemes.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SupportedThemes.config deleted file mode 100644 index 1c602e46..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/SupportedThemes.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/WebsitePanel_Modules.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/WebsitePanel_Modules.config deleted file mode 100644 index b43e286a..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/WebsitePanel_Modules.config +++ /dev/null @@ -1,664 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/WebsitePanel_Pages.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/WebsitePanel_Pages.config deleted file mode 100644 index e10593c1..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Data/WebsitePanel_Pages.config +++ /dev/null @@ -1,774 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/BundleConfig.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/BundleConfig.cs index 411062bb..8b6dd2c9 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/BundleConfig.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/BundleConfig.cs @@ -7,9 +7,14 @@ namespace WebsitePanel.WebDavPortal // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 public static void RegisterBundles(BundleCollection bundles) { - bundles.Add(new ScriptBundle("~/bundles/jquery").Include( + var jQueryBundle = new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js", - "~/Scripts/jquery.cookie.js")); + "~/Scripts/jquery.cookie.js"); + + jQueryBundle.IncludeDirectory("~/Scripts", "jquery.dataTables.min.js", true); + jQueryBundle.IncludeDirectory("~/Scripts", "dataTables.bootstrap.js", true); + + bundles.Add(jQueryBundle); bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( "~/Scripts/jquery.validate*")); @@ -24,21 +29,43 @@ namespace WebsitePanel.WebDavPortal "~/Scripts/respond.js")); bundles.Add(new ScriptBundle("~/bundles/appScripts").Include( - "~/Scripts/appScripts/recalculateResourseHeight.js", - "~/Scripts/appScripts/uploadingData2.js", - "~/Scripts/appScripts/authentication.js", "~/Scripts/appScripts/messages.js", - "~/Scripts/appScripts/fileBrowsing.js", + "~/Scripts/appScripts/fileBrowsing.js", "~/Scripts/appScripts/dialogs.js", "~/Scripts/appScripts/wsp.js" )); + bundles.Add(new ScriptBundle("~/bundles/bigIconsScripts").Include( + "~/Scripts/appScripts/recalculateResourseHeight.js" + )); + bundles.Add(new ScriptBundle("~/bundles/authScripts").Include( "~/Scripts/appScripts/authentication.js")); - bundles.Add(new StyleBundle("~/Content/css").Include( + bundles.Add(new ScriptBundle("~/bundles/file-upload").Include( + "~/Scripts/jquery.ui.widget.js", + "~/Scripts/jQuery.FileUpload/tmpl.min.js", + "~/Scripts/jQuery.FileUpload/load-image.min.js", + "~/Scripts/jQuery.FileUpload/jquery.iframe-transport.js", + "~/Scripts/jQuery.FileUpload/jquery.fileupload.js", + "~/Scripts/jQuery.FileUpload/jquery.fileupload-process.js", + "~/Scripts/jQuery.FileUpload/jquery.fileupload-image.js", + "~/Scripts/jQuery.FileUpload/jquery.fileupload-validate.js", + "~/Scripts/jQuery.FileUpload/jquery.fileupload-ui.js" + )); + + var styleBundle = new StyleBundle("~/Content/css"); + + styleBundle.Include( + "~/Content/jQuery.FileUpload/css/jquery.fileupload.css", + "~/Content/jQuery.FileUpload/css/jquery.fileupload-ui.css", "~/Content/bootstrap.css", - "~/Content/site.css")); + "~/Content/site.css"); + + styleBundle.IncludeDirectory("~/Content", "jquery.datatables.css", true); + styleBundle.IncludeDirectory("~/Content", "dataTables.bootstrap.css", true); + + bundles.Add(styleBundle); // Set EnableOptimizations to false for debugging. For more information, // visit http://go.microsoft.com/fwlink/?LinkId=301862 diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs index 8e4c1bf8..1a5981a4 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs @@ -26,53 +26,68 @@ namespace WebsitePanel.WebDavPortal #endregion - routes.MapRoute( - name: FileSystemRouteNames.DeleteFiles, - url: "files-group-action/delete", - defaults: new { controller = "FileSystem", action = "DeleteFiles" } - ); - - routes.MapRoute( - name: FileSystemRouteNames.UploadFile, - url: "upload-file/{org}/{*pathPart}", - defaults: new { controller = "FileSystem", action = "UploadFile" } - ); - - routes.MapRoute( - name: FileSystemRouteNames.DownloadFile, - url: "download-file/{org}/{*pathPart}", - defaults: new { controller = "FileSystem", action = "DownloadFile" } - ); + #region Owa routes.MapRoute( name: FileSystemRouteNames.ViewOfficeOnline, url: "office365/view/{org}/{*pathPart}", - defaults: new { controller = "FileSystem", action = "ViewOfficeDocument", pathPart = UrlParameter.Optional } + defaults: + new {controller = "FileSystem", action = "ViewOfficeDocument", pathPart = UrlParameter.Optional} ); routes.MapRoute( name: FileSystemRouteNames.EditOfficeOnline, url: "office365/edit/{org}/{*pathPart}", - defaults: new { controller = "FileSystem", action = "EditOfficeDocument", pathPart = UrlParameter.Optional } + defaults: + new {controller = "FileSystem", action = "EditOfficeDocument", pathPart = UrlParameter.Optional} ); - //routes.MapRoute( - // name: FileSystemRouteNames.ShowOfficeOnlinePath, - // url: "office365/{org}/{*pathPart}", - // defaults: new { controller = "FileSystem", action = "ShowOfficeDocument", pathPart = UrlParameter.Optional } - // ); + #endregion + + #region Enterprise storage + + routes.MapRoute( + name: FileSystemRouteNames.ChangeWebDavViewType, + url: "storage/change-view-type/{viewType}", + defaults: new { controller = "FileSystem", action = "ChangeViewType" } + ); + + routes.MapRoute( + name: FileSystemRouteNames.DeleteFiles, + url: "storage/files-group-action/delete", + defaults: new { controller = "FileSystem", action = "DeleteFiles" } + ); + + routes.MapRoute( + name: FileSystemRouteNames.UploadFile, + url: "storage/upload-files/{org}/{*pathPart}", + defaults: new { controller = "FileSystem", action = "UploadFiles" } + ); + + routes.MapRoute( + name: FileSystemRouteNames.DownloadFile, + url: "storage/download-file/{org}/{*pathPart}", + defaults: new { controller = "FileSystem", action = "DownloadFile" } + ); routes.MapRoute( name: FileSystemRouteNames.ShowAdditionalContent, - url: "show-additional-content/{*path}", + url: "storage/show-additional-content/{*path}", defaults: new { controller = "FileSystem", action = "ShowAdditionalContent", path = UrlParameter.Optional } ); + routes.MapRoute( + name: FileSystemRouteNames.ShowContentDetails, + url: "storage/details/{org}/{*pathPart}", + defaults: new { controller = "FileSystem", action = "GetContentDetails", pathPart = UrlParameter.Optional } + ); + routes.MapRoute( name: FileSystemRouteNames.ShowContentPath, url: "{org}/{*pathPart}", defaults: new { controller = "FileSystem", action = "ShowContent", pathPart = UrlParameter.Optional } - ); + ); + #endregion routes.MapRoute( name: "Default", diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Routes/AccountRouteNames.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/Routes/AccountRouteNames.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Routes/AccountRouteNames.cs rename to WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/Routes/AccountRouteNames.cs diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Routes/FileSystemRouteNames.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/Routes/FileSystemRouteNames.cs similarity index 80% rename from WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Routes/FileSystemRouteNames.cs rename to WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/Routes/FileSystemRouteNames.cs index 78426d31..23ac46e2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Routes/FileSystemRouteNames.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/Routes/FileSystemRouteNames.cs @@ -7,7 +7,9 @@ namespace WebsitePanel.WebDavPortal.UI.Routes { public class FileSystemRouteNames { + public const string ChangeWebDavViewType = "ChangeWebDavViewTypeRoute"; public const string ShowContentPath = "ShowContentRoute"; + public const string ShowContentDetails = "ShowContentDetailsRoute"; public const string ShowOfficeOnlinePath_ = "ShowOfficeOnlineRoute"; public const string ViewOfficeOnline = "ViewOfficeOnlineRoute"; public const string EditOfficeOnline = "EditOfficeOnlineRoute"; diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Routes/OwaRouteNames.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/Routes/OwaRouteNames.cs similarity index 100% rename from WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Routes/OwaRouteNames.cs rename to WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/Routes/OwaRouteNames.cs diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.autoFill.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.autoFill.css new file mode 100644 index 00000000..cab59b3a --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.autoFill.css @@ -0,0 +1,24 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * AutoFill styles + */ + +div.AutoFill_filler { + display: none; + position: absolute; + height: 14px; + width: 14px; + background: url(../images/filler.png) no-repeat center center; + z-index: 1002; +} + +div.AutoFill_border { + display: none; + position: absolute; + background-color: #0063dc; + z-index: 1001; + + box-shadow: 0px 0px 5px #76b4ff; + -moz-box-shadow: 0px 0px 5px #76b4ff; + -webkit-box-shadow: 0px 0px 5px #76b4ff; +} + diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.autoFill.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.autoFill.min.css new file mode 100644 index 00000000..b485f216 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.autoFill.min.css @@ -0,0 +1 @@ +div.AutoFill_filler{display:none;position:absolute;height:14px;width:14px;background:url(../images/filler.png) no-repeat center center;z-index:1002}div.AutoFill_border{display:none;position:absolute;background-color:#0063dc;z-index:1001;box-shadow:0px 0px 5px #76b4ff;-moz-box-shadow:0px 0px 5px #76b4ff;-webkit-box-shadow:0px 0px 5px #76b4ff} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.bootstrap.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.bootstrap.css new file mode 100644 index 00000000..416f17e3 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.bootstrap.css @@ -0,0 +1,204 @@ + +div.dataTables_length label { + font-weight: normal; + float: left; + text-align: left; +} + +div.dataTables_length select { + width: 75px; +} + +div.dataTables_filter label { + font-weight: normal; + float: right; +} + +div.dataTables_filter input { + width: 16em; +} + +div.dataTables_info { + padding-top: 8px; +} + +div.dataTables_paginate { + float: right; + margin: 0; +} + +div.dataTables_paginate ul.pagination { + margin: 2px; +} + +table.table { + clear: both; + margin-top: 6px !important; + margin-bottom: 6px !important; + max-width: none !important; +} + +table.table thead .sorting, +table.table thead .sorting_asc, +table.table thead .sorting_desc, +table.table thead .sorting_asc_disabled, +table.table thead .sorting_desc_disabled { + cursor: pointer; +} + +table.table thead .sorting { background: url('../images/sort_both.png') no-repeat center right; } +table.table thead .sorting_asc { background: url('../images/sort_asc.png') no-repeat center right; } +table.table thead .sorting_desc { background: url('../images/sort_desc.png') no-repeat center right; } + +table.table thead .sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; } +table.table thead .sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; } + +table.dataTable th:active { + outline: none; +} + +/* Scrolling */ +div.dataTables_scrollHead table { + margin-bottom: 0 !important; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} + +div.dataTables_scrollHead table thead tr:last-child th:first-child, +div.dataTables_scrollHead table thead tr:last-child td:first-child { + border-bottom-left-radius: 0 !important; + border-bottom-right-radius: 0 !important; +} + +div.dataTables_scrollBody table { + border-top: none; + margin-bottom: 0 !important; +} + +div.dataTables_scrollBody tbody tr:first-child th, +div.dataTables_scrollBody tbody tr:first-child td { + border-top: none; +} + +div.dataTables_scrollFoot table { + border-top: none; +} + + + + +/* + * TableTools styles + */ +.table tbody tr.active td, +.table tbody tr.active th { + background-color: #08C; + color: white; +} + +.table tbody tr.active:hover td, +.table tbody tr.active:hover th { + background-color: #0075b0 !important; +} + +.table-striped tbody tr.active:nth-child(odd) td, +.table-striped tbody tr.active:nth-child(odd) th { + background-color: #017ebc; +} + +table.DTTT_selectable tbody tr { + cursor: pointer; +} + +div.DTTT .btn { + color: #333 !important; + font-size: 12px; +} + +div.DTTT .btn:hover { + text-decoration: none !important; +} + +ul.DTTT_dropdown.dropdown-menu { + z-index: 2003; +} + +ul.DTTT_dropdown.dropdown-menu a { + color: #333 !important; /* needed only when demo_page.css is included */ +} + +ul.DTTT_dropdown.dropdown-menu li { + position: relative; +} + +ul.DTTT_dropdown.dropdown-menu li:hover a { + background-color: #0088cc; + color: white !important; +} + +/* TableTools information display */ +div.DTTT_print_info.modal { + height: 150px; + margin-top: -75px; + text-align: center; +} + +div.DTTT_print_info h6 { + font-weight: normal; + font-size: 28px; + line-height: 28px; + margin: 1em; +} + +div.DTTT_print_info p { + font-size: 14px; + line-height: 20px; +} + + + +/* + * FixedColumns styles + */ +div.DTFC_LeftHeadWrapper table, +div.DTFC_LeftFootWrapper table, +div.DTFC_RightHeadWrapper table, +div.DTFC_RightFootWrapper table, +table.DTFC_Cloned tr.even { + background-color: white; +} + +div.DTFC_RightHeadWrapper table , +div.DTFC_LeftHeadWrapper table { + margin-bottom: 0 !important; + border-top-right-radius: 0 !important; + border-bottom-left-radius: 0 !important; + border-bottom-right-radius: 0 !important; +} + +div.DTFC_RightHeadWrapper table thead tr:last-child th:first-child, +div.DTFC_RightHeadWrapper table thead tr:last-child td:first-child, +div.DTFC_LeftHeadWrapper table thead tr:last-child th:first-child, +div.DTFC_LeftHeadWrapper table thead tr:last-child td:first-child { + border-bottom-left-radius: 0 !important; + border-bottom-right-radius: 0 !important; +} + +div.DTFC_RightBodyWrapper table, +div.DTFC_LeftBodyWrapper table { + border-top: none; + margin-bottom: 0 !important; +} + +div.DTFC_RightBodyWrapper tbody tr:first-child th, +div.DTFC_RightBodyWrapper tbody tr:first-child td, +div.DTFC_LeftBodyWrapper tbody tr:first-child th, +div.DTFC_LeftBodyWrapper tbody tr:first-child td { + border-top: none; +} + +div.DTFC_RightFootWrapper table, +div.DTFC_LeftFootWrapper table { + border-top: none; +} + diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.colReorder.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.colReorder.css new file mode 100644 index 00000000..bdd6aa0b --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.colReorder.css @@ -0,0 +1,14 @@ +/* + * Namespace DTCR - "DataTables ColReorder" plug-in + */ + +table.DTCR_clonedTable { + background-color: rgba(255, 255, 255, 0.7); + z-index: 202; +} + +div.DTCR_pointer { + width: 1px; + background-color: #0259C4; + z-index: 201; +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.colReorder.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.colReorder.min.css new file mode 100644 index 00000000..77b230e0 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.colReorder.min.css @@ -0,0 +1 @@ +table.DTCR_clonedTable{background-color:rgba(255,255,255,0.7);z-index:202}div.DTCR_pointer{width:1px;background-color:#0259C4;z-index:201} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.colVis.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.colVis.css new file mode 100644 index 00000000..51f546de --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.colVis.css @@ -0,0 +1,185 @@ + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * ColVis styles + */ +div.ColVis { + float: right; + margin-bottom: 1em; +} + +button.ColVis_Button, +ul.ColVis_collection li { + position: relative; + float: left; + margin-right: 3px; + padding: 5px 8px; + border: 1px solid #999; + cursor: pointer; + *cursor: hand; + font-size: 0.88em; + color: black !important; + white-space: nowrap; + + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + + -webkit-box-shadow: 1px 1px 3px #ccc; + -moz-box-shadow: 1px 1px 3px #ccc; + -ms-box-shadow: 1px 1px 3px #ccc; + -o-box-shadow: 1px 1px 3px #ccc; + box-shadow: 1px 1px 3px #ccc; + + /* Generated by http://www.colorzilla.com/gradient-editor/ */ + background: #ffffff; /* Old browsers */ + background: -webkit-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* IE10+ */ + background: -o-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Opera 11.10+ */ + background: linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f9f9f9',GradientType=0 ); /* IE6-9 */ +} + +.ColVis_Button:hover, +ul.ColVis_collection li:hover { + border: 1px solid #666; + text-decoration: none !important; + + -webkit-box-shadow: 1px 1px 3px #999; + -moz-box-shadow: 1px 1px 3px #999; + -ms-box-shadow: 1px 1px 3px #999; + -o-box-shadow: 1px 1px 3px #999; + box-shadow: 1px 1px 3px #999; + + background: #f3f3f3; /* Old browsers */ + background: -webkit-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* IE10+ */ + background: -o-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* Opera 11.10+ */ + background: linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f3f3f3', endColorstr='#f4f4f4',GradientType=0 ); /* IE6-9 */ +} + +button.ColVis_Button { + height: 30px; + padding: 3px 8px; +} + +button.ColVis_Button::-moz-focus-inner { + border: none !important; + padding: 0; +} + +button.ColVis_Button:active { + outline: none; +} + + +div.ColVis_collectionBackground { + position: fixed; + top: 0; + left: 0; + height: 100%; + width: 100%; + background-color: black; + z-index: 1100; +} + +ul.ColVis_collection { + list-style: none; + width: 150px; + padding: 8px 8px 4px 8px; + margin: 0; + border: 1px solid #ccc; + border: 1px solid rgba( 0, 0, 0, 0.4 ); + background-color: #f3f3f3; + background-color: rgba( 255, 255, 255, 0.3 ); + overflow: hidden; + z-index: 2002; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + -ms-border-radius: 5px; + -o-border-radius: 5px; + border-radius: 5px; + + -webkit-box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); + -ms-box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); + -o-box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); + box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); +} + +ul.ColVis_collection li { + position: relative; + height: auto; + left: 0; + right: 0; + padding: 0.5em; + + display: block; + float: none; + margin-bottom: 4px; + + -webkit-box-shadow: 1px 1px 3px #999; + -moz-box-shadow: 1px 1px 3px #999; + -ms-box-shadow: 1px 1px 3px #999; + -o-box-shadow: 1px 1px 3px #999; + box-shadow: 1px 1px 3px #999; +} + +ul.ColVis_collection li { + text-align: left; +} + +ul.ColVis_collection li.ColVis_Button:hover { + border: 1px solid #999; + background-color: #f0f0f0; +} + +ul.ColVis_collection li span { + display: inline-block; + padding-left: 0.5em; + cursor: pointer; +} + + +ul.ColVis_collection li.ColVis_Special { + border-color: #555; + background: rgb(237,237,237); /* Old browsers */ + background: -webkit-linear-gradient(top, rgba(237,237,237,1) 0%,rgba(214,214,214,1) 77%,rgba(232,232,232,1) 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, rgba(237,237,237,1) 0%, rgba(214,214,214,1) 77%, rgba(232,232,232,1) 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, rgba(237,237,237,1) 0%,rgba(214,214,214,1) 77%,rgba(232,232,232,1) 100%); /* IE10+ */ + background: -o-linear-gradient(top, rgba(237,237,237,1) 0%,rgba(214,214,214,1) 77%,rgba(232,232,232,1) 100%); /* Opera 11.10+ */ + background: linear-gradient(to bottom, rgba(237,237,237,1) 0%,rgba(214,214,214,1) 77%,rgba(232,232,232,1) 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ededed', endColorstr='#e8e8e8',GradientType=0 ); /* IE6-9 */ +} + +ul.ColVis_collection li.ColVis_Special:hover { + background: #e2e2e2; /* Old browsers */ + background: -webkit-linear-gradient(top, #d0d0d0 0%,#d5d5d5 89%,#e2e2e2 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #d0d0d0 0%,#d5d5d5 89%,#e2e2e2 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, #d0d0d0 0%,#d5d5d5 89%,#e2e2e2 100%); /* IE10+ */ + background: -o-linear-gradient(top, #d0d0d0 0%,#d5d5d5 89%,#e2e2e2 100%); /* Opera 11.10+ */ + background: linear-gradient(top, #d0d0d0 0%,#d5d5d5 89%,#e2e2e2 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f3f3f3', endColorstr='#e2e2e2',GradientType=0 ); /* IE6-9 */ +} + + +span.ColVis_radio { + display: inline-block; + width: 20px; +} + +div.ColVis_catcher { + position: absolute; + z-index: 1101; +} + +.disabled { + color: #999; +} + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.colVis.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.colVis.min.css new file mode 100644 index 00000000..00ab37d7 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.colVis.min.css @@ -0,0 +1 @@ +div.ColVis{float:right;margin-bottom:1em}button.ColVis_Button,ul.ColVis_collection li{position:relative;float:left;margin-right:3px;padding:5px 8px;border:1px solid #999;cursor:pointer;*cursor:hand;font-size:0.88em;color:black !important;white-space:nowrap;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;-webkit-box-shadow:1px 1px 3px #ccc;-moz-box-shadow:1px 1px 3px #ccc;-ms-box-shadow:1px 1px 3px #ccc;-o-box-shadow:1px 1px 3px #ccc;box-shadow:1px 1px 3px #ccc;background:#ffffff;background:-webkit-linear-gradient(top, #fff 0%, #f3f3f3 89%, #f9f9f9 100%);background:-moz-linear-gradient(top, #fff 0%, #f3f3f3 89%, #f9f9f9 100%);background:-ms-linear-gradient(top, #fff 0%, #f3f3f3 89%, #f9f9f9 100%);background:-o-linear-gradient(top, #fff 0%, #f3f3f3 89%, #f9f9f9 100%);background:linear-gradient(top, #fff 0%, #f3f3f3 89%, #f9f9f9 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f9f9f9',GradientType=0 )}.ColVis_Button:hover,ul.ColVis_collection li:hover{border:1px solid #666;text-decoration:none !important;-webkit-box-shadow:1px 1px 3px #999;-moz-box-shadow:1px 1px 3px #999;-ms-box-shadow:1px 1px 3px #999;-o-box-shadow:1px 1px 3px #999;box-shadow:1px 1px 3px #999;background:#f3f3f3;background:-webkit-linear-gradient(top, #f3f3f3 0%, #e2e2e2 89%, #f4f4f4 100%);background:-moz-linear-gradient(top, #f3f3f3 0%, #e2e2e2 89%, #f4f4f4 100%);background:-ms-linear-gradient(top, #f3f3f3 0%, #e2e2e2 89%, #f4f4f4 100%);background:-o-linear-gradient(top, #f3f3f3 0%, #e2e2e2 89%, #f4f4f4 100%);background:linear-gradient(top, #f3f3f3 0%, #e2e2e2 89%, #f4f4f4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3f3f3', endColorstr='#f4f4f4',GradientType=0 )}button.ColVis_Button{height:30px;padding:3px 8px}button.ColVis_Button::-moz-focus-inner{border:none !important;padding:0}button.ColVis_Button:active{outline:none}div.ColVis_collectionBackground{position:fixed;top:0;left:0;height:100%;width:100%;background-color:black;z-index:1100}ul.ColVis_collection{list-style:none;width:150px;padding:8px 8px 4px 8px;margin:0;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.4);background-color:#f3f3f3;background-color:rgba(255,255,255,0.3);overflow:hidden;z-index:2002;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px;-webkit-box-shadow:3px 3px 5px rgba(0,0,0,0.3);-moz-box-shadow:3px 3px 5px rgba(0,0,0,0.3);-ms-box-shadow:3px 3px 5px rgba(0,0,0,0.3);-o-box-shadow:3px 3px 5px rgba(0,0,0,0.3);box-shadow:3px 3px 5px rgba(0,0,0,0.3)}ul.ColVis_collection li{position:relative;height:auto;left:0;right:0;padding:0.5em;display:block;float:none;margin-bottom:4px;-webkit-box-shadow:1px 1px 3px #999;-moz-box-shadow:1px 1px 3px #999;-ms-box-shadow:1px 1px 3px #999;-o-box-shadow:1px 1px 3px #999;box-shadow:1px 1px 3px #999}ul.ColVis_collection li{text-align:left}ul.ColVis_collection li.ColVis_Button:hover{border:1px solid #999;background-color:#f0f0f0}ul.ColVis_collection li span{display:inline-block;padding-left:0.5em;cursor:pointer}ul.ColVis_collection li.ColVis_Special{border-color:#555;background:#ededed;background:-webkit-linear-gradient(top, #ededed 0%, #d6d6d6 77%, #e8e8e8 100%);background:-moz-linear-gradient(top, #ededed 0%, #d6d6d6 77%, #e8e8e8 100%);background:-ms-linear-gradient(top, #ededed 0%, #d6d6d6 77%, #e8e8e8 100%);background:-o-linear-gradient(top, #ededed 0%, #d6d6d6 77%, #e8e8e8 100%);background:linear-gradient(to bottom, #ededed 0%, #d6d6d6 77%, #e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#e8e8e8',GradientType=0 )}ul.ColVis_collection li.ColVis_Special:hover{background:#e2e2e2;background:-webkit-linear-gradient(top, #d0d0d0 0%, #d5d5d5 89%, #e2e2e2 100%);background:-moz-linear-gradient(top, #d0d0d0 0%, #d5d5d5 89%, #e2e2e2 100%);background:-ms-linear-gradient(top, #d0d0d0 0%, #d5d5d5 89%, #e2e2e2 100%);background:-o-linear-gradient(top, #d0d0d0 0%, #d5d5d5 89%, #e2e2e2 100%);background:linear-gradient(top, #d0d0d0 0%, #d5d5d5 89%, #e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3f3f3', endColorstr='#e2e2e2',GradientType=0 )}span.ColVis_radio{display:inline-block;width:20px}div.ColVis_catcher{position:absolute;z-index:1101}.disabled{color:#999} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.colvis.jqueryui.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.colvis.jqueryui.css new file mode 100644 index 00000000..2d768732 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.colvis.jqueryui.css @@ -0,0 +1,23 @@ + +button.ColVis_Button, +ul.ColVis_collection li { + padding: 0.5em; +} + +ul.ColVis_collection { + margin: 0; + padding: 0; +} + +ul.ColVis_collection li { + clear: both; + display: block; + text-align: left; + margin: -1px 0 0 0; +} + +ul.ColVis_collection li span { + display: inline-block; + padding-left: 0.5em; + cursor: pointer; +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.fixedColumns.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.fixedColumns.css new file mode 100644 index 00000000..0377aef2 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.fixedColumns.css @@ -0,0 +1,24 @@ + + +/* Block out what is behind the fixed column's header and footer */ +table.DTFC_Cloned thead, +table.DTFC_Cloned tfoot { + background-color: white; +} + +/* Block out the gap above the scrollbar on the right, when there is a fixed + * right column + */ +div.DTFC_Blocker { + background-color: white; +} + +div.DTFC_LeftWrapper table.dataTable, +div.DTFC_RightWrapper table.dataTable { + margin-bottom: 0; +} + +div.DTFC_LeftWrapper table.dataTable.no-footer, +div.DTFC_RightWrapper table.dataTable.no-footer { + border-bottom: none; +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.fixedColumns.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.fixedColumns.min.css new file mode 100644 index 00000000..f0e5ff4c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.fixedColumns.min.css @@ -0,0 +1 @@ +table.DTFC_Cloned thead,table.DTFC_Cloned tfoot{background-color:white}div.DTFC_Blocker{background-color:white}div.DTFC_LeftWrapper table.dataTable,div.DTFC_RightWrapper table.dataTable{margin-bottom:0}div.DTFC_LeftWrapper table.dataTable.no-footer,div.DTFC_RightWrapper table.dataTable.no-footer{border-bottom:none} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.fixedHeader.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.fixedHeader.css new file mode 100644 index 00000000..724317a6 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.fixedHeader.css @@ -0,0 +1,7 @@ + + +div.FixedHeader_Cloned th, +div.FixedHeader_Cloned td { + background-color: white !important; +} + diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.fixedHeader.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.fixedHeader.min.css new file mode 100644 index 00000000..e276a91a --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.fixedHeader.min.css @@ -0,0 +1 @@ +div.FixedHeader_Cloned th,div.FixedHeader_Cloned td{background-color:white !important} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.foundation.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.foundation.css new file mode 100644 index 00000000..d1268a18 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.foundation.css @@ -0,0 +1,213 @@ +div.dataTables_wrapper { + margin-bottom: 1.25em; +} + +div.dataTables_length label, +div.dataTables_filter label, +div.dataTables_info { + color: #999; + font-weight: normal; +} + +div.dataTables_length { + padding-top: 6px; +} +div.dataTables_length label { + float: left; + text-align: left; +} + +div.dataTables_length select { + width: 75px; +} + +div.dataTables_filter label { + float: right; +} +div.dataTables_filter input { + display: inline-block !important; + width: auto !important; +} + +div.dataTables_info { + padding-top: 2px; + font-size: 0.875em; +} + +div.dataTables_paginate { + float: right; + margin: 0; +} + +table.dataTable { + clear: both; + margin-bottom: 0.5em !important; + max-width: none !important; + width: 100%; +} + +table.dataTable thead .sorting, +table.dataTable thead .sorting_asc, +table.dataTable thead .sorting_desc, +table.dataTable thead .sorting_asc_disabled, +table.dataTable thead .sorting_desc_disabled { + cursor: pointer; + *cursor: hand; +} + +table.dataTable thead .sorting { background: url('images/sort_both.png') no-repeat center right; } +table.dataTable thead .sorting_asc { background: url('images/sort_asc.png') no-repeat center right; } +table.dataTable thead .sorting_desc { background: url('images/sort_desc.png') no-repeat center right; } + +table.dataTable thead .sorting_asc_disabled { background: url('images/sort_asc_disabled.png') no-repeat center right; } +table.dataTable thead .sorting_desc_disabled { background: url('images/sort_desc_disabled.png') no-repeat center right; } + +table.dataTable th:active { + outline: none; +} + +/* Scrolling */ +div.dataTables_scrollHead table { + margin-bottom: 0 !important; +} + +div.dataTables_scrollBody table { + border-top: none; + margin-bottom: 0 !important; +} + +div.dataTables_scrollBody tbody tr:first-child th, +div.dataTables_scrollBody tbody tr:first-child td { + border-top: none; +} + +div.dataTables_scrollFoot table { + border-top: none; +} + + + + +/* + * TableTools styles + */ +.table tbody tr.active td, +.table tbody tr.active th { + background-color: #08C; + color: white; +} + +.table tbody tr.active:hover td, +.table tbody tr.active:hover th { + background-color: #0075b0 !important; +} + +.table-striped tbody tr.active:nth-child(odd) td, +.table-striped tbody tr.active:nth-child(odd) th { + background-color: #017ebc; +} + +table.DTTT_selectable tbody tr { + cursor: pointer; + *cursor: hand; +} + +div.DTTT { + float: left; + margin-bottom: 0; +} + +div.DTTT .button:hover { + text-decoration: none !important; +} + +ul.DTTT_dropdown.dropdown-menu li { + position: relative; +} + +ul.DTTT_dropdown.dropdown-menu li:hover a { + background-color: #0088cc; + color: white !important; +} + +/* TableTools information display */ +.DTTT_print_info { + position: fixed; + top: 50%; + left: 50%; + width: 400px; + height: 150px; + margin-left: -200px; + margin-top: -75px; + text-align: center; + color: #333; + padding: 10px 30px; + + background: #ffffff; /* Old browsers */ + background: -webkit-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* IE10+ */ + background: -o-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Opera 11.10+ */ + background: linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f9f9f9',GradientType=0 ); /* IE6-9 */ + + opacity: 0.95; + + border: 1px solid black; + border: 1px solid rgba(0, 0, 0, 0.5); + + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + -ms-border-radius: 6px; + -o-border-radius: 6px; + border-radius: 6px; + + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); + -ms-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); + -o-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); +} + +div.DTTT_print_info h6 { + font-weight: normal; + font-size: 28px; + line-height: 28px; + margin: 1em; +} + +div.DTTT_print_info p { + font-size: 14px; + line-height: 20px; +} + + + +/* + * FixedColumns styles + */ +div.DTFC_LeftHeadWrapper table, +div.DTFC_LeftFootWrapper table, +table.DTFC_Cloned tr.even { + background-color: white; +} + +div.DTFC_LeftHeadWrapper table { + margin-bottom: 0 !important; +} + +div.DTFC_LeftBodyWrapper table { + border-top: none; + margin-bottom: 0 !important; +} + +div.DTFC_LeftBodyWrapper tbody tr:first-child th, +div.DTFC_LeftBodyWrapper tbody tr:first-child td { + border-top: none; +} + +div.DTFC_LeftFootWrapper table { + border-top: none; +} + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.jqueryui.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.jqueryui.css new file mode 100644 index 00000000..f4a28a9e --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.jqueryui.css @@ -0,0 +1,316 @@ +/* + * Table styles + */ +table.dataTable { + width: 100%; + margin: 0 auto; + clear: both; + border-collapse: separate; + border-spacing: 0; + /* + * Header and footer styles + */ + /* + * Body styles + */ +} +table.dataTable thead th, +table.dataTable thead td, +table.dataTable tfoot th, +table.dataTable tfoot td { + padding: 4px 10px; +} +table.dataTable thead th, +table.dataTable tfoot th { + font-weight: bold; +} +table.dataTable thead th:active, +table.dataTable thead td:active { + outline: none; +} +table.dataTable thead .sorting_asc, +table.dataTable thead .sorting_desc, +table.dataTable thead .sorting { + cursor: pointer; + *cursor: hand; +} +table.dataTable thead th div.DataTables_sort_wrapper { + position: relative; + padding-right: 10px; +} +table.dataTable thead th div.DataTables_sort_wrapper span { + position: absolute; + top: 50%; + margin-top: -8px; + right: -5px; +} +table.dataTable thead th.ui-state-default { + border-right-width: 0; +} +table.dataTable thead th.ui-state-default:last-child { + border-right-width: 1px; +} +table.dataTable tbody tr { + background-color: white; +} +table.dataTable tbody tr.selected { + background-color: #b0bed9; +} +table.dataTable tbody th, +table.dataTable tbody td { + padding: 8px 10px; +} +table.dataTable th.center, +table.dataTable td.center, +table.dataTable td.dataTables_empty { + text-align: center; +} +table.dataTable th.right, +table.dataTable td.right { + text-align: right; +} +table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td { + border-top: 1px solid #dddddd; +} +table.dataTable.row-border tbody tr:first-child th, +table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th, +table.dataTable.display tbody tr:first-child td { + border-top: none; +} +table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td { + border-top: 1px solid #dddddd; + border-right: 1px solid #dddddd; +} +table.dataTable.cell-border tbody tr th:first-child, +table.dataTable.cell-border tbody tr td:first-child { + border-left: 1px solid #dddddd; +} +table.dataTable.cell-border tbody tr:first-child th, +table.dataTable.cell-border tbody tr:first-child td { + border-top: none; +} +table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd { + background-color: #f9f9f9; +} +table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected { + background-color: #abb9d3; +} +table.dataTable.hover tbody tr:hover, +table.dataTable.hover tbody tr.odd:hover, +table.dataTable.hover tbody tr.even:hover, table.dataTable.display tbody tr:hover, +table.dataTable.display tbody tr.odd:hover, +table.dataTable.display tbody tr.even:hover { + background-color: whitesmoke; +} +table.dataTable.hover tbody tr:hover.selected, +table.dataTable.hover tbody tr.odd:hover.selected, +table.dataTable.hover tbody tr.even:hover.selected, table.dataTable.display tbody tr:hover.selected, +table.dataTable.display tbody tr.odd:hover.selected, +table.dataTable.display tbody tr.even:hover.selected { + background-color: #a9b7d1; +} +table.dataTable.order-column tbody tr > .sorting_1, +table.dataTable.order-column tbody tr > .sorting_2, +table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1, +table.dataTable.display tbody tr > .sorting_2, +table.dataTable.display tbody tr > .sorting_3 { + background-color: #f9f9f9; +} +table.dataTable.order-column tbody tr.selected > .sorting_1, +table.dataTable.order-column tbody tr.selected > .sorting_2, +table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1, +table.dataTable.display tbody tr.selected > .sorting_2, +table.dataTable.display tbody tr.selected > .sorting_3 { + background-color: #acbad4; +} +table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 { + background-color: #f1f1f1; +} +table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 { + background-color: #f3f3f3; +} +table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 { + background-color: whitesmoke; +} +table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 { + background-color: #a6b3cd; +} +table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 { + background-color: #a7b5ce; +} +table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 { + background-color: #a9b6d0; +} +table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 { + background-color: #f9f9f9; +} +table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 { + background-color: #fbfbfb; +} +table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 { + background-color: #fdfdfd; +} +table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 { + background-color: #acbad4; +} +table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 { + background-color: #adbbd6; +} +table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 { + background-color: #afbdd8; +} +table.dataTable.display tbody tr:hover > .sorting_1, +table.dataTable.display tbody tr.odd:hover > .sorting_1, +table.dataTable.display tbody tr.even:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1, +table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_1, +table.dataTable.order-column.hover tbody tr.even:hover > .sorting_1 { + background-color: #eaeaea; +} +table.dataTable.display tbody tr:hover > .sorting_2, +table.dataTable.display tbody tr.odd:hover > .sorting_2, +table.dataTable.display tbody tr.even:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2, +table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_2, +table.dataTable.order-column.hover tbody tr.even:hover > .sorting_2 { + background-color: #ebebeb; +} +table.dataTable.display tbody tr:hover > .sorting_3, +table.dataTable.display tbody tr.odd:hover > .sorting_3, +table.dataTable.display tbody tr.even:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3, +table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_3, +table.dataTable.order-column.hover tbody tr.even:hover > .sorting_3 { + background-color: #eeeeee; +} +table.dataTable.display tbody tr:hover.selected > .sorting_1, +table.dataTable.display tbody tr.odd:hover.selected > .sorting_1, +table.dataTable.display tbody tr.even:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1, +table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_1, +table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_1 { + background-color: #a1aec7; +} +table.dataTable.display tbody tr:hover.selected > .sorting_2, +table.dataTable.display tbody tr.odd:hover.selected > .sorting_2, +table.dataTable.display tbody tr.even:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2, +table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_2, +table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_2 { + background-color: #a2afc8; +} +table.dataTable.display tbody tr:hover.selected > .sorting_3, +table.dataTable.display tbody tr.odd:hover.selected > .sorting_3, +table.dataTable.display tbody tr.even:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3, +table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_3, +table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_3 { + background-color: #a4b2cb; +} + +table.dataTable, +table.dataTable th, +table.dataTable td { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +/* + * Control feature layout + */ +.dataTables_wrapper { + position: relative; + clear: both; + *zoom: 1; + zoom: 1; +} +.dataTables_wrapper .dataTables_length { + float: left; +} +.dataTables_wrapper .dataTables_filter { + float: right; + text-align: right; +} +.dataTables_wrapper .dataTables_filter input { + margin-left: 0.5em; +} +.dataTables_wrapper .dataTables_info { + clear: both; + float: left; + padding-top: 0.55em; +} +.dataTables_wrapper .dataTables_paginate { + float: right; + text-align: right; +} +.dataTables_wrapper .dataTables_paginate .fg-button { + box-sizing: border-box; + display: inline-block; + min-width: 1.5em; + padding: 0.5em; + margin-left: 2px; + text-align: center; + text-decoration: none !important; + cursor: pointer; + *cursor: hand; + color: #333333 !important; + border: 1px solid transparent; +} +.dataTables_wrapper .dataTables_paginate .fg-button:active { + outline: none; +} +.dataTables_wrapper .dataTables_paginate .fg-button:first-child { + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; +} +.dataTables_wrapper .dataTables_paginate .fg-button:last-child { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} +.dataTables_wrapper .dataTables_processing { + position: absolute; + top: 50%; + left: 50%; + width: 100%; + height: 40px; + margin-left: -50%; + margin-top: -25px; + padding-top: 20px; + text-align: center; + font-size: 1.2em; + background-color: white; + background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0))); + /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* FF3.6+ */ + background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* IE10+ */ + background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* Opera 11.10+ */ + background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* W3C */ +} +.dataTables_wrapper .dataTables_length, +.dataTables_wrapper .dataTables_filter, +.dataTables_wrapper .dataTables_info, +.dataTables_wrapper .dataTables_processing, +.dataTables_wrapper .dataTables_paginate { + color: #333333; +} +.dataTables_wrapper .dataTables_scroll { + clear: both; +} +.dataTables_wrapper .dataTables_scrollBody { + *margin-top: -1px; + -webkit-overflow-scrolling: touch; +} +.dataTables_wrapper .ui-widget-header { + font-weight: normal; +} +.dataTables_wrapper .ui-toolbar { + padding: 8px; +} +.dataTables_wrapper:after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.jqueryui.scss b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.jqueryui.scss new file mode 100644 index 00000000..910dc6a8 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.jqueryui.scss @@ -0,0 +1,408 @@ + + + // + // Colour customisation + // + +// Border between the header (and footer) and the table body +$table-header-border: 1px solid #111; + +// Border of rows / cells +$table-body-border: 1px solid #ddd; + +// Row background colour (hover, striping etc are all based on this colour and +// calculated automatically) +$table-row-background: #ffffff; + +// Row colour, when selected (tr.selected) +$table-row-selected: #B0BED9; + +// Text colour of the interaction control elements (info, filter, paging etc) +$table-control-color: #333; + +// Highlight colour of the paging button for the current page +$table-paging-button-active: #dcdcdc; + +// Hover colour of paging buttons on mouse over +$table-paging-button-hover: #111; + + + +// +// Functions / mixins +// +@function tint( $color, $percent ) { + @return mix(white, $color, $percent); +} + +@function shade( $color, $percent ) { + @return mix(black, $color, $percent); +} + +@mixin gradient( $from, $to ) { + background-color: $from; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$from), color-stop(100%,$to)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, $from 0%, $to 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, $from 0%, $to 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, $from 0%, $to 100%); /* IE10+ */ + background: -o-linear-gradient(top, $from 0%, $to 100%); /* Opera 11.10+ */ + background: linear-gradient(to bottom, $from 0%, $to 100%); /* W3C */ +} + + +/* + * Table styles + */ +table.dataTable { + width: 100%; + margin: 0 auto; + clear: both; + border-collapse: separate; + border-spacing: 0; + + /* + * Header and footer styles + */ + thead, + tfoot { + th, + td { + padding: 4px 10px; + } + + th { + font-weight: bold; + } + } + + thead th, + thead td { + &:active { + outline: none; + } + } + + // Sorting + thead { + .sorting_asc, + .sorting_desc, + .sorting { + cursor: pointer; + *cursor: hand; + } + + th div.DataTables_sort_wrapper { + position: relative; + padding-right: 10px; + + span { + position: absolute; + top: 50%; + margin-top: -8px; + right: -5px; + } + } + + th.ui-state-default { + border-right-width: 0; + + &:last-child { + border-right-width: 1px; + } + } + } + + + /* + * Body styles + */ + tbody { + tr { + background-color: $table-row-background; + + &.selected { + background-color: $table-row-selected; + } + } + + th, + td { + padding: 8px 10px; + } + } + + th.center, + td.center, + td.dataTables_empty { + text-align: center; + } + + th.right, + td.right { + text-align: right; + } + + + // Stripe classes - add "row-border" class to the table to activate + &.row-border tbody, + &.display tbody { + th, td { + border-top: $table-body-border; + } + + tr:first-child th, + tr:first-child td { + border-top: none; + } + } + + + // Stripe classes - add "cell-border" class to the table to activate + &.cell-border tbody { + th, td { + border-top: $table-body-border; + border-right: $table-body-border; + } + + tr th:first-child, + tr td:first-child { + border-left: $table-body-border; + } + + tr:first-child th, + tr:first-child td { + border-top: none; + } + } + + + // Stripe classes - add "stripe" class to the table to activate + &.stripe tbody, + &.display tbody { + tr.odd { + background-color: shade($table-row-background, 2.35%); // shade by f9 + + &.selected { + background-color: shade($table-row-selected, 2.35%); + } + } + } + + + // Hover classes - add "hover" class to the table to activate + &.hover tbody, + &.display tbody { + tr:hover, + tr.odd:hover, + tr.even:hover { + background-color: shade($table-row-background, 3.6%); // shade by f5 + + &.selected { + background-color: shade($table-row-selected, 3.6%); + } + } + } + + + // Sort column highlighting - add "hover" class to the table to activate + &.order-column, + &.display { + tbody { + tr>.sorting_1, + tr>.sorting_2, + tr>.sorting_3 { + background-color: shade($table-row-background, 2%); // shade by fa + } + + tr.selected>.sorting_1, + tr.selected>.sorting_2, + tr.selected>.sorting_3 { + background-color: shade($table-row-selected, 2%); + } + } + } + + &.display tbody, + &.order-column.stripe tbody { + tr.odd { + >.sorting_1 { background-color: shade($table-row-background, 5.4%); } // shade by f1 + >.sorting_2 { background-color: shade($table-row-background, 4.7%); } // shade by f3 + >.sorting_3 { background-color: shade($table-row-background, 3.9%); } // shade by f5 + + &.selected { + >.sorting_1 { background-color: shade($table-row-selected, 5.4%); } + >.sorting_2 { background-color: shade($table-row-selected, 4.7%); } + >.sorting_3 { background-color: shade($table-row-selected, 3.9%); } + } + } + + tr.even { + >.sorting_1 { background-color: shade($table-row-background, 2%); } // shade by fa + >.sorting_2 { background-color: shade($table-row-background, 1.2%); } // shade by fc + >.sorting_3 { background-color: shade($table-row-background, 0.4%); } // shade by fe + + &.selected { + >.sorting_1 { background-color: shade($table-row-selected, 2%); } + >.sorting_2 { background-color: shade($table-row-selected, 1.2%); } + >.sorting_3 { background-color: shade($table-row-selected, 0.4%); } + } + } + } + + &.display tbody, + &.order-column.hover tbody { + tr:hover, + tr.odd:hover, + tr.even:hover { + >.sorting_1 { background-color: shade($table-row-background, 8.2%); } // shade by ea + >.sorting_2 { background-color: shade($table-row-background, 7.5%); } // shade by ec + >.sorting_3 { background-color: shade($table-row-background, 6.3%); } // shade by ef + + &.selected { + >.sorting_1 { background-color: shade($table-row-selected, 8.2%); } + >.sorting_2 { background-color: shade($table-row-selected, 7.5%); } + >.sorting_3 { background-color: shade($table-row-selected, 6.3%); } + } + } + } +} + +// Its not uncommon to use * {border-box} now, but it messes up the column width +// calculations, so use content-box for the table and cells +table.dataTable, +table.dataTable th, +table.dataTable td { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + + + +/* + * Control feature layout + */ +.dataTables_wrapper { + position: relative; + clear: both; + *zoom: 1; + + // Page length options + .dataTables_length { + float: left; + } + + // Filtering input + .dataTables_filter { + float: right; + text-align: right; + + input { + margin-left: 0.5em; + } + } + + // Table info + .dataTables_info { + clear: both; + float: left; + padding-top: 0.55em; + } + + // Paging + .dataTables_paginate { + float: right; + text-align: right; + + .fg-button { + box-sizing: border-box; + display: inline-block; + min-width: 1.5em; + padding: 0.5em; + margin-left: 2px; + text-align: center; + text-decoration: none !important; + cursor: pointer; + *cursor: hand; + + color: $table-control-color !important; + border: 1px solid transparent; + + &:active { + outline: none; + } + } + + .fg-button:first-child { + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + } + + .fg-button:last-child { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + } + } + + // Processing + .dataTables_processing { + position: absolute; + top: 50%; + left: 50%; + width: 100%; + height: 40px; + margin-left: -50%; + margin-top: -25px; + padding-top: 20px; + + text-align: center; + font-size: 1.2em; + + background-color: white; + background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba($table-row-background, 0)), color-stop(25%,rgba($table-row-background, 0.9)), color-stop(75%,rgba($table-row-background, 0.9)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, rgba($table-row-background, 0) 0%, rgba($table-row-background, 0.9) 25%, rgba($table-row-background, 0.9) 75%, rgba($table-row-background, 0) 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(left, rgba($table-row-background, 0) 0%, rgba($table-row-background, 0.9) 25%, rgba($table-row-background, 0.9) 75%, rgba($table-row-background, 0) 100%); /* FF3.6+ */ + background: -ms-linear-gradient(left, rgba($table-row-background, 0) 0%, rgba($table-row-background, 0.9) 25%, rgba($table-row-background, 0.9) 75%, rgba($table-row-background, 0) 100%); /* IE10+ */ + background: -o-linear-gradient(left, rgba($table-row-background, 0) 0%, rgba($table-row-background, 0.9) 25%, rgba($table-row-background, 0.9) 75%, rgba($table-row-background, 0) 100%); /* Opera 11.10+ */ + background: linear-gradient(to right, rgba($table-row-background, 0) 0%, rgba($table-row-background, 0.9) 25%, rgba($table-row-background, 0.9) 75%, rgba($table-row-background, 0) 100%); /* W3C */ + } + + .dataTables_length, + .dataTables_filter, + .dataTables_info, + .dataTables_processing, + .dataTables_paginate { + color: $table-control-color; + } + + // Scrolling + .dataTables_scroll { + clear: both; + } + + .dataTables_scrollBody { + *margin-top: -1px; + -webkit-overflow-scrolling: touch; + } + + + .ui-widget-header { + font-weight: normal; + } + + .ui-toolbar { + padding: 8px; + } + + // Self clear the wrapper + &:after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; + } + zoom: 1; // Poor old IE +} + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.keyTable.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.keyTable.css new file mode 100644 index 00000000..2759df1b --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.keyTable.css @@ -0,0 +1,7 @@ + + +table.KeyTable th.focus, +table.KeyTable td.focus { + outline: 3px solid #3366FF; + outline-offset: -3px; +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.keyTable.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.keyTable.min.css new file mode 100644 index 00000000..db040201 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.keyTable.min.css @@ -0,0 +1 @@ +table.KeyTable th.focus,table.KeyTable td.focus{outline:3px solid #3366FF;outline-offset:-3px} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.responsive.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.responsive.css new file mode 100644 index 00000000..fd57fd6a --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.responsive.css @@ -0,0 +1,93 @@ +table.dataTable.dtr-inline.collapsed tbody td:first-child, +table.dataTable.dtr-inline.collapsed tbody th:first-child { + position: relative; + padding-left: 30px; + cursor: pointer; +} +table.dataTable.dtr-inline.collapsed tbody td:first-child:before, +table.dataTable.dtr-inline.collapsed tbody th:first-child:before { + top: 8px; + left: 4px; + height: 16px; + width: 16px; + display: block; + position: absolute; + color: white; + border: 2px solid white; + border-radius: 16px; + text-align: center; + line-height: 14px; + box-shadow: 0 0 3px #444; + box-sizing: content-box; + content: '+'; + background-color: #31b131; +} +table.dataTable.dtr-inline.collapsed tbody td:first-child.dataTables_empty:before, +table.dataTable.dtr-inline.collapsed tbody th:first-child.dataTables_empty:before { + display: none; +} +table.dataTable.dtr-inline.collapsed tbody tr.parent td:first-child:before, +table.dataTable.dtr-inline.collapsed tbody tr.parent th:first-child:before { + content: '-'; + background-color: #d33333; +} +table.dataTable.dtr-inline.collapsed tbody tr.child td:before { + display: none; +} +table.dataTable.dtr-column tbody td.control, +table.dataTable.dtr-column tbody th.control { + position: relative; + cursor: pointer; +} +table.dataTable.dtr-column tbody td.control:before, +table.dataTable.dtr-column tbody th.control:before { + top: 50%; + left: 50%; + height: 16px; + width: 16px; + margin-top: -10px; + margin-left: -10px; + display: block; + position: absolute; + color: white; + border: 2px solid white; + border-radius: 16px; + text-align: center; + line-height: 14px; + box-shadow: 0 0 3px #444; + box-sizing: content-box; + content: '+'; + background-color: #31b131; +} +table.dataTable.dtr-column tbody tr.parent td.control:before, +table.dataTable.dtr-column tbody tr.parent th.control:before { + content: '-'; + background-color: #d33333; +} +table.dataTable tr.child { + padding: 0.5em 1em; +} +table.dataTable tr.child:hover { + background: transparent !important; +} +table.dataTable tr.child ul { + display: inline-block; + list-style-type: none; + margin: 0; + padding: 0; +} +table.dataTable tr.child ul li { + border-bottom: 1px solid #efefef; + padding: 0.5em 0; +} +table.dataTable tr.child ul li:first-child { + padding-top: 0; +} +table.dataTable tr.child ul li:last-child { + border-bottom: none; +} +table.dataTable tr.child span.dtr-title { + display: inline-block; + min-width: 75px; + font-weight: bold; +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.responsive.scss b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.responsive.scss new file mode 100644 index 00000000..16cc054f --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.responsive.scss @@ -0,0 +1,132 @@ + +// +// Mixins +// +@mixin control() { + display: block; + position: absolute; + color: white; + border: 2px solid white; + border-radius: 16px; + text-align: center; + line-height: 14px; + box-shadow: 0 0 3px #444; + box-sizing: content-box; +} + +@mixin control-open() { + content: '+'; + background-color: #31b131; +} + +@mixin control-close() { + content: '-'; + background-color: #d33333; +} + + +// +// Table styles +// +table.dataTable { + // Styling for the `inline` type + &.dtr-inline.collapsed tbody { + td:first-child, + th:first-child { + position: relative; + padding-left: 30px; + cursor: pointer; + + &:before { + top: 8px; + left: 4px; + height: 16px; + width: 16px; + @include control; + @include control-open; + } + + &.dataTables_empty:before { + display: none; + } + } + + tr.parent { + td:first-child:before, + th:first-child:before { + @include control-close; + } + } + + tr.child td:before { + display: none; + } + } + + + // Styling for the `column` type + &.dtr-column tbody { + td.control, + th.control { + position: relative; + cursor: pointer; + + &:before { + top: 50%; + left: 50%; + height: 16px; + width: 16px; + margin-top: -10px; + margin-left: -10px; + @include control; + @include control-open; + } + } + + tr.parent { + td.control:before, + th.control:before { + @include control-close; + } + } + } + + + // Child row styling + tr.child { + padding: 0.5em 1em; + + &:hover { + background: transparent !important; + } + + ul { + display: inline-block; + list-style-type: none; + margin: 0; + padding: 0; + + li { + border-bottom: 1px solid #efefef; + padding: 0.5em 0; + + &:first-child { + padding-top: 0; + } + + &:last-child { + border-bottom: none; + } + } + } + + span.dtr-title { + display: inline-block; + min-width: 75px; + font-weight: bold; + } + + span.dtr-data {} + } +} + diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.scroller.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.scroller.css new file mode 100644 index 00000000..4bbaa575 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.scroller.css @@ -0,0 +1,44 @@ + +/* + * Namespace: DTS (DataTables Scroller) + */ + +div.DTS tbody th, +div.DTS tbody td { + white-space: nowrap; +} + +div.DTS tbody tr.even { + background-color: white; +} + +div.DTS div.DTS_Loading { + position: absolute; + top: 50%; + left: 50%; + width: 200px; + height: 20px; + margin-top: -20px; + margin-left: -100px; + z-index: 1; + + border: 1px solid #999; + padding: 20px 0; + text-align: center; + background-color: white; + background-color: rgba(255, 255, 255, 0.5); +} + +div.DTS div.dataTables_scrollHead, +div.DTS div.dataTables_scrollFoot { + background-color: white; +} + +div.DTS div.dataTables_scrollBody { + z-index: 2; +} + +div.DTS div.dataTables_scroll { + background: url('../images/loading-background.png') repeat 0 0; +} + diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.scroller.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.scroller.min.css new file mode 100644 index 00000000..499b85d6 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.scroller.min.css @@ -0,0 +1 @@ +div.DTS tbody th,div.DTS tbody td{white-space:nowrap}div.DTS tbody tr.even{background-color:white}div.DTS div.DTS_Loading{position:absolute;top:50%;left:50%;width:200px;height:20px;margin-top:-20px;margin-left:-100px;z-index:1;border:1px solid #999;padding:20px 0;text-align:center;background-color:white;background-color:rgba(255,255,255,0.5)}div.DTS div.dataTables_scrollHead,div.DTS div.dataTables_scrollFoot{background-color:white}div.DTS div.dataTables_scrollBody{z-index:2}div.DTS div.dataTables_scroll{background:url("../images/loading-background.png") repeat 0 0} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.tableTools.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.tableTools.css new file mode 100644 index 00000000..844ca421 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.tableTools.css @@ -0,0 +1,361 @@ +/* + * File: TableTools.css + * Description: Styles for TableTools 2 + * Author: Allan Jardine (www.sprymedia.co.uk) + * Language: Javascript + * License: GPL v2 / 3 point BSD + * Project: DataTables + * + * Copyright 2009-2012 Allan Jardine, all rights reserved. + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * + * CSS name space: + * DTTT DataTables TableTools + * + * Style sheet provides: + * CONTAINER TableTools container element and styles applying to all components + * BUTTON_STYLES Action specific button styles + * SELECTING Row selection styles + * COLLECTIONS Drop down list (collection) styles + * PRINTING Print display styles + */ + + +/* + * CONTAINER + * TableTools container element and styles applying to all components + */ +div.DTTT_container { + position: relative; + float: right; + margin-bottom: 1em; +} + +@media screen and (max-width: 640px) { + div.DTTT_container { + float: none !important; + text-align: center; + } + + div.DTTT_container:after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; + } +} + + +button.DTTT_button, +div.DTTT_button, +a.DTTT_button { + position: relative; + display: inline-block; + margin-right: 3px; + padding: 5px 8px; + border: 1px solid #999; + cursor: pointer; + *cursor: hand; + font-size: 0.88em; + color: black !important; + + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + + -webkit-box-shadow: 1px 1px 3px #ccc; + -moz-box-shadow: 1px 1px 3px #ccc; + -ms-box-shadow: 1px 1px 3px #ccc; + -o-box-shadow: 1px 1px 3px #ccc; + box-shadow: 1px 1px 3px #ccc; + + /* Generated by http://www.colorzilla.com/gradient-editor/ */ + background: #ffffff; /* Old browsers */ + background: -webkit-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* IE10+ */ + background: -o-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Opera 11.10+ */ + background: linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f9f9f9',GradientType=0 ); /* IE6-9 */ +} + + +/* Buttons are cunning border-box sizing - we can't just use that for A and DIV due to IE6/7 */ +button.DTTT_button { + height: 30px; + padding: 3px 8px; +} + +.DTTT_button embed { + outline: none; +} + +button.DTTT_button:hover, +div.DTTT_button:hover, +a.DTTT_button:hover { + border: 1px solid #666; + text-decoration: none !important; + + -webkit-box-shadow: 1px 1px 3px #999; + -moz-box-shadow: 1px 1px 3px #999; + -ms-box-shadow: 1px 1px 3px #999; + -o-box-shadow: 1px 1px 3px #999; + box-shadow: 1px 1px 3px #999; + + background: #f3f3f3; /* Old browsers */ + background: -webkit-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* IE10+ */ + background: -o-linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* Opera 11.10+ */ + background: linear-gradient(top, #f3f3f3 0%,#e2e2e2 89%,#f4f4f4 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f3f3f3', endColorstr='#f4f4f4',GradientType=0 ); /* IE6-9 */ +} + +button.DTTT_button:focus, +div.DTTT_button:focus, +a.DTTT_button:focus { + border: 1px solid #426c9e; + text-shadow: 0 1px 0 #c4def1; + outline: none; + + background-color: #a3d0ef 100%; + background-image: -webkit-linear-gradient(top, #a3d0ef 0%, #79ace9 65%, #a3d0ef 100%); + background-image: -moz-linear-gradient(top, #a3d0ef 0%, #79ace9 65%, #a3d0ef 100%); + background-image: -ms-linear-gradient(top, #a3d0ef 0%, #79ace9 65%, #a3d0ef 100%); + background-image: -o-linear-gradient(top, #a3d0ef 0%, #79ace9 65%, #a3d0ef 100%); + background-image: linear-gradient(top, #a3d0ef 0%, #79ace9 65%, #a3d0ef 100%); + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#a3d0ef', EndColorStr='#a3d0ef'); +} + +button.DTTT_button:active, +div.DTTT_button:active, +a.DTTT_button:active { + -webkit-box-shadow: inset 1px 1px 3px #999999; + -moz-box-shadow: inset 1px 1px 3px #999999; + box-shadow: inset 1px 1px 3px #999999; +} + +button.DTTT_disabled, +div.DTTT_disabled, +a.DTTT_disabled { + color: #999; + border: 1px solid #d0d0d0; + + background: #ffffff; /* Old browsers */ + background: -webkit-linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* IE10+ */ + background: -o-linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* Opera 11.10+ */ + background: linear-gradient(top, #ffffff 0%,#f9f9f9 89%,#fafafa 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fafafa',GradientType=0 ); /* IE6-9 */ +} + + + +/* + * BUTTON_STYLES + * Action specific button styles + * If you want images - comment this back in + +a.DTTT_button_csv, +a.DTTT_button_xls, +a.DTTT_button_copy, +a.DTTT_button_pdf, +a.DTTT_button_print { + padding-right: 0px; +} + +a.DTTT_button_csv span, +a.DTTT_button_xls span, +a.DTTT_button_copy span, +a.DTTT_button_pdf span, +a.DTTT_button_print span { + display: inline-block; + height: 24px; + line-height: 24px; + padding-right: 30px; +} + + +a.DTTT_button_csv span { background: url(../images/csv.png) no-repeat bottom right; } +a.DTTT_button_csv:hover span { background: url(../images/csv_hover.png) no-repeat center right; } + +a.DTTT_button_xls span { background: url(../images/xls.png) no-repeat center right; } +a.DTTT_button_xls:hover span { background: #f0f0f0 url(../images/xls_hover.png) no-repeat center right; } + +a.DTTT_button_copy span { background: url(../images/copy.png) no-repeat center right; } +a.DTTT_button_copy:hover span { background: #f0f0f0 url(../images/copy_hover.png) no-repeat center right; } + +a.DTTT_button_pdf span { background: url(../images/pdf.png) no-repeat center right; } +a.DTTT_button_pdf:hover span { background: #f0f0f0 url(../images/pdf_hover.png) no-repeat center right; } + +a.DTTT_button_print span { background: url(../images/print.png) no-repeat center right; } +a.DTTT_button_print:hover span { background: #f0f0f0 url(../images/print_hover.png) no-repeat center right; } + + */ + +button.DTTT_button_collection span { + padding-right: 17px; + background: url(../images/collection.png) no-repeat center right; +} + +button.DTTT_button_collection:hover span { + padding-right: 17px; + background: #f0f0f0 url(../images/collection_hover.png) no-repeat center right; +} + + +/* + * SELECTING + * Row selection styles + */ +table.DTTT_selectable tbody tr { + cursor: pointer; + *cursor: hand; +} + +table.dataTable tr.DTTT_selected.odd { + background-color: #9FAFD1; +} + +table.dataTable tr.DTTT_selected.odd td.sorting_1 { + background-color: #9FAFD1; +} + +table.dataTable tr.DTTT_selected.odd td.sorting_2 { + background-color: #9FAFD1; +} + +table.dataTable tr.DTTT_selected.odd td.sorting_3 { + background-color: #9FAFD1; +} + + +table.dataTable tr.DTTT_selected.even { + background-color: #B0BED9; +} + +table.dataTable tr.DTTT_selected.even td.sorting_1 { + background-color: #B0BED9; +} + +table.dataTable tr.DTTT_selected.even td.sorting_2 { + background-color: #B0BED9; +} + +table.dataTable tr.DTTT_selected.even td.sorting_3 { + background-color: #B0BED9; +} + + +/* + * COLLECTIONS + * Drop down list (collection) styles + */ + +div.DTTT_collection { + width: 150px; + padding: 8px 8px 4px 8px; + border: 1px solid #ccc; + border: 1px solid rgba( 0, 0, 0, 0.4 ); + background-color: #f3f3f3; + background-color: rgba( 255, 255, 255, 0.3 ); + overflow: hidden; + z-index: 2002; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + -ms-border-radius: 5px; + -o-border-radius: 5px; + border-radius: 5px; + + -webkit-box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); + -ms-box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); + -o-box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); + box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3); +} + +div.DTTT_collection_background { + background: transparent url(../images/background.png) repeat top left; + z-index: 2001; +} + +div.DTTT_collection button.DTTT_button, +div.DTTT_collection div.DTTT_button, +div.DTTT_collection a.DTTT_button { + position: relative; + left: 0; + right: 0; + + display: block; + float: none; + margin-bottom: 4px; + + -webkit-box-shadow: 1px 1px 3px #999; + -moz-box-shadow: 1px 1px 3px #999; + -ms-box-shadow: 1px 1px 3px #999; + -o-box-shadow: 1px 1px 3px #999; + box-shadow: 1px 1px 3px #999; +} + + +/* + * PRINTING + * Print display styles + */ + +.DTTT_print_info { + position: fixed; + top: 50%; + left: 50%; + width: 400px; + height: 150px; + margin-left: -200px; + margin-top: -75px; + text-align: center; + color: #333; + padding: 10px 30px; + + background: #ffffff; /* Old browsers */ + background: -webkit-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* FF3.6+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* IE10+ */ + background: -o-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Opera 11.10+ */ + background: linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f9f9f9',GradientType=0 ); /* IE6-9 */ + + opacity: 0.95; + + border: 1px solid black; + border: 1px solid rgba(0, 0, 0, 0.5); + + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + -ms-border-radius: 6px; + -o-border-radius: 6px; + border-radius: 6px; + + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); + -ms-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); + -o-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5); +} + +.DTTT_print_info h6 { + font-weight: normal; + font-size: 28px; + line-height: 28px; + margin: 1em; +} + +.DTTT_print_info p { + font-size: 14px; + line-height: 20px; +} + diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.tableTools.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.tableTools.min.css new file mode 100644 index 00000000..a6ffb818 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/dataTables.tableTools.min.css @@ -0,0 +1 @@ +div.DTTT_container{position:relative;float:right;margin-bottom:1em}@media screen and (max-width: 640px){div.DTTT_container{float:none !important;text-align:center}div.DTTT_container:after{visibility:hidden;display:block;content:"";clear:both;height:0}}button.DTTT_button,div.DTTT_button,a.DTTT_button{position:relative;display:inline-block;margin-right:3px;padding:5px 8px;border:1px solid #999;cursor:pointer;*cursor:hand;font-size:0.88em;color:black !important;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;-webkit-box-shadow:1px 1px 3px #ccc;-moz-box-shadow:1px 1px 3px #ccc;-ms-box-shadow:1px 1px 3px #ccc;-o-box-shadow:1px 1px 3px #ccc;box-shadow:1px 1px 3px #ccc;background:#ffffff;background:-webkit-linear-gradient(top, #fff 0%, #f3f3f3 89%, #f9f9f9 100%);background:-moz-linear-gradient(top, #fff 0%, #f3f3f3 89%, #f9f9f9 100%);background:-ms-linear-gradient(top, #fff 0%, #f3f3f3 89%, #f9f9f9 100%);background:-o-linear-gradient(top, #fff 0%, #f3f3f3 89%, #f9f9f9 100%);background:linear-gradient(top, #fff 0%, #f3f3f3 89%, #f9f9f9 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f9f9f9',GradientType=0 )}button.DTTT_button{height:30px;padding:3px 8px}.DTTT_button embed{outline:none}button.DTTT_button:hover,div.DTTT_button:hover,a.DTTT_button:hover{border:1px solid #666;text-decoration:none !important;-webkit-box-shadow:1px 1px 3px #999;-moz-box-shadow:1px 1px 3px #999;-ms-box-shadow:1px 1px 3px #999;-o-box-shadow:1px 1px 3px #999;box-shadow:1px 1px 3px #999;background:#f3f3f3;background:-webkit-linear-gradient(top, #f3f3f3 0%, #e2e2e2 89%, #f4f4f4 100%);background:-moz-linear-gradient(top, #f3f3f3 0%, #e2e2e2 89%, #f4f4f4 100%);background:-ms-linear-gradient(top, #f3f3f3 0%, #e2e2e2 89%, #f4f4f4 100%);background:-o-linear-gradient(top, #f3f3f3 0%, #e2e2e2 89%, #f4f4f4 100%);background:linear-gradient(top, #f3f3f3 0%, #e2e2e2 89%, #f4f4f4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3f3f3', endColorstr='#f4f4f4',GradientType=0 )}button.DTTT_button:focus,div.DTTT_button:focus,a.DTTT_button:focus{border:1px solid #426c9e;text-shadow:0 1px 0 #c4def1;outline:none;background-color:#a3d0ef 100%;background-image:-webkit-linear-gradient(top, #a3d0ef 0%, #79ace9 65%, #a3d0ef 100%);background-image:-moz-linear-gradient(top, #a3d0ef 0%, #79ace9 65%, #a3d0ef 100%);background-image:-ms-linear-gradient(top, #a3d0ef 0%, #79ace9 65%, #a3d0ef 100%);background-image:-o-linear-gradient(top, #a3d0ef 0%, #79ace9 65%, #a3d0ef 100%);background-image:linear-gradient(top, #a3d0ef 0%, #79ace9 65%, #a3d0ef 100%);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#a3d0ef', EndColorStr='#a3d0ef')}button.DTTT_button:active,div.DTTT_button:active,a.DTTT_button:active{-webkit-box-shadow:inset 1px 1px 3px #999999;-moz-box-shadow:inset 1px 1px 3px #999999;box-shadow:inset 1px 1px 3px #999999}button.DTTT_disabled,div.DTTT_disabled,a.DTTT_disabled{color:#999;border:1px solid #d0d0d0;background:#ffffff;background:-webkit-linear-gradient(top, #fff 0%, #f9f9f9 89%, #fafafa 100%);background:-moz-linear-gradient(top, #fff 0%, #f9f9f9 89%, #fafafa 100%);background:-ms-linear-gradient(top, #fff 0%, #f9f9f9 89%, #fafafa 100%);background:-o-linear-gradient(top, #fff 0%, #f9f9f9 89%, #fafafa 100%);background:linear-gradient(top, #fff 0%, #f9f9f9 89%, #fafafa 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#fafafa',GradientType=0 )}button.DTTT_button_collection span{padding-right:17px;background:url(../images/collection.png) no-repeat center right}button.DTTT_button_collection:hover span{padding-right:17px;background:#f0f0f0 url(../images/collection_hover.png) no-repeat center right}table.DTTT_selectable tbody tr{cursor:pointer;*cursor:hand}table.dataTable tr.DTTT_selected.odd{background-color:#9FAFD1}table.dataTable tr.DTTT_selected.odd td.sorting_1{background-color:#9FAFD1}table.dataTable tr.DTTT_selected.odd td.sorting_2{background-color:#9FAFD1}table.dataTable tr.DTTT_selected.odd td.sorting_3{background-color:#9FAFD1}table.dataTable tr.DTTT_selected.even{background-color:#B0BED9}table.dataTable tr.DTTT_selected.even td.sorting_1{background-color:#B0BED9}table.dataTable tr.DTTT_selected.even td.sorting_2{background-color:#B0BED9}table.dataTable tr.DTTT_selected.even td.sorting_3{background-color:#B0BED9}div.DTTT_collection{width:150px;padding:8px 8px 4px 8px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.4);background-color:#f3f3f3;background-color:rgba(255,255,255,0.3);overflow:hidden;z-index:2002;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px;-webkit-box-shadow:3px 3px 5px rgba(0,0,0,0.3);-moz-box-shadow:3px 3px 5px rgba(0,0,0,0.3);-ms-box-shadow:3px 3px 5px rgba(0,0,0,0.3);-o-box-shadow:3px 3px 5px rgba(0,0,0,0.3);box-shadow:3px 3px 5px rgba(0,0,0,0.3)}div.DTTT_collection_background{background:transparent url(../images/background.png) repeat top left;z-index:2001}div.DTTT_collection button.DTTT_button,div.DTTT_collection div.DTTT_button,div.DTTT_collection a.DTTT_button{position:relative;left:0;right:0;display:block;float:none;margin-bottom:4px;-webkit-box-shadow:1px 1px 3px #999;-moz-box-shadow:1px 1px 3px #999;-ms-box-shadow:1px 1px 3px #999;-o-box-shadow:1px 1px 3px #999;box-shadow:1px 1px 3px #999}.DTTT_print_info{position:fixed;top:50%;left:50%;width:400px;height:150px;margin-left:-200px;margin-top:-75px;text-align:center;color:#333;padding:10px 30px;background:#ffffff;background:-webkit-linear-gradient(top, #fff 0%, #f3f3f3 89%, #f9f9f9 100%);background:-moz-linear-gradient(top, #fff 0%, #f3f3f3 89%, #f9f9f9 100%);background:-ms-linear-gradient(top, #fff 0%, #f3f3f3 89%, #f9f9f9 100%);background:-o-linear-gradient(top, #fff 0%, #f3f3f3 89%, #f9f9f9 100%);background:linear-gradient(top, #fff 0%, #f3f3f3 89%, #f9f9f9 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f9f9f9',GradientType=0 );opacity:0.95;border:1px solid black;border:1px solid rgba(0,0,0,0.5);-webkit-border-radius:6px;-moz-border-radius:6px;-ms-border-radius:6px;-o-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.5);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.5);-ms-box-shadow:0 3px 7px rgba(0,0,0,0.5);-o-box-shadow:0 3px 7px rgba(0,0,0,0.5);box-shadow:0 3px 7px rgba(0,0,0,0.5)}.DTTT_print_info h6{font-weight:normal;font-size:28px;line-height:28px;margin:1em}.DTTT_print_info p{font-size:14px;line-height:20px} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/jquery.dataTables.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/jquery.dataTables.css new file mode 100644 index 00000000..4e6fbe38 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/jquery.dataTables.css @@ -0,0 +1,476 @@ +/* + * Table styles + */ +table.dataTable { + width: 100%; + margin: 0 auto; + clear: both; + border-collapse: separate; + border-spacing: 0; + /* + * Header and footer styles + */ + /* + * Body styles + */ +} +table.dataTable thead th, +table.dataTable tfoot th { + font-weight: bold; +} +table.dataTable thead th, +table.dataTable thead td { + padding: 10px 18px; + border-bottom: 1px solid #111111; +} +table.dataTable thead th:active, +table.dataTable thead td:active { + outline: none; +} +table.dataTable tfoot th, +table.dataTable tfoot td { + padding: 10px 18px 6px 18px; + border-top: 1px solid #111111; +} +table.dataTable thead .sorting_asc, +table.dataTable thead .sorting_desc, +table.dataTable thead .sorting { + cursor: pointer; + *cursor: hand; +} +table.dataTable thead .sorting { + background: url("../images/sort_both.png") no-repeat center right; +} +table.dataTable thead .sorting_asc { + background: url("../images/sort_asc.png") no-repeat center right; +} +table.dataTable thead .sorting_desc { + background: url("../images/sort_desc.png") no-repeat center right; +} +table.dataTable thead .sorting_asc_disabled { + background: url("../images/sort_asc_disabled.png") no-repeat center right; +} +table.dataTable thead .sorting_desc_disabled { + background: url("../images/sort_desc_disabled.png") no-repeat center right; +} +table.dataTable tbody tr { + background-color: white; +} +table.dataTable tbody tr.selected { + background-color: #b0bed9; +} +table.dataTable tbody th, +table.dataTable tbody td { + padding: 8px 10px; +} +table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td { + border-top: 1px solid #dddddd; +} +table.dataTable.row-border tbody tr:first-child th, +table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th, +table.dataTable.display tbody tr:first-child td { + border-top: none; +} +table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td { + border-top: 1px solid #dddddd; + border-right: 1px solid #dddddd; +} +table.dataTable.cell-border tbody tr th:first-child, +table.dataTable.cell-border tbody tr td:first-child { + border-left: 1px solid #dddddd; +} +table.dataTable.cell-border tbody tr:first-child th, +table.dataTable.cell-border tbody tr:first-child td { + border-top: none; +} +table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd { + background-color: #f9f9f9; +} +table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected { + background-color: #abb9d3; +} +table.dataTable.hover tbody tr:hover, +table.dataTable.hover tbody tr.odd:hover, +table.dataTable.hover tbody tr.even:hover, table.dataTable.display tbody tr:hover, +table.dataTable.display tbody tr.odd:hover, +table.dataTable.display tbody tr.even:hover { + background-color: whitesmoke; +} +table.dataTable.hover tbody tr:hover.selected, +table.dataTable.hover tbody tr.odd:hover.selected, +table.dataTable.hover tbody tr.even:hover.selected, table.dataTable.display tbody tr:hover.selected, +table.dataTable.display tbody tr.odd:hover.selected, +table.dataTable.display tbody tr.even:hover.selected { + background-color: #a9b7d1; +} +table.dataTable.order-column tbody tr > .sorting_1, +table.dataTable.order-column tbody tr > .sorting_2, +table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1, +table.dataTable.display tbody tr > .sorting_2, +table.dataTable.display tbody tr > .sorting_3 { + background-color: #f9f9f9; +} +table.dataTable.order-column tbody tr.selected > .sorting_1, +table.dataTable.order-column tbody tr.selected > .sorting_2, +table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1, +table.dataTable.display tbody tr.selected > .sorting_2, +table.dataTable.display tbody tr.selected > .sorting_3 { + background-color: #acbad4; +} +table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 { + background-color: #f1f1f1; +} +table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 { + background-color: #f3f3f3; +} +table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 { + background-color: whitesmoke; +} +table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 { + background-color: #a6b3cd; +} +table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 { + background-color: #a7b5ce; +} +table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 { + background-color: #a9b6d0; +} +table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 { + background-color: #f9f9f9; +} +table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 { + background-color: #fbfbfb; +} +table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 { + background-color: #fdfdfd; +} +table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 { + background-color: #acbad4; +} +table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 { + background-color: #adbbd6; +} +table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 { + background-color: #afbdd8; +} +table.dataTable.display tbody tr:hover > .sorting_1, +table.dataTable.display tbody tr.odd:hover > .sorting_1, +table.dataTable.display tbody tr.even:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1, +table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_1, +table.dataTable.order-column.hover tbody tr.even:hover > .sorting_1 { + background-color: #eaeaea; +} +table.dataTable.display tbody tr:hover > .sorting_2, +table.dataTable.display tbody tr.odd:hover > .sorting_2, +table.dataTable.display tbody tr.even:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2, +table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_2, +table.dataTable.order-column.hover tbody tr.even:hover > .sorting_2 { + background-color: #ebebeb; +} +table.dataTable.display tbody tr:hover > .sorting_3, +table.dataTable.display tbody tr.odd:hover > .sorting_3, +table.dataTable.display tbody tr.even:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3, +table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_3, +table.dataTable.order-column.hover tbody tr.even:hover > .sorting_3 { + background-color: #eeeeee; +} +table.dataTable.display tbody tr:hover.selected > .sorting_1, +table.dataTable.display tbody tr.odd:hover.selected > .sorting_1, +table.dataTable.display tbody tr.even:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1, +table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_1, +table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_1 { + background-color: #a1aec7; +} +table.dataTable.display tbody tr:hover.selected > .sorting_2, +table.dataTable.display tbody tr.odd:hover.selected > .sorting_2, +table.dataTable.display tbody tr.even:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2, +table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_2, +table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_2 { + background-color: #a2afc8; +} +table.dataTable.display tbody tr:hover.selected > .sorting_3, +table.dataTable.display tbody tr.odd:hover.selected > .sorting_3, +table.dataTable.display tbody tr.even:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3, +table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_3, +table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_3 { + background-color: #a4b2cb; +} +table.dataTable.no-footer { + border-bottom: 1px solid #111111; +} +table.dataTable.nowrap th, table.dataTable.nowrap td { + white-space: nowrap; +} +table.dataTable.compact thead th, +table.dataTable.compact thead td { + padding: 5px 9px; +} +table.dataTable.compact tfoot th, +table.dataTable.compact tfoot td { + padding: 5px 9px 3px 9px; +} +table.dataTable.compact tbody th, +table.dataTable.compact tbody td { + padding: 4px 5px; +} +table.dataTable th.dt-left, +table.dataTable td.dt-left { + text-align: left; +} +table.dataTable th.dt-center, +table.dataTable td.dt-center, +table.dataTable td.dataTables_empty { + text-align: center; +} +table.dataTable th.dt-right, +table.dataTable td.dt-right { + text-align: right; +} +table.dataTable th.dt-justify, +table.dataTable td.dt-justify { + text-align: justify; +} +table.dataTable th.dt-nowrap, +table.dataTable td.dt-nowrap { + white-space: nowrap; +} +table.dataTable thead th.dt-head-left, +table.dataTable thead td.dt-head-left, +table.dataTable tfoot th.dt-head-left, +table.dataTable tfoot td.dt-head-left { + text-align: left; +} +table.dataTable thead th.dt-head-center, +table.dataTable thead td.dt-head-center, +table.dataTable tfoot th.dt-head-center, +table.dataTable tfoot td.dt-head-center { + text-align: center; +} +table.dataTable thead th.dt-head-right, +table.dataTable thead td.dt-head-right, +table.dataTable tfoot th.dt-head-right, +table.dataTable tfoot td.dt-head-right { + text-align: right; +} +table.dataTable thead th.dt-head-justify, +table.dataTable thead td.dt-head-justify, +table.dataTable tfoot th.dt-head-justify, +table.dataTable tfoot td.dt-head-justify { + text-align: justify; +} +table.dataTable thead th.dt-head-nowrap, +table.dataTable thead td.dt-head-nowrap, +table.dataTable tfoot th.dt-head-nowrap, +table.dataTable tfoot td.dt-head-nowrap { + white-space: nowrap; +} +table.dataTable tbody th.dt-body-left, +table.dataTable tbody td.dt-body-left { + text-align: left; +} +table.dataTable tbody th.dt-body-center, +table.dataTable tbody td.dt-body-center { + text-align: center; +} +table.dataTable tbody th.dt-body-right, +table.dataTable tbody td.dt-body-right { + text-align: right; +} +table.dataTable tbody th.dt-body-justify, +table.dataTable tbody td.dt-body-justify { + text-align: justify; +} +table.dataTable tbody th.dt-body-nowrap, +table.dataTable tbody td.dt-body-nowrap { + white-space: nowrap; +} + +table.dataTable, +table.dataTable th, +table.dataTable td { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +/* + * Control feature layout + */ +.dataTables_wrapper { + position: relative; + clear: both; + *zoom: 1; + zoom: 1; +} +.dataTables_wrapper .dataTables_length { + float: left; +} +.dataTables_wrapper .dataTables_filter { + float: right; + text-align: right; +} +.dataTables_wrapper .dataTables_filter input { + margin-left: 0.5em; +} +.dataTables_wrapper .dataTables_info { + clear: both; + float: left; + padding-top: 0.755em; +} +.dataTables_wrapper .dataTables_paginate { + float: right; + text-align: right; + padding-top: 0.25em; +} +.dataTables_wrapper .dataTables_paginate .paginate_button { + box-sizing: border-box; + display: inline-block; + min-width: 1.5em; + padding: 0.5em 1em; + margin-left: 2px; + text-align: center; + text-decoration: none !important; + cursor: pointer; + *cursor: hand; + color: #333333 !important; + border: 1px solid transparent; +} +.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { + color: #333333 !important; + border: 1px solid #cacaca; + background-color: white; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, gainsboro)); + /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, white 0%, gainsboro 100%); + /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, white 0%, gainsboro 100%); + /* FF3.6+ */ + background: -ms-linear-gradient(top, white 0%, gainsboro 100%); + /* IE10+ */ + background: -o-linear-gradient(top, white 0%, gainsboro 100%); + /* Opera 11.10+ */ + background: linear-gradient(to bottom, white 0%, gainsboro 100%); + /* W3C */ +} +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active { + cursor: default; + color: #666 !important; + border: 1px solid transparent; + background: transparent; + box-shadow: none; +} +.dataTables_wrapper .dataTables_paginate .paginate_button:hover { + color: white !important; + border: 1px solid #111111; + background-color: #585858; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111111)); + /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #585858 0%, #111111 100%); + /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #585858 0%, #111111 100%); + /* FF3.6+ */ + background: -ms-linear-gradient(top, #585858 0%, #111111 100%); + /* IE10+ */ + background: -o-linear-gradient(top, #585858 0%, #111111 100%); + /* Opera 11.10+ */ + background: linear-gradient(to bottom, #585858 0%, #111111 100%); + /* W3C */ +} +.dataTables_wrapper .dataTables_paginate .paginate_button:active { + outline: none; + background-color: #2b2b2b; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c)); + /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); + /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); + /* FF3.6+ */ + background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); + /* IE10+ */ + background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); + /* Opera 11.10+ */ + background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%); + /* W3C */ + box-shadow: inset 0 0 3px #111; +} +.dataTables_wrapper .dataTables_processing { + position: absolute; + top: 50%; + left: 50%; + width: 100%; + height: 40px; + margin-left: -50%; + margin-top: -25px; + padding-top: 20px; + text-align: center; + font-size: 1.2em; + background-color: white; + background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0))); + /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* FF3.6+ */ + background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* IE10+ */ + background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* Opera 11.10+ */ + background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* W3C */ +} +.dataTables_wrapper .dataTables_length, +.dataTables_wrapper .dataTables_filter, +.dataTables_wrapper .dataTables_info, +.dataTables_wrapper .dataTables_processing, +.dataTables_wrapper .dataTables_paginate { + color: #333333; +} +.dataTables_wrapper .dataTables_scroll { + clear: both; +} +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody { + *margin-top: -1px; + -webkit-overflow-scrolling: touch; +} +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th > div.dataTables_sizing, +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td > div.dataTables_sizing { + height: 0; + overflow: hidden; + margin: 0 !important; + padding: 0 !important; +} +.dataTables_wrapper.no-footer .dataTables_scrollBody { + border-bottom: 1px solid #111111; +} +.dataTables_wrapper.no-footer div.dataTables_scrollHead table, +.dataTables_wrapper.no-footer div.dataTables_scrollBody table { + border-bottom: none; +} +.dataTables_wrapper:after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; +} + +@media screen and (max-width: 767px) { + .dataTables_wrapper .dataTables_info, + .dataTables_wrapper .dataTables_paginate { + float: none; + text-align: center; + } + .dataTables_wrapper .dataTables_paginate { + margin-top: 0.5em; + } +} +@media screen and (max-width: 640px) { + .dataTables_wrapper .dataTables_length, + .dataTables_wrapper .dataTables_filter { + float: none; + text-align: center; + } + .dataTables_wrapper .dataTables_filter { + margin-top: 0.5em; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/jquery.dataTables.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/jquery.dataTables.min.css new file mode 100644 index 00000000..a2c5489c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/jquery.dataTables.min.css @@ -0,0 +1 @@ +table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting{cursor:pointer;*cursor:hand}table.dataTable thead .sorting{background:url("../images/sort_both.png") no-repeat center right}table.dataTable thead .sorting_asc{background:url("../images/sort_asc.png") no-repeat center right}table.dataTable thead .sorting_desc{background:url("../images/sort_desc.png") no-repeat center right}table.dataTable thead .sorting_asc_disabled{background:url("../images/sort_asc_disabled.png") no-repeat center right}table.dataTable thead .sorting_desc_disabled{background:url("../images/sort_desc_disabled.png") no-repeat center right}table.dataTable tbody tr{background-color:#fff}table.dataTable tbody tr.selected{background-color:#b0bed9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background-color:#f9f9f9}table.dataTable.stripe tbody tr.odd.selected,table.dataTable.display tbody tr.odd.selected{background-color:#abb9d3}table.dataTable.hover tbody tr:hover,table.dataTable.hover tbody tr.odd:hover,table.dataTable.hover tbody tr.even:hover,table.dataTable.display tbody tr:hover,table.dataTable.display tbody tr.odd:hover,table.dataTable.display tbody tr.even:hover{background-color:#f5f5f5}table.dataTable.hover tbody tr:hover.selected,table.dataTable.hover tbody tr.odd:hover.selected,table.dataTable.hover tbody tr.even:hover.selected,table.dataTable.display tbody tr:hover.selected,table.dataTable.display tbody tr.odd:hover.selected,table.dataTable.display tbody tr.even:hover.selected{background-color:#a9b7d1}table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3,table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3{background-color:#f9f9f9}table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3,table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3{background-color:#acbad4}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:#f5f5f5}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b3cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a7b5ce}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b6d0}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#f9f9f9}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fbfbfb}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fdfdfd}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad4}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#adbbd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.display tbody tr.odd:hover>.sorting_1,table.dataTable.display tbody tr.even:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_1,table.dataTable.order-column.hover tbody tr.even:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.display tbody tr.odd:hover>.sorting_2,table.dataTable.display tbody tr.even:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_2,table.dataTable.order-column.hover tbody tr.even:hover>.sorting_2{background-color:#ebebeb}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.display tbody tr.odd:hover>.sorting_3,table.dataTable.display tbody tr.even:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_3,table.dataTable.order-column.hover tbody tr.even:hover>.sorting_3{background-color:#eee}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.display tbody tr.odd:hover.selected>.sorting_1,table.dataTable.display tbody tr.even:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_1{background-color:#a1aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.display tbody tr.odd:hover.selected>.sorting_2,table.dataTable.display tbody tr.even:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_2{background-color:#a2afc8}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.display tbody tr.odd:hover.selected>.sorting_3,table.dataTable.display tbody tr.even:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_3{background-color:#a4b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th,table.dataTable.compact thead td{padding:5px 9px}table.dataTable.compact tfoot th,table.dataTable.compact tfoot td{padding:5px 9px 3px 9px}table.dataTable.compact tbody th,table.dataTable.compact tbody td{padding:4px 5px}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable,table.dataTable th,table.dataTable td{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.dataTables_wrapper .dataTables_length{float:left}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{margin-left:0.5em}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:0.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:0.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #cacaca;background-color:#fff;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-o-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:linear-gradient(to bottom, #fff 0%, #dcdcdc 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%, #111 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollHead table,.dataTables_wrapper.no-footer div.dataTables_scrollBody table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:0.5em}}@media screen and (max-width: 640px){.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:0.5em}} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/jquery.dataTables_themeroller.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/jquery.dataTables_themeroller.css new file mode 100644 index 00000000..5a56d979 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/css/jquery.dataTables_themeroller.css @@ -0,0 +1,330 @@ +/* + * Table styles + */ +table.dataTable { + width: 100%; + margin: 0 auto; + clear: both; + border-collapse: separate; + border-spacing: 0; + /* + * Header and footer styles + */ + /* + * Body styles + */ +} +table.dataTable thead th, +table.dataTable thead td, +table.dataTable tfoot th, +table.dataTable tfoot td { + padding: 4px 10px; +} +table.dataTable thead th, +table.dataTable tfoot th { + font-weight: bold; +} +table.dataTable thead th:active, +table.dataTable thead td:active { + outline: none; +} +table.dataTable thead .sorting_asc, +table.dataTable thead .sorting_desc, +table.dataTable thead .sorting { + cursor: pointer; + *cursor: hand; +} +table.dataTable thead th div.DataTables_sort_wrapper { + position: relative; + padding-right: 10px; +} +table.dataTable thead th div.DataTables_sort_wrapper span { + position: absolute; + top: 50%; + margin-top: -8px; + right: -5px; +} +table.dataTable thead th.ui-state-default { + border-right-width: 0; +} +table.dataTable thead th.ui-state-default:last-child { + border-right-width: 1px; +} +table.dataTable tbody tr { + background-color: white; +} +table.dataTable tbody tr.selected { + background-color: #b0bed9; +} +table.dataTable tbody th, +table.dataTable tbody td { + padding: 8px 10px; +} +table.dataTable th.center, +table.dataTable td.center, +table.dataTable td.dataTables_empty { + text-align: center; +} +table.dataTable th.right, +table.dataTable td.right { + text-align: right; +} +table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td { + border-top: 1px solid #dddddd; +} +table.dataTable.row-border tbody tr:first-child th, +table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th, +table.dataTable.display tbody tr:first-child td { + border-top: none; +} +table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td { + border-top: 1px solid #dddddd; + border-right: 1px solid #dddddd; +} +table.dataTable.cell-border tbody tr th:first-child, +table.dataTable.cell-border tbody tr td:first-child { + border-left: 1px solid #dddddd; +} +table.dataTable.cell-border tbody tr:first-child th, +table.dataTable.cell-border tbody tr:first-child td { + border-top: none; +} +table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd { + background-color: #f9f9f9; +} +table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected { + background-color: #abb9d3; +} +table.dataTable.hover tbody tr:hover, +table.dataTable.hover tbody tr.odd:hover, +table.dataTable.hover tbody tr.even:hover, table.dataTable.display tbody tr:hover, +table.dataTable.display tbody tr.odd:hover, +table.dataTable.display tbody tr.even:hover { + background-color: whitesmoke; +} +table.dataTable.hover tbody tr:hover.selected, +table.dataTable.hover tbody tr.odd:hover.selected, +table.dataTable.hover tbody tr.even:hover.selected, table.dataTable.display tbody tr:hover.selected, +table.dataTable.display tbody tr.odd:hover.selected, +table.dataTable.display tbody tr.even:hover.selected { + background-color: #a9b7d1; +} +table.dataTable.order-column tbody tr > .sorting_1, +table.dataTable.order-column tbody tr > .sorting_2, +table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1, +table.dataTable.display tbody tr > .sorting_2, +table.dataTable.display tbody tr > .sorting_3 { + background-color: #f9f9f9; +} +table.dataTable.order-column tbody tr.selected > .sorting_1, +table.dataTable.order-column tbody tr.selected > .sorting_2, +table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1, +table.dataTable.display tbody tr.selected > .sorting_2, +table.dataTable.display tbody tr.selected > .sorting_3 { + background-color: #acbad4; +} +table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 { + background-color: #f1f1f1; +} +table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 { + background-color: #f3f3f3; +} +table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 { + background-color: whitesmoke; +} +table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 { + background-color: #a6b3cd; +} +table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 { + background-color: #a7b5ce; +} +table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 { + background-color: #a9b6d0; +} +table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 { + background-color: #f9f9f9; +} +table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 { + background-color: #fbfbfb; +} +table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 { + background-color: #fdfdfd; +} +table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 { + background-color: #acbad4; +} +table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 { + background-color: #adbbd6; +} +table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 { + background-color: #afbdd8; +} +table.dataTable.display tbody tr:hover > .sorting_1, +table.dataTable.display tbody tr.odd:hover > .sorting_1, +table.dataTable.display tbody tr.even:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1, +table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_1, +table.dataTable.order-column.hover tbody tr.even:hover > .sorting_1 { + background-color: #eaeaea; +} +table.dataTable.display tbody tr:hover > .sorting_2, +table.dataTable.display tbody tr.odd:hover > .sorting_2, +table.dataTable.display tbody tr.even:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2, +table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_2, +table.dataTable.order-column.hover tbody tr.even:hover > .sorting_2 { + background-color: #ebebeb; +} +table.dataTable.display tbody tr:hover > .sorting_3, +table.dataTable.display tbody tr.odd:hover > .sorting_3, +table.dataTable.display tbody tr.even:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3, +table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_3, +table.dataTable.order-column.hover tbody tr.even:hover > .sorting_3 { + background-color: #eeeeee; +} +table.dataTable.display tbody tr:hover.selected > .sorting_1, +table.dataTable.display tbody tr.odd:hover.selected > .sorting_1, +table.dataTable.display tbody tr.even:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1, +table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_1, +table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_1 { + background-color: #a1aec7; +} +table.dataTable.display tbody tr:hover.selected > .sorting_2, +table.dataTable.display tbody tr.odd:hover.selected > .sorting_2, +table.dataTable.display tbody tr.even:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2, +table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_2, +table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_2 { + background-color: #a2afc8; +} +table.dataTable.display tbody tr:hover.selected > .sorting_3, +table.dataTable.display tbody tr.odd:hover.selected > .sorting_3, +table.dataTable.display tbody tr.even:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3, +table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_3, +table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_3 { + background-color: #a4b2cb; +} + +table.dataTable, +table.dataTable th, +table.dataTable td { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +/* + * Control feature layout + */ +.dataTables_wrapper { + position: relative; + clear: both; + *zoom: 1; + zoom: 1; +} +.dataTables_wrapper .dataTables_length { + float: left; +} +.dataTables_wrapper .dataTables_filter { + float: right; + text-align: right; +} +.dataTables_wrapper .dataTables_filter input { + margin-left: 0.5em; +} +.dataTables_wrapper .dataTables_info { + clear: both; + float: left; + padding-top: 0.55em; +} +.dataTables_wrapper .dataTables_paginate { + float: right; + text-align: right; +} +.dataTables_wrapper .dataTables_paginate .fg-button { + box-sizing: border-box; + display: inline-block; + min-width: 1.5em; + padding: 0.5em; + margin-left: 2px; + text-align: center; + text-decoration: none !important; + cursor: pointer; + *cursor: hand; + color: #333333 !important; + border: 1px solid transparent; +} +.dataTables_wrapper .dataTables_paginate .fg-button:active { + outline: none; +} +.dataTables_wrapper .dataTables_paginate .fg-button:first-child { + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; +} +.dataTables_wrapper .dataTables_paginate .fg-button:last-child { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} +.dataTables_wrapper .dataTables_processing { + position: absolute; + top: 50%; + left: 50%; + width: 100%; + height: 40px; + margin-left: -50%; + margin-top: -25px; + padding-top: 20px; + text-align: center; + font-size: 1.2em; + background-color: white; + background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0))); + /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* FF3.6+ */ + background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* IE10+ */ + background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* Opera 11.10+ */ + background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + /* W3C */ +} +.dataTables_wrapper .dataTables_length, +.dataTables_wrapper .dataTables_filter, +.dataTables_wrapper .dataTables_info, +.dataTables_wrapper .dataTables_processing, +.dataTables_wrapper .dataTables_paginate { + color: #333333; +} +.dataTables_wrapper .dataTables_scroll { + clear: both; +} +.dataTables_wrapper .dataTables_scrollBody { + *margin-top: -1px; + -webkit-overflow-scrolling: touch; +} +.dataTables_wrapper .ui-widget-header { + font-weight: normal; +} +.dataTables_wrapper .ui-toolbar { + padding: 8px; +} +.dataTables_wrapper:after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; +} + +@media screen and (max-width: 767px) { + .dataTables_wrapper .dataTables_length, + .dataTables_wrapper .dataTables_filter, + .dataTables_wrapper .dataTables_info, + .dataTables_wrapper .dataTables_paginate { + float: none; + text-align: center; + } + .dataTables_wrapper .dataTables_filter, + .dataTables_wrapper .dataTables_paginate { + margin-top: 0.5em; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/back_disabled.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/back_disabled.png new file mode 100644 index 00000000..881de797 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/back_disabled.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/back_enabled.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/back_enabled.png new file mode 100644 index 00000000..c608682b Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/back_enabled.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/back_enabled_hover.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/back_enabled_hover.png new file mode 100644 index 00000000..d300f106 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/back_enabled_hover.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/background.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/background.png new file mode 100644 index 00000000..915efba6 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/background.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/collection.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/collection.png new file mode 100644 index 00000000..5dd4dfdf Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/collection.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/collection_hover.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/collection_hover.png new file mode 100644 index 00000000..7b37b1e9 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/collection_hover.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/copy.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/copy.png new file mode 100644 index 00000000..5b01ab16 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/copy.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/copy_hover.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/copy_hover.png new file mode 100644 index 00000000..039a7fc3 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/copy_hover.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/csv.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/csv.png new file mode 100644 index 00000000..43df1559 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/csv.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/csv_hover.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/csv_hover.png new file mode 100644 index 00000000..10b34d3b Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/csv_hover.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/details_close.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/details_close.png new file mode 100644 index 00000000..fcc23c63 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/details_close.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/details_open.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/details_open.png new file mode 100644 index 00000000..6f034d0f Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/details_open.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/filler.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/filler.png new file mode 100644 index 00000000..f2af65d8 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/filler.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/forward_disabled.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/forward_disabled.png new file mode 100644 index 00000000..6a6ded7d Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/forward_disabled.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/forward_enabled.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/forward_enabled.png new file mode 100644 index 00000000..a4e6b538 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/forward_enabled.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/forward_enabled_hover.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/forward_enabled_hover.png new file mode 100644 index 00000000..fc46c5eb Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/forward_enabled_hover.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/insert.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/insert.png new file mode 100644 index 00000000..15d5522d Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/insert.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/loading-background.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/loading-background.png new file mode 100644 index 00000000..2d815070 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/loading-background.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/pdf.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/pdf.png new file mode 100644 index 00000000..1b038d08 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/pdf.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/pdf_hover.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/pdf_hover.png new file mode 100644 index 00000000..eb06855f Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/pdf_hover.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/print.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/print.png new file mode 100644 index 00000000..2db08242 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/print.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/print_hover.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/print_hover.png new file mode 100644 index 00000000..9808a9cc Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/print_hover.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/sort_asc.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/sort_asc.png new file mode 100644 index 00000000..a88d7975 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/sort_asc.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/sort_asc_disabled.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/sort_asc_disabled.png new file mode 100644 index 00000000..dcd7b7b8 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/sort_asc_disabled.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/sort_both.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/sort_both.png new file mode 100644 index 00000000..18670406 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/sort_both.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/sort_desc.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/sort_desc.png new file mode 100644 index 00000000..def071ed Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/sort_desc.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/sort_desc_disabled.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/sort_desc_disabled.png new file mode 100644 index 00000000..7824973c Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/sort_desc_disabled.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/xls.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/xls.png new file mode 100644 index 00000000..5aaf40d0 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/xls.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/xls_hover.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/xls_hover.png new file mode 100644 index 00000000..5b1930af Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/images/xls_hover.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/swf/copy_csv_xls.swf b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/swf/copy_csv_xls.swf new file mode 100644 index 00000000..32fdf052 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/swf/copy_csv_xls.swf differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/swf/copy_csv_xls_pdf.swf b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/swf/copy_csv_xls_pdf.swf new file mode 100644 index 00000000..ebab741e Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/DataTables-1.10.4/swf/copy_csv_xls_pdf.swf differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Images/indicator_medium.gif b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Images/indicator_medium.gif new file mode 100644 index 00000000..73019697 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Images/indicator_medium.gif differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css index 3c09f019..f539d480 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css @@ -24,9 +24,8 @@ textarea { } .element-container { - margin-bottom: 15px; - text-align:center; cursor: pointer; + margin-top: 15px; } .element-container .element { @@ -41,6 +40,7 @@ textarea { -webkit-box-sizing:border-box; border: 1px solid rgb(80, 152, 249); padding: 3px; + margin: 4px; } .selected-file .element div.selected-element-overlay { @@ -54,6 +54,143 @@ textarea { pointer-events: none; } +tr.selected-file { + background-color:#E7F0FC!important; +} + +.table-icon { + height: 30px; +} + +.noselect { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +#webdav-items-table tr td { + vertical-align: middle !important; +} + +#webdav-items-table .file-link { + padding-left: 5px; + vertical-align: middle !important; +} + +.change-view-block { + display: inline-block; + vertical-align: bottom; + height: 32px; +} + +.drag-and-drop-area input { + /* IE 8 */ + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + /* IE 5-7 */ + filter: alpha(opacity=0); + /* Netscape */ + -moz-opacity: 0; + /* Safari 1.x */ + -khtml-opacity: 0; + opacity: 0; + font-size: 198px; + height: 198px; + border: #2e8bcc 1px; +} + +.drag-and-drop-area .info-block { + position: absolute; + top: 50%; + left: 50%; + text-align: center; + margin-left: -100px; + margin-top: -51px; +} + +.drag-and-drop-area .upload-block { + width: 100%; +} + +.drag-and-drop-area .upload-block-text { + font-size: 20px; + font-weight: bold; + display: block; +} + +.drag-and-drop-area .upload-block-description { + display: block; +} + +.drag-and-drop-area .upload-block-icon { + font-size: 60px; + color: gray; +} + +.drag-and-drop-area .info-block-hover { + color: black; +} + +.drag-and-drop-area { + margin-left: 15%; + margin-right: 15%; + background-color: #eee; + border: 1px solid #888; + border-radius: 3px !important; + overflow: hidden; +} + +.template-upload .size, .template-download .size { + display: inline-block; + vertical-align: middle; +} + +.template-upload .progress, .template-download .progress { + display: inline-block; + width: 70%; + margin-bottom: 0px; +} + +.template-upload .column-name, .template-download .column-name, { + width: 40%; +} + +.template-upload .column-progress, .template-download .column-progress { + width: 40%; +} + +.template-upload .column-actions, .template-download .column-actions { + width: 20%; + font-size: 20px; +} + +.template-upload .column-actions .file-actions, .template-download .column-actions .file-actions { + float: right; + font-size: 23px; +} + +.fileupload-global-process { + margin-top: 15px; + margin-bottom: 10px; + padding: 5px; + border: 1px solid #E0E0E0; + border-radius: 3px !important; +} + +.fileupload-global-process .cancel-all { + float: right; +} + +.file-upload-menu .file-actions-menu { + display: none; +} + +.center { + text-align: center; +} + #errorMessage { color: red; font-weight: bold; @@ -79,8 +216,13 @@ textarea { margin-bottom: 0px; } -.modal-vertical-centered { - margin-top: 25%; + +#processDialog .modal-dialog { + position: absolute; + top: 50%; + left: 50%; + margin-top: -8px; + margin-left: -100px; } @@ -93,10 +235,66 @@ textarea { display: none; } +.file-actions-menu .file-upload { + display: inline-block; +} + #message-area { margin-top: 15px; } +#processDialog .dialog-text { + display: inline-block; + margin-left: 10px; +} + +#processDialog .modal-dialog { + width: 200px; +} + +.search-block { + float: right; +} + +.search-block input, .search-block label { + display: inline-block; + width: initial; + font-weight: normal; +} + +.elements-container { + padding-top: 10px; +} + +@media (min-width: 768px) and (max-width: 991px) { + .col-sm-2.element-container { + width: 18.666667%; + } +} + +@media (max-width: 768px) { + .col-sm-2.element-container { + float: left; + width: 48%; + } +} + + +@media (max-width: 250px) { + .col-sm-2.element-container { + float: left; + width: 100%; + } +} + +.back-button { + font-size: 30px; + color: white; + padding-left: 10px; + padding-top: 3px; + display: block; +} + /* Theme Mods */ input,div{border-radius:0px!important;} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/css/jquery.fileupload-noscript.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/css/jquery.fileupload-noscript.css new file mode 100644 index 00000000..64d728fc --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/css/jquery.fileupload-noscript.css @@ -0,0 +1,22 @@ +@charset "UTF-8"; +/* + * jQuery File Upload Plugin NoScript CSS 1.2.0 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +.fileinput-button input { + position: static; + opacity: 1; + filter: none; + font-size: inherit; + direction: inherit; +} +.fileinput-button span { + display: none; +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/css/jquery.fileupload-ui-noscript.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/css/jquery.fileupload-ui-noscript.css new file mode 100644 index 00000000..87f110cd --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/css/jquery.fileupload-ui-noscript.css @@ -0,0 +1,17 @@ +@charset "UTF-8"; +/* + * jQuery File Upload UI Plugin NoScript CSS 8.8.5 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2012, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +.fileinput-button i, +.fileupload-buttonbar .delete, +.fileupload-buttonbar .toggle { + display: none; +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/css/jquery.fileupload-ui.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/css/jquery.fileupload-ui.css new file mode 100644 index 00000000..76fb376d --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/css/jquery.fileupload-ui.css @@ -0,0 +1,57 @@ +@charset "UTF-8"; +/* + * jQuery File Upload UI Plugin CSS 9.0.0 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +.fileupload-buttonbar .btn, +.fileupload-buttonbar .toggle { + margin-bottom: 5px; +} +.progress-animated .progress-bar, +.progress-animated .bar { + background: url("../img/progressbar.gif") !important; + filter: none; +} +.fileupload-process { + float: right; + display: none; +} +.fileupload-processing .fileupload-process, +.files .processing .preview { + display: block; + width: 32px; + height: 32px; + background: url("../img/loading.gif") center no-repeat; + background-size: contain; +} +.files audio, +.files video { + max-width: 300px; +} + +@media (max-width: 767px) { + .fileupload-buttonbar .toggle, + .files .toggle, + .files .btn span { + display: none; + } + .files .name { + width: 80px; + word-wrap: break-word; + } + .files audio, + .files video { + max-width: 80px; + } + .files img, + .files canvas { + max-width: 100%; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/css/jquery.fileupload.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/css/jquery.fileupload.css new file mode 100644 index 00000000..fb6044d3 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/css/jquery.fileupload.css @@ -0,0 +1,36 @@ +@charset "UTF-8"; +/* + * jQuery File Upload Plugin CSS 1.3.0 + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2013, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +.fileinput-button { + position: relative; + overflow: hidden; +} +.fileinput-button input { + position: absolute; + top: 0; + right: 0; + margin: 0; + opacity: 0; + -ms-filter: 'alpha(opacity=0)'; + font-size: 200px; + direction: ltr; + cursor: pointer; +} + +/* Fixes for IE < 8 */ +@media screen\9 { + .fileinput-button input { + filter: alpha(opacity=0); + font-size: 100%; + height: 100%; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/img/loading.gif b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/img/loading.gif new file mode 100644 index 00000000..90f28cbd Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/img/loading.gif differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/img/progressbar.gif b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/img/progressbar.gif new file mode 100644 index 00000000..fbcce6bc Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/jQuery.FileUpload/img/progressbar.gif differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100644 index 00000000..5b5dab2a Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100644 index 00000000..ac8b229a Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 00000000..ad3d6346 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 00000000..42ccba26 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 00000000..5a46b47c Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 00000000..86c2baa6 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 00000000..4443fdc1 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 00000000..7c9fa6c6 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-icons_222222_256x240.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-icons_222222_256x240.png new file mode 100644 index 00000000..ee039dc0 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-icons_222222_256x240.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-icons_2e83ff_256x240.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 00000000..45e8928e Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-icons_2e83ff_256x240.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-icons_454545_256x240.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-icons_454545_256x240.png new file mode 100644 index 00000000..7ec70d11 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-icons_454545_256x240.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-icons_888888_256x240.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-icons_888888_256x240.png new file mode 100644 index 00000000..5ba708c3 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-icons_888888_256x240.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-icons_cd0a0a_256x240.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 00000000..7930a558 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/images/ui-icons_cd0a0a_256x240.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery-ui.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery-ui.css new file mode 100644 index 00000000..a76b9ab9 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery-ui.css @@ -0,0 +1,470 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; } +.ui-helper-clearfix:after { clear: both; } +.ui-helper-clearfix { zoom: 1; } +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + +.ui-accordion .ui-accordion-header { display: block; cursor: pointer; position: relative; margin-top: 2px; padding: .5em .5em .5em .7em; zoom: 1; } +.ui-accordion .ui-accordion-icons { padding-left: 2.2em; } +.ui-accordion .ui-accordion-noicons { padding-left: .7em; } +.ui-accordion .ui-accordion-icons .ui-accordion-icons { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; zoom: 1; } + +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active { text-decoration: none; } +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ + +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +} +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } + +.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; outline: none; } +.ui-menu .ui-menu { margin-top: -3px; position: absolute; } +.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1; width: 100%; } +.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; } +.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; } +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; } + +.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; } +.ui-menu .ui-state-disabled a { cursor: default; } + +/* icon support */ +.ui-menu-icons { position: relative; } +.ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; } + +/* left-aligned */ +.ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; } + +/* right-aligned */ +.ui-menu .ui-menu-icon { position: static; float: right; } + +.ui-progressbar { height:2em; text-align: left; overflow: hidden; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; } +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } + +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; } +.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; } +.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; } +.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; z-index: 100; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; } +.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */ +.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */ +.ui-spinner-up { top: 0; } +.ui-spinner-down { bottom: 0; } + +/* TR overrides */ +span.ui-spinner { background: none; } +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position:-65px -16px; +} + +.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 0; margin: 1px .2em 0 0; border-bottom: 0; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: -1px; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } + +.ui-tooltip { + padding:8px; + position:absolute; + z-index:9999; + -o-box-shadow: 0 0 5px #aaa; + -moz-box-shadow: 0 0 5px #aaa; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +/* Fades and background-images don't work well together in IE6, drop the image */ +* html .ui-tooltip { + background-image: none; +} +body .ui-tooltip { border-width:2px; } + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; } +.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; } +.ui-widget-content a { color: #222222/*{fcContent}*/; } +.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; } +.ui-widget-header a { color: #222222/*{fcHeader}*/; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; } +.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; } +.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.accordion.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.accordion.css new file mode 100644 index 00000000..608e0467 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.accordion.css @@ -0,0 +1,16 @@ +/*! + * jQuery UI Accordion 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Accordion#theming + */ +.ui-accordion .ui-accordion-header { display: block; cursor: pointer; position: relative; margin-top: 2px; padding: .5em .5em .5em .7em; zoom: 1; } +.ui-accordion .ui-accordion-icons { padding-left: 2.2em; } +.ui-accordion .ui-accordion-noicons { padding-left: .7em; } +.ui-accordion .ui-accordion-icons .ui-accordion-icons { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; zoom: 1; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.all.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.all.css new file mode 100644 index 00000000..04f10a9d --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.all.css @@ -0,0 +1,12 @@ +/*! + * jQuery UI CSS Framework 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming + */ +@import "jquery.ui.base.css"; +@import "jquery.ui.theme.css"; diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.autocomplete.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.autocomplete.css new file mode 100644 index 00000000..e52e6fed --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.autocomplete.css @@ -0,0 +1,14 @@ +/*! + * jQuery UI Autocomplete 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.base.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.base.css new file mode 100644 index 00000000..061b058b --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.base.css @@ -0,0 +1,25 @@ +/*! + * jQuery UI CSS Framework 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming + */ +@import url("jquery.ui.core.css"); + +@import url("jquery.ui.accordion.css"); +@import url("jquery.ui.autocomplete.css"); +@import url("jquery.ui.button.css"); +@import url("jquery.ui.datepicker.css"); +@import url("jquery.ui.dialog.css"); +@import url("jquery.ui.menu.css"); +@import url("jquery.ui.progressbar.css"); +@import url("jquery.ui.resizable.css"); +@import url("jquery.ui.selectable.css"); +@import url("jquery.ui.slider.css"); +@import url("jquery.ui.spinner.css"); +@import url("jquery.ui.tabs.css"); +@import url("jquery.ui.tooltip.css"); diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.button.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.button.css new file mode 100644 index 00000000..e24ce54a --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.button.css @@ -0,0 +1,40 @@ +/*! + * jQuery UI Button 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Button#theming + */ +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active { text-decoration: none; } +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.core.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.core.css new file mode 100644 index 00000000..988c6a4f --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.core.css @@ -0,0 +1,39 @@ +/*! + * jQuery UI CSS Framework 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; } +.ui-helper-clearfix:after { clear: both; } +.ui-helper-clearfix { zoom: 1; } +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.datepicker.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.datepicker.css new file mode 100644 index 00000000..9918aa1f --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.datepicker.css @@ -0,0 +1,67 @@ +/*! + * jQuery UI Datepicker 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker#theming + */ +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.dialog.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.dialog.css new file mode 100644 index 00000000..528527ba --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.dialog.css @@ -0,0 +1,22 @@ +/*! + * jQuery UI Dialog 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog#theming + */ +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.menu.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.menu.css new file mode 100644 index 00000000..4c69487c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.menu.css @@ -0,0 +1,30 @@ +/*! + * jQuery UI Menu 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; outline: none; } +.ui-menu .ui-menu { margin-top: -3px; position: absolute; } +.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1; width: 100%; } +.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; } +.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; } +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; } + +.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; } +.ui-menu .ui-state-disabled a { cursor: default; } + +/* icon support */ +.ui-menu-icons { position: relative; } +.ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; } + +/* left-aligned */ +.ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; } + +/* right-aligned */ +.ui-menu .ui-menu-icon { position: static; float: right; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.progressbar.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.progressbar.css new file mode 100644 index 00000000..7bf1ab62 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.progressbar.css @@ -0,0 +1,12 @@ +/*! + * jQuery UI Progressbar 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar#theming + */ +.ui-progressbar { height:2em; text-align: left; overflow: hidden; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.resizable.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.resizable.css new file mode 100644 index 00000000..d3bf451a --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.resizable.css @@ -0,0 +1,21 @@ +/*! + * jQuery UI Resizable 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; } +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.selectable.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.selectable.css new file mode 100644 index 00000000..65063cf2 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.selectable.css @@ -0,0 +1,11 @@ +/*! + * jQuery UI Selectable 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectable#theming + */ +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.slider.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.slider.css new file mode 100644 index 00000000..c645a303 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.slider.css @@ -0,0 +1,25 @@ +/*! + * jQuery UI Slider 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider#theming + */ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.spinner.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.spinner.css new file mode 100644 index 00000000..82223c27 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.spinner.css @@ -0,0 +1,24 @@ +/*! + * jQuery UI Spinner 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Spinner#theming + */ +.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; } +.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; } +.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; z-index: 100; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; } +.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */ +.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */ +.ui-spinner-up { top: 0; } +.ui-spinner-down { bottom: 0; } + +/* TR overrides */ +span.ui-spinner { background: none; } +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position:-65px -16px; +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.tabs.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.tabs.css new file mode 100644 index 00000000..6936f86b --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.tabs.css @@ -0,0 +1,18 @@ +/*! + * jQuery UI Tabs 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs#theming + */ +.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 0; margin: 1px .2em 0 0; border-bottom: 0; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: -1px; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.theme.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.theme.css new file mode 100644 index 00000000..3d226fa4 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.theme.css @@ -0,0 +1,247 @@ +/*! + * jQuery UI CSS Framework 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/ + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; } +.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; } +.ui-widget-content a { color: #222222/*{fcContent}*/; } +.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; } +.ui-widget-header a { color: #222222/*{fcHeader}*/; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; } +.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; } +.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.tooltip.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.tooltip.css new file mode 100644 index 00000000..d3243859 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/jquery.ui.tooltip.css @@ -0,0 +1,22 @@ +/*! + * jQuery UI Tooltip 1.9.0 + * http://jqueryui.com + * + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ +.ui-tooltip { + padding:8px; + position:absolute; + z-index:9999; + -o-box-shadow: 0 0 5px #aaa; + -moz-box-shadow: 0 0 5px #aaa; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +/* Fades and background-images don't work well together in IE6, drop the image */ +* html .ui-tooltip { + background-image: none; +} +body .ui-tooltip { border-width:2px; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100644 index 00000000..5b5dab2a Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100644 index 00000000..ac8b229a Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 00000000..ad3d6346 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 00000000..42ccba26 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 00000000..5a46b47c Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 00000000..86c2baa6 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 00000000..4443fdc1 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 00000000..7c9fa6c6 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-icons_222222_256x240.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-icons_222222_256x240.png new file mode 100644 index 00000000..ee039dc0 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-icons_222222_256x240.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-icons_2e83ff_256x240.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 00000000..45e8928e Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-icons_2e83ff_256x240.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-icons_454545_256x240.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-icons_454545_256x240.png new file mode 100644 index 00000000..7ec70d11 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-icons_454545_256x240.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-icons_888888_256x240.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-icons_888888_256x240.png new file mode 100644 index 00000000..5ba708c3 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-icons_888888_256x240.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-icons_cd0a0a_256x240.png b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 00000000..7930a558 Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/images/ui-icons_cd0a0a_256x240.png differ diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery-ui.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery-ui.min.css new file mode 100644 index 00000000..058b0004 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery-ui.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px);clip:rect(1px,1px,1px,1px)}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{zoom:1}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;zoom:1}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto;zoom:1}.ui-autocomplete{position:absolute;cursor:default}* html .ui-autocomplete{width:1px}.ui-button{display:inline-block;position:relative;padding:0;margin-right:.1em;cursor:pointer;text-align:center;zoom:1;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:1.4}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0em}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right}.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-cover{position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px}.ui-dialog{position:absolute;padding:.2em;width:300px;overflow:hidden}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 16px .1em 0}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.ui-dialog .ui-dialog-titlebar-close:hover,.ui-dialog .ui-dialog-titlebar-close:focus{padding:0}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:none}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;width:100%}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;zoom:1;font-weight:normal}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-menu .ui-state-disabled{font-weight:normal;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;z-index:100;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}span.ui-spinner{background:none}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em;zoom:1}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;-o-box-shadow:0 0 5px #aaa;-moz-box-shadow:0 0 5px #aaa;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}* html .ui-tooltip{background-image:none}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;-khtml-border-top-left-radius:4px;border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;-khtml-border-top-right-radius:4px;border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;-khtml-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;-khtml-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);-moz-border-radius:8px;-khtml-border-radius:8px;-webkit-border-radius:8px;border-radius:8px} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.accordion.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.accordion.min.css new file mode 100644 index 00000000..3ad02b7d --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.accordion.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.accordion.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;zoom:1}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto;zoom:1} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.autocomplete.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.autocomplete.min.css new file mode 100644 index 00000000..339691c0 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.autocomplete.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.autocomplete.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-autocomplete{position:absolute;cursor:default}* html .ui-autocomplete{width:1px} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.button.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.button.min.css new file mode 100644 index 00000000..12545c0b --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.button.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.button.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-button{display:inline-block;position:relative;padding:0;margin-right:.1em;cursor:pointer;text-align:center;zoom:1;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:1.4}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}button.ui-button::-moz-focus-inner{border:0;padding:0} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.core.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.core.min.css new file mode 100644 index 00000000..357aee04 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.core.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.core.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px);clip:rect(1px,1px,1px,1px)}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{zoom:1}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.datepicker.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.datepicker.min.css new file mode 100644 index 00000000..54bda917 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.datepicker.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.datepicker.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0em}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right}.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-cover{position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.dialog.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.dialog.min.css new file mode 100644 index 00000000..9684b38f --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.dialog.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.dialog.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-dialog{position:absolute;padding:.2em;width:300px;overflow:hidden}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 16px .1em 0}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.ui-dialog .ui-dialog-titlebar-close:hover,.ui-dialog .ui-dialog-titlebar-close:focus{padding:0}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto;zoom:1}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.menu.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.menu.min.css new file mode 100644 index 00000000..e05f105b --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.menu.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.menu.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:none}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;width:100%}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;zoom:1;font-weight:normal}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}.ui-menu .ui-state-disabled{font-weight:normal;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.progressbar.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.progressbar.min.css new file mode 100644 index 00000000..1a53402d --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.progressbar.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.progressbar.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.resizable.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.resizable.min.css new file mode 100644 index 00000000..8fcacf4a --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.resizable.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.resizable.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.selectable.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.selectable.min.css new file mode 100644 index 00000000..a1b11560 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.selectable.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.selectable.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.slider.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.slider.min.css new file mode 100644 index 00000000..6c8c2906 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.slider.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.slider.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.spinner.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.spinner.min.css new file mode 100644 index 00000000..54fd2b20 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.spinner.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.spinner.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;z-index:100;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}span.ui-spinner{background:none}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.tabs.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.tabs.min.css new file mode 100644 index 00000000..ad1efe69 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.tabs.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.tabs.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-tabs{position:relative;padding:.2em;zoom:1}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.theme.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.theme.min.css new file mode 100644 index 00000000..aa40ac74 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.theme.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.theme.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;-khtml-border-top-left-radius:4px;border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;-khtml-border-top-right-radius:4px;border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;-khtml-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;-khtml-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);-moz-border-radius:8px;-khtml-border-radius:8px;-webkit-border-radius:8px;border-radius:8px} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.tooltip.min.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.tooltip.min.css new file mode 100644 index 00000000..78e86737 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/themes/base/minified/jquery.ui.tooltip.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.9.0 - 2012-10-05 +* http://jqueryui.com +* Includes: jquery.ui.tooltip.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ +.ui-tooltip{padding:8px;position:absolute;z-index:9999;-o-box-shadow:0 0 5px #aaa;-moz-box-shadow:0 0 5px #aaa;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}* html .ui-tooltip{background-image:none}body .ui-tooltip{border-width:2px} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/Api/OwaController.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/Api/OwaController.cs index 633a9fda..4b0e2a87 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/Api/OwaController.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/Api/OwaController.cs @@ -127,11 +127,11 @@ namespace WebsitePanel.WebDavPortal.Controllers.Api } [HttpPost] - public async Task Put(int accessTokenId) + public HttpResponseMessage Put(int accessTokenId) { var token = _tokenManager.GetToken(accessTokenId); - var bytes = await Request.Content.ReadAsByteArrayAsync(); + var bytes = Request.Content.ReadAsByteArrayAsync().Result; _webDavManager.UploadFile(token.FilePath, bytes); diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs index 4b4cf1c2..c4c8591b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/FileSystemController.cs @@ -8,20 +8,29 @@ using System.Security.Policy; using System.Web; using System.Web.Mvc; using System.Web.Routing; +using AutoMapper; using log4net; using WebsitePanel.WebDav.Core; using WebsitePanel.WebDav.Core.Client; using WebsitePanel.WebDav.Core.Config; +using WebsitePanel.WebDav.Core.Entities.Account.Enums; using WebsitePanel.WebDav.Core.Exceptions; +using WebsitePanel.WebDav.Core.Extensions; using WebsitePanel.WebDav.Core.Interfaces.Managers; +using WebsitePanel.WebDav.Core.Interfaces.Managers.Users; using WebsitePanel.WebDav.Core.Interfaces.Security; using WebsitePanel.WebDav.Core.Security.Authorization.Enums; using WebsitePanel.WebDav.Core.Security.Cryptography; +using WebsitePanel.WebDav.Core.Wsp.Framework; using WebsitePanel.WebDavPortal.CustomAttributes; using WebsitePanel.WebDavPortal.Extensions; +using WebsitePanel.WebDavPortal.FileOperations; +using WebsitePanel.WebDavPortal.Helpers; +using WebsitePanel.WebDavPortal.ModelBinders.DataTables; using WebsitePanel.WebDavPortal.Models; using System.Net; using WebsitePanel.WebDavPortal.Models.Common; +using WebsitePanel.WebDavPortal.Models.Common.DataTable; using WebsitePanel.WebDavPortal.Models.Common.Enums; using WebsitePanel.WebDavPortal.Models.FileSystem; using WebsitePanel.WebDavPortal.UI; @@ -39,42 +48,61 @@ namespace WebsitePanel.WebDavPortal.Controllers private readonly IAuthenticationService _authenticationService; private readonly IAccessTokenManager _tokenManager; private readonly IWebDavAuthorizationService _webDavAuthorizationService; + private readonly IUserSettingsManager _userSettingsManager; + private readonly FileOpenerManager _openerManager; private readonly ILog Log; - public FileSystemController(ICryptography cryptography, IWebDavManager webdavManager, IAuthenticationService authenticationService, IAccessTokenManager tokenManager, IWebDavAuthorizationService webDavAuthorizationService) + public FileSystemController(ICryptography cryptography, IWebDavManager webdavManager, IAuthenticationService authenticationService, IAccessTokenManager tokenManager, IWebDavAuthorizationService webDavAuthorizationService, FileOpenerManager openerManager, IUserSettingsManager userSettingsManager) { _cryptography = cryptography; _webdavManager = webdavManager; _authenticationService = authenticationService; _tokenManager = tokenManager; _webDavAuthorizationService = webDavAuthorizationService; + _userSettingsManager = userSettingsManager; Log = LogManager.GetLogger(this.GetType()); + _openerManager = new FileOpenerManager(); } [HttpGet] - public ActionResult ShowContent(string org, string pathPart = "") + public ActionResult ChangeViewType(FolderViewTypes viewType, string org, string pathPart = "") + { + _userSettingsManager.ChangeWebDavViewType(WspContext.User.AccountId, viewType); + + return RedirectToRoute(FileSystemRouteNames.ShowContentPath, new { org, pathPart }); + } + + public ActionResult ShowContent(string org, string pathPart = "", string searchValue = "") { if (org != WspContext.User.OrganizationId) { return new HttpStatusCodeResult(HttpStatusCode.NoContent); } - string fileName = pathPart.Split('/').Last(); - if (_webdavManager.IsFile(pathPart)) { - var fileBytes = _webdavManager.GetFileBytes(pathPart); - return File(fileBytes, MediaTypeNames.Application.Octet, fileName); + var resource = _webdavManager.GetResource(pathPart); + + var mimeType = _openerManager.GetMimeType(Path.GetExtension(pathPart)); + + return new FileStreamResult(resource.GetReadStream(), mimeType); } try { - IEnumerable children = _webdavManager.OpenFolder(pathPart); + var model = new ModelForWebDav + { + UrlSuffix = pathPart, + Permissions =_webDavAuthorizationService.GetPermissions(WspContext.User, pathPart), + UserSettings = _userSettingsManager.GetUserSettings(WspContext.User.AccountId), + SearchValue = searchValue + }; - var permissions = _webDavAuthorizationService.GetPermissions(WspContext.User, pathPart); - - var model = new ModelForWebDav { Items = children.Take(WebDavAppConfigManager.Instance.ElementsRendering.DefaultCount), UrlSuffix = pathPart, Permissions = permissions}; + if (Request.Browser.IsMobileDevice) + { + model.UserSettings.WebDavViewType = FolderViewTypes.BigIcons; + } return View(model); } @@ -84,42 +112,64 @@ namespace WebsitePanel.WebDavPortal.Controllers } } - public ActionResult ShowOfficeDocument(string org, string pathPart, string owaOpenerUri) + [ChildActionOnly] + public ActionResult ContentList(string org, ModelForWebDav model, string pathPart = "") { - string fileUrl = WebDavAppConfigManager.Instance.WebdavRoot+ org + "/" + pathPart.TrimStart('/'); - var accessToken = _tokenManager.CreateToken(WspContext.User, pathPart); - - var urlPart = Url.HttpRouteUrl(OwaRouteNames.CheckFileInfo, new {accessTokenId = accessToken.Id}); - var url = new Uri(Request.Url, urlPart).ToString(); - - string wopiSrc = Server.UrlDecode(url); - - var uri = string.Format("{0}/{1}WOPISrc={2}&access_token={3}", WebDavAppConfigManager.Instance.OfficeOnline.Url, owaOpenerUri, Server.UrlEncode(wopiSrc), Server.UrlEncode(accessToken.AccessToken.ToString("N"))); - - string fileName = fileUrl.Split('/').Last(); - - return View("ShowOfficeDocument", new OfficeOnlineModel(uri, fileName)); - } - - public ActionResult ViewOfficeDocument(string org, string pathPart) - { - var owaOpener = WebDavAppConfigManager.Instance.OfficeOnline.Single(x => x.Extension == Path.GetExtension(pathPart)); - - return ShowOfficeDocument(org, pathPart, owaOpener.OwaView); - } - - public ActionResult EditOfficeDocument(string org, string pathPart) - { - var permissions = _webDavAuthorizationService.GetPermissions(WspContext.User, pathPart); - - if (permissions.HasFlag(WebDavPermissions.Write) == false) + try { - return new RedirectToRouteResult(FileSystemRouteNames.ViewOfficeOnline, null); + if (Request.Browser.IsMobileDevice == false && model.UserSettings.WebDavViewType == FolderViewTypes.Table) + { + return PartialView("_ShowContentTable", model); + } + + IEnumerable children; + + if (string.IsNullOrEmpty(model.SearchValue)) + { + children = _webdavManager.OpenFolder(pathPart); + } + else + { + children = _webdavManager.SearchFiles(WspContext.User.ItemId, pathPart, model.SearchValue, WspContext.User.Login, true); + } + + model.Items = children.Take(WebDavAppConfigManager.Instance.ElementsRendering.DefaultCount); + + return PartialView("_ShowContentBigIcons", model); + } + catch (UnauthorizedException e) + { + throw new HttpException(404, "Not Found"); + } + } + + + [HttpGet] + public ActionResult GetContentDetails(string org, string pathPart, [ModelBinder(typeof (JqueryDataTableModelBinder))] JqueryDataTableRequest dtRequest) + { + IEnumerable folderItems; + + if (string.IsNullOrEmpty(dtRequest.Search.Value) == false) + { + folderItems = _webdavManager.SearchFiles(WspContext.User.ItemId, pathPart, dtRequest.Search.Value, WspContext.User.Login, true).Select(x => new WebDavResource(null, x)); + } + else + { + folderItems = _webdavManager.OpenFolder(pathPart).Select(x=>new WebDavResource(null, x)); } - var owaOpener = WebDavAppConfigManager.Instance.OfficeOnline.Single(x => x.Extension == Path.GetExtension(pathPart)); + var tableItems = Mapper.Map, IEnumerable>(folderItems).ToList(); - return ShowOfficeDocument(org, pathPart, owaOpener.OwaEditor); + FillContentModel(tableItems); + + var orders = dtRequest.Orders.ToList(); + orders.Insert(0, new JqueryDataTableOrder{Column = 3, Ascending = false}); + + dtRequest.Orders = orders; + + var dataTableResponse = DataTableHelper.ProcessRequest(tableItems, dtRequest); + + return Json(dataTableResponse, JsonRequestBehavior.AllowGet); } [HttpPost] @@ -146,7 +196,7 @@ namespace WebsitePanel.WebDavPortal.Controllers if (_webdavManager.IsFile(pathPart) == false) { - throw new Exception(Resources.NotAFile); + throw new Exception(Resources.UI.NotAFile); } var fileBytes = _webdavManager.GetFileBytes(pathPart); @@ -154,22 +204,51 @@ namespace WebsitePanel.WebDavPortal.Controllers return File(fileBytes, MediaTypeNames.Application.Octet, fileName); } - [HttpPost] - public ActionResult UploadFile(string org, string pathPart) + [HttpGet] + public ActionResult UploadFiles(string org, string pathPart) { - foreach (string fileName in Request.Files) + var model = new ModelForWebDav { - var file = Request.Files[fileName]; + UrlSuffix = pathPart + }; - if (file == null || file.ContentLength == 0) + return View(model); + } + + [HttpPost] + [ActionName("UploadFiles")] + public ActionResult UploadFilePost(string org, string pathPart) + { + var uploadResults = new List(); + + foreach (string file in Request.Files) + { + var hpf = Request.Files[file] as HttpPostedFileBase; + + if (hpf == null || hpf.ContentLength == 0) { continue; } - _webdavManager.UploadFile(pathPart, file); + _webdavManager.UploadFile(pathPart, hpf); + + uploadResults.Add(new UploadFileResult() + { + name = hpf.FileName, + size = hpf.ContentLength, + type = hpf.ContentType + }); } - return RedirectToRoute(FileSystemRouteNames.ShowContentPath); + var result = Json(new { files = uploadResults }); + + //for IE8 which does not accept application/json + if (Request.Headers["Accept"] != null && !Request.Headers["Accept"].Contains("application/json")) + { + result.ContentType = MediaTypeNames.Text.Plain; + } + + return result; } [HttpPost] @@ -179,7 +258,7 @@ namespace WebsitePanel.WebDavPortal.Controllers if (filePathes == null) { - model.AddMessage(MessageType.Error, Resources.NoFilesAreSelected); + model.AddMessage(MessageType.Error, Resources.UI.NoFilesAreSelected); return Json(model); } @@ -200,10 +279,82 @@ namespace WebsitePanel.WebDavPortal.Controllers if (model.DeletedFiles.Any()) { - model.AddMessage(MessageType.Success, string.Format(Resources.ItemsWasRemovedFormat, model.DeletedFiles.Count)); + model.AddMessage(MessageType.Success, string.Format(Resources.UI.ItemsWasRemovedFormat, model.DeletedFiles.Count)); } return Json(model); } + + #region Owa Actions + + public ActionResult ShowOfficeDocument(string org, string pathPart, string owaOpenerUri) + { + string fileUrl = WebDavAppConfigManager.Instance.WebdavRoot + org + "/" + pathPart.TrimStart('/'); + var accessToken = _tokenManager.CreateToken(WspContext.User, pathPart); + + var urlPart = Url.HttpRouteUrl(OwaRouteNames.CheckFileInfo, new { accessTokenId = accessToken.Id }); + var url = new Uri(Request.Url, urlPart).ToString(); + + string wopiSrc = Server.UrlDecode(url); + + var uri = string.Format("{0}/{1}WOPISrc={2}&access_token={3}", WebDavAppConfigManager.Instance.OfficeOnline.Url, owaOpenerUri, Server.UrlEncode(wopiSrc), Server.UrlEncode(accessToken.AccessToken.ToString("N"))); + + string fileName = fileUrl.Split('/').Last(); + string folder = pathPart.ReplaceLast(fileName, "").Trim('/'); + + return View("ShowOfficeDocument", new OfficeOnlineModel(uri, fileName, folder)); + } + + public ActionResult ViewOfficeDocument(string org, string pathPart) + { + var owaOpener = WebDavAppConfigManager.Instance.OfficeOnline.Single(x => x.Extension == Path.GetExtension(pathPart)); + + var owaOpenerUrl = Request.Browser.IsMobileDevice ? owaOpener.OwaMobileViev : owaOpener.OwaView; + + return ShowOfficeDocument(org, pathPart, owaOpenerUrl); + } + + public ActionResult EditOfficeDocument(string org, string pathPart) + { + var permissions = _webDavAuthorizationService.GetPermissions(WspContext.User, pathPart); + + if (permissions.HasFlag(WebDavPermissions.Write) == false || Request.Browser.IsMobileDevice) + { + return new RedirectToRouteResult(FileSystemRouteNames.ViewOfficeOnline, null); + } + + var owaOpener = WebDavAppConfigManager.Instance.OfficeOnline.Single(x => x.Extension == Path.GetExtension(pathPart)); + + return ShowOfficeDocument(org, pathPart, owaOpener.OwaEditor); + } + #endregion + + private void FillContentModel(IEnumerable items) + { + foreach (var item in items) + { + var opener = _openerManager[Path.GetExtension(item.DisplayName)]; + + switch (opener) + { + case FileOpenerType.OfficeOnline: + { + var pathPart = item.Href.AbsolutePath.Replace("/" + WspContext.User.OrganizationId, "").TrimStart('/'); + item.Url = string.Concat(Url.RouteUrl(FileSystemRouteNames.EditOfficeOnline, new {org = WspContext.User.OrganizationId, pathPart = ""}), pathPart); + break; + } + default: + { + item.Url = item.Href.LocalPath; + break; + } + } + + if (Request.Browser.IsMobileDevice) + { + item.IsTargetBlank = false; + } + } + } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs index 1e3c37e4..c7661530 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs @@ -1,10 +1,12 @@ using Ninject; using System.Web.SessionState; using WebsitePanel.WebDav.Core.Interfaces.Managers; +using WebsitePanel.WebDav.Core.Interfaces.Managers.Users; using WebsitePanel.WebDav.Core.Interfaces.Owa; using WebsitePanel.WebDav.Core.Interfaces.Security; using WebsitePanel.WebDav.Core.Interfaces.Storages; using WebsitePanel.WebDav.Core.Managers; +using WebsitePanel.WebDav.Core.Managers.Users; using WebsitePanel.WebDav.Core.Owa; using WebsitePanel.WebDav.Core.Security.Authentication; using WebsitePanel.WebDav.Core.Security.Authorization; @@ -28,6 +30,7 @@ namespace WebsitePanel.WebDavPortal.DependencyInjection kernel.Bind().To(); kernel.Bind().To(); kernel.Bind().To(); + kernel.Bind().To(); } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/Providers/WebDavManagerProvider.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/Providers/WebDavManagerProvider.cs deleted file mode 100644 index e731d5fc..00000000 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/Providers/WebDavManagerProvider.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Net; -using System.Web.SessionState; -using Ninject; -using Ninject.Activation; -using WebsitePanel.WebDav.Core; -using WebsitePanel.WebDav.Core.Config; -using WebsitePanel.WebDav.Core.Managers; -using WebsitePanel.WebDav.Core.Security.Cryptography; -using WebsitePanel.WebDavPortal.Models; - -namespace WebsitePanel.WebDavPortal.DependencyInjection.Providers -{ - public class WebDavManagerProvider : Provider - { - protected override WebDavManager CreateInstance(IContext context) - { - var session = context.Kernel.Get(); - - WebDavManager webDavManager = null; - - if (session != null) - { - webDavManager = session[WebDavAppConfigManager.Instance.SessionKeys.WebDavManager] as WebDavManager; - - if (webDavManager == null) - { - var cryptography = context.Kernel.Get(); - - webDavManager = new WebDavManager(cryptography); - - session[WebDavAppConfigManager.Instance.SessionKeys.WebDavManager] = webDavManager; - } - } - - return webDavManager; - } - } -} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/FileOperations/FileOpenerManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/FileOperations/FileOpenerManager.cs index f948d193..a362692d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/FileOperations/FileOpenerManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/FileOperations/FileOpenerManager.cs @@ -1,20 +1,92 @@ using System.Collections.Generic; +using System.IO; using System.Linq; using System.Net; +using System.Net.Mime; using System.Web; +using System.Web.Mvc; +using WebsitePanel.WebDav.Core; +using WebsitePanel.WebDav.Core.Client; using WebsitePanel.WebDav.Core.Config; using WebsitePanel.WebDavPortal.Extensions; +using WebsitePanel.WebDavPortal.UI.Routes; namespace WebsitePanel.WebDavPortal.FileOperations { public class FileOpenerManager { + private readonly IDictionary _officeOperationTypes = new Dictionary(); private readonly IDictionary _operationTypes = new Dictionary(); public FileOpenerManager() { if (WebDavAppConfigManager.Instance.OfficeOnline.IsEnabled) - _operationTypes.AddRange(WebDavAppConfigManager.Instance.OfficeOnline.ToDictionary(x => x.Extension, y => FileOpenerType.OfficeOnline)); + { + _officeOperationTypes.AddRange( + WebDavAppConfigManager.Instance.OfficeOnline.ToDictionary(x => x.Extension, + y => FileOpenerType.OfficeOnline)); + } + + _operationTypes.AddRange( + WebDavAppConfigManager.Instance.FileOpener.ToDictionary(x => x.Extension, + y => FileOpenerType.Open)); + } + + public string GetUrl(IHierarchyItem item, UrlHelper urlHelper) + { + var opener = this[Path.GetExtension(item.DisplayName)]; + string href = "/"; + + switch (opener) + { + case FileOpenerType.OfficeOnline: + { + var pathPart = item.Href.AbsolutePath.Replace("/" + WspContext.User.OrganizationId, "").TrimStart('/'); + href = string.Concat(urlHelper.RouteUrl(FileSystemRouteNames.EditOfficeOnline, new { org = WspContext.User.OrganizationId, pathPart = "" }), pathPart); + break; + } + default: + { + href = item.Href.LocalPath; + break; + } + } + + return href; + } + + public bool GetIsTargetBlank(IHierarchyItem item) + { + var opener = this[Path.GetExtension(item.DisplayName)]; + var result = false; + + switch (opener) + { + case FileOpenerType.OfficeOnline: + { + result = true; + break; + } + case FileOpenerType.Open: + { + result = true; + break; + } + } + + return result; + } + + public string GetMimeType(string extension) + { + var opener = WebDavAppConfigManager.Instance.FileOpener.FirstOrDefault(x => x.Extension.ToLowerInvariant() == extension.ToLowerInvariant()); + + if (opener == null) + { + return MediaTypeNames.Application.Octet; + } + + return opener.MimeType; } public FileOpenerType this[string fileExtension] @@ -22,8 +94,16 @@ namespace WebsitePanel.WebDavPortal.FileOperations get { FileOpenerType result; - if (_operationTypes.TryGetValue(fileExtension, out result) && CheckBrowserSupport()) + if (_officeOperationTypes.TryGetValue(fileExtension, out result) && CheckBrowserSupport()) + { return result; + } + + if (_operationTypes.TryGetValue(fileExtension, out result)) + { + return result; + } + return FileOpenerType.Download; } } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/FileOperations/FileOpenerType.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/FileOperations/FileOpenerType.cs index af460893..9483893e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/FileOperations/FileOpenerType.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/FileOperations/FileOpenerType.cs @@ -2,6 +2,6 @@ { public enum FileOpenerType { - Download, OfficeOnline + Download, OfficeOnline, Open } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Global.asax.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Global.asax.cs index 8a658982..fd14b881 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Global.asax.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Global.asax.cs @@ -8,6 +8,7 @@ using System.Web.Routing; using System.Web.Script.Serialization; using System.Web.Security; using System.Web.SessionState; +using AutoMapper; using WebsitePanel.WebDav.Core.Config; using WebsitePanel.WebDav.Core.Interfaces.Security; using WebsitePanel.WebDav.Core.Security.Authentication.Principals; @@ -16,6 +17,7 @@ using WebsitePanel.WebDavPortal.App_Start; using WebsitePanel.WebDavPortal.Controllers; using WebsitePanel.WebDavPortal.DependencyInjection; using WebsitePanel.WebDavPortal.HttpHandlers; +using WebsitePanel.WebDavPortal.Mapping; namespace WebsitePanel.WebDavPortal { @@ -32,6 +34,10 @@ namespace WebsitePanel.WebDavPortal DependencyResolver.SetResolver(new NinjectDependecyResolver()); + AutoMapperPortalConfiguration.Configure(); + + Mapper.AssertConfigurationIsValid(); + log4net.Config.XmlConfigurator.Configure(); } diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Helpers/DataTableHelper.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Helpers/DataTableHelper.cs new file mode 100644 index 00000000..3a229887 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Helpers/DataTableHelper.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using WebsitePanel.WebDavPortal.Models.Common.DataTable; + +namespace WebsitePanel.WebDavPortal.Helpers +{ + public class DataTableHelper + { + public static JqueryDataTablesResponse ProcessRequest(IEnumerable entities, JqueryDataTableRequest request) where TEntity : JqueryDataTableBaseEntity + { + IOrderedEnumerable orderedEntities = null; + + foreach (var order in request.Orders) + { + var closure = order; + + if (orderedEntities == null) + { + orderedEntities = order.Ascending ? entities.OrderBy(x => x[closure.Column]) : entities.OrderByDescending(x => x[closure.Column]); + } + else + { + orderedEntities = order.Ascending ? orderedEntities.ThenBy(x => x[closure.Column]) : orderedEntities.ThenByDescending(x => x[closure.Column]); + } + } + + if (orderedEntities == null) + { + orderedEntities = entities.OrderBy(x=>x[0]); + } + + var itemsPaged = orderedEntities.Skip(request.Start).Take(request.Count).ToList(); + var totalCount = orderedEntities.Count(); + + + return new JqueryDataTablesResponse( + request.Draw, + itemsPaged, + totalCount, + totalCount); + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Logs/log-debug.log b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Logs/log-debug.log new file mode 100644 index 00000000..e69de29b diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Mapping/AutoMapperPortalConfiguration.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Mapping/AutoMapperPortalConfiguration.cs new file mode 100644 index 00000000..060bb3af --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Mapping/AutoMapperPortalConfiguration.cs @@ -0,0 +1,17 @@ +using AutoMapper; +using WebsitePanel.WebDavPortal.Mapping.Profiles.Webdav; + +namespace WebsitePanel.WebDavPortal.Mapping +{ + public class AutoMapperPortalConfiguration + { + public static void Configure() + { + Mapper.Initialize( + config => + { + config.AddProfile(); + }); + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Mapping/Profiles/Webdav/ResourceTableItemProfile.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Mapping/Profiles/Webdav/ResourceTableItemProfile.cs new file mode 100644 index 00000000..a20e44b3 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Mapping/Profiles/Webdav/ResourceTableItemProfile.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Web; +using AutoMapper; +using WebsitePanel.WebDav.Core.Client; +using WebsitePanel.WebDav.Core.Config; +using WebsitePanel.WebDav.Core.Extensions; +using WebsitePanel.WebDavPortal.FileOperations; +using WebsitePanel.WebDavPortal.Models.FileSystem; + +namespace WebsitePanel.WebDavPortal.Mapping.Profiles.Webdav +{ + public class ResourceTableItemProfile : Profile + { + /// + /// Gets the name of the profile. + /// + /// + /// The name of the profile. + /// + public override string ProfileName + { + get + { + return this.GetType().Name; + } + } + + /// + /// Override this method in a derived class and call the CreateMap method to associate that map with this profile. + /// Avoid calling the class from this method. + /// + protected override void Configure() + { + var openerManager = new FileOpenerManager(); + + Mapper.CreateMap() + .ForMember(ti => ti.DisplayName, x => x.MapFrom(hi => hi.DisplayName.Trim('/'))) + .ForMember(ti => ti.Href, x => x.MapFrom(hi => hi.Href)) + .ForMember(ti => ti.Type, x => x.MapFrom(hi => hi.ItemType.GetDescription().ToLowerInvariant())) + .ForMember(ti => ti.IconHref, x => x.MapFrom(hi => hi.ItemType == ItemType.Folder ? WebDavAppConfigManager.Instance.FileIcons.FolderPath.Trim('~') : WebDavAppConfigManager.Instance.FileIcons[Path.GetExtension(hi.DisplayName.Trim('/'))].Trim('~'))) + .ForMember(ti => ti.IsTargetBlank, x => x.MapFrom(hi => openerManager.GetIsTargetBlank(hi))) + .ForMember(ti => ti.LastModified, x => x.MapFrom(hi => hi.LastModified)) + .ForMember(ti => ti.LastModifiedFormated, x => x.MapFrom(hi => hi.LastModified == DateTime.MinValue ? "--" : (new WebDavResource(null, hi)).LastModified.ToString("dd/MM/yyyy hh:mm tt"))) + + .ForMember(ti => ti.Size, x => x.MapFrom(hi => hi.ContentLength)) + .ForMember(ti => ti.IsFolder, x => x.MapFrom(hi => hi.ItemType == ItemType.Folder)); + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/ModelBinders/DataTables/JqueryDataTableModelBinder.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/ModelBinders/DataTables/JqueryDataTableModelBinder.cs new file mode 100644 index 00000000..aa0f749e --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/ModelBinders/DataTables/JqueryDataTableModelBinder.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using System.Web; +using System.Web.Mvc; +using Microsoft.Ajax.Utilities; +using WebsitePanel.WebDavPortal.Models.Common.DataTable; + + +namespace WebsitePanel.WebDavPortal.ModelBinders.DataTables +{ + public class JqueryDataTableModelBinder : DefaultModelBinder + { + public override object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) + { + base.BindModel(controllerContext, bindingContext); + HttpRequestBase request = controllerContext.HttpContext.Request; + + // Retrieve request data + int draw = Convert.ToInt32(request["draw"]); + int start = Convert.ToInt32(request["start"]); + int count = Convert.ToInt32(request["length"]); + + // Search + var search = new JqueryDataTableSearch + { + Value = request["search[value]"], + IsRegex = Convert.ToBoolean(request["search[regex]"]) + }; + + var orderIndex = 0; + + var orders = new List(); + + while (request["order[" + orderIndex + "][column]"] != null) + { + orders.Add(new JqueryDataTableOrder() + { + Column = Convert.ToInt32(request["order[" + orderIndex + "][column]"]), + Ascending = (request["order[" + orderIndex + "][dir]"] == "asc") + }); + + orderIndex++; + } + + // Columns + var columnsIndex = 0; + var columns = new List(); + + while (request["columns[" + columnsIndex + "][name]"] != null) + { + columns.Add(new JqueryDataTableColumn + { + Data = request["columns[" + columnsIndex + "][data]"], + Name = request["columns[" + columnsIndex + "][name]"], + Orderable = Convert.ToBoolean(request["columns[" + columnsIndex + "][orderable]"]), + Search = new JqueryDataTableSearch + { + Value = request["columns[" + columnsIndex + "][search][value]"], + IsRegex = Convert.ToBoolean(request["columns[" + columnsIndex + "][search][regex]"]) + } + }); + + columnsIndex++; + } + + return new JqueryDataTableRequest + { + Draw = draw, + Start = start, + Count = count, + Search = search, + Orders = orders, + Columns = columns + }; + } + + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTableBaseEntity.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTableBaseEntity.cs new file mode 100644 index 00000000..12504577 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTableBaseEntity.cs @@ -0,0 +1,13 @@ +using System.Collections; +using System.Collections.Generic; + +namespace WebsitePanel.WebDavPortal.Models.Common.DataTable +{ + public abstract class JqueryDataTableBaseEntity + { + public abstract dynamic this[int index] + { + get; + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTableColumn.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTableColumn.cs new file mode 100644 index 00000000..1d458b84 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTableColumn.cs @@ -0,0 +1,13 @@ +namespace WebsitePanel.WebDavPortal.Models.Common.DataTable +{ + public class JqueryDataTableColumn + { + public string Data { get; set; } + + public string Name { get; set; } + + public bool Orderable { get; set; } + + public JqueryDataTableSearch Search { get; set; } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTableOrder.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTableOrder.cs new file mode 100644 index 00000000..8ba46f24 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTableOrder.cs @@ -0,0 +1,8 @@ +namespace WebsitePanel.WebDavPortal.Models.Common.DataTable +{ + public class JqueryDataTableOrder + { + public int Column { get; set; } + public bool Ascending { get; set; } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTableRequest.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTableRequest.cs new file mode 100644 index 00000000..c0ff7f8c --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTableRequest.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; + +namespace WebsitePanel.WebDavPortal.Models.Common.DataTable +{ + public class JqueryDataTableRequest + { + public int Draw { get; set; } + public int Start { get; set; } + public int Count { get; set; } + + + public JqueryDataTableSearch Search { get; set; } + public IEnumerable Orders { get; set; } + public IEnumerable Columns { get; set; } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTableSearch.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTableSearch.cs new file mode 100644 index 00000000..2da548d1 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTableSearch.cs @@ -0,0 +1,9 @@ +namespace WebsitePanel.WebDavPortal.Models.Common.DataTable +{ + public class JqueryDataTableSearch + { + public string Value { get; set; } + + public bool IsRegex { get; set; } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTablesResponse.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTablesResponse.cs new file mode 100644 index 00000000..48b06874 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/DataTable/JqueryDataTablesResponse.cs @@ -0,0 +1,20 @@ +using System.Collections; + +namespace WebsitePanel.WebDavPortal.Models.Common.DataTable +{ + public class JqueryDataTablesResponse + { + public int draw { get; private set; } + public IEnumerable data { get; private set; } + public int recordsTotal { get; private set; } + public int recordsFiltered { get; private set; } + + public JqueryDataTablesResponse(int draw, IEnumerable data, int recordsFilteredCount, int recordsTotalCount) + { + this.draw = draw; + this.data = data; + this.recordsFiltered = recordsFilteredCount; + this.recordsTotal = recordsTotalCount; + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/FileSystem/ResourceTableItemModel.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/FileSystem/ResourceTableItemModel.cs new file mode 100644 index 00000000..24ac5e13 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/FileSystem/ResourceTableItemModel.cs @@ -0,0 +1,46 @@ +using System; +using WebsitePanel.WebDav.Core.Client; +using WebsitePanel.WebDavPortal.Models.Common.DataTable; + +namespace WebsitePanel.WebDavPortal.Models.FileSystem +{ + public class ResourceTableItemModel : JqueryDataTableBaseEntity + { + public string DisplayName { get; set; } + public string Url { get; set; } + public Uri Href { get; set; } + public bool IsTargetBlank { get; set; } + public bool IsFolder { get; set; } + public long Size { get; set; } + public string Type { get; set; } + public DateTime LastModified { get; set; } + public string LastModifiedFormated { get; set; } + public string IconHref { get; set; } + + public override dynamic this[int index] + { + get + { + switch (index) + { + case 1 : + { + return Size; + } + case 2: + { + return LastModified; + } + case 3: + { + return Type; + } + default: + { + return DisplayName; + } + } + } + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/FileSystem/UploadFileResult.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/FileSystem/UploadFileResult.cs new file mode 100644 index 00000000..52d2118e --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/FileSystem/UploadFileResult.cs @@ -0,0 +1,39 @@ +using System; + +namespace WebsitePanel.WebDavPortal.Models.FileSystem +{ + public class UploadFileResult + { + private string _error; + + public string error + { + get { return _error; } + set + { + if (!String.IsNullOrEmpty(value)) + { + _error = value; + deleteUrl = String.Empty; + thumbnailUrl = String.Empty; + url = String.Empty; + } + } + } + + public string name { get; set; } + + public int size { get; set; } + public string type { get; set; } + public string url { get; set; } + public string deleteUrl { get; set; } + public string thumbnailUrl { get; set; } + public string deleteType { get; set; } + + + public string FullPath { get; set; } + public string SavedFileName { get; set; } + + public string Title { get; set; } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/ModelForWebDav.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/ModelForWebDav.cs index bb6f722b..c54e50ac 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/ModelForWebDav.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/ModelForWebDav.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using WebsitePanel.WebDav.Core.Client; +using WebsitePanel.WebDav.Core.Entities.Account; using WebsitePanel.WebDav.Core.Security.Authorization.Enums; using WebsitePanel.WebDavPortal.Models.Common; @@ -10,6 +11,8 @@ namespace WebsitePanel.WebDavPortal.Models public IEnumerable Items { get; set; } public string UrlSuffix { get; set; } public string Error { get; set; } + public string SearchValue { get; set; } public WebDavPermissions Permissions { get; set; } + public UserPortalSettings UserSettings { get; set; } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/OfficeOnlineModel.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/OfficeOnlineModel.cs index 1fe27ec1..c1b61cac 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/OfficeOnlineModel.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/OfficeOnlineModel.cs @@ -6,11 +6,13 @@ namespace WebsitePanel.WebDavPortal.Models { public string Url { get; set; } public string FileName { get; set; } + public string Backurl { get; set; } - public OfficeOnlineModel(string url, string fileName) + public OfficeOnlineModel(string url, string fileName, string backUrl) { Url = url; FileName = fileName; + Backurl = backUrl; } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Resources.Designer.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.Designer.cs similarity index 65% rename from WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Resources.Designer.cs rename to WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.Designer.cs index 0722b254..e3836593 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Resources.Designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace WebsitePanel.WebDavPortal.UI { +namespace WebsitePanel.WebDavPortal.Resources { using System; @@ -22,14 +22,14 @@ namespace WebsitePanel.WebDavPortal.UI { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - public class Resources { + public class UI { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { + internal UI() { } /// @@ -39,7 +39,7 @@ namespace WebsitePanel.WebDavPortal.UI { public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WebsitePanel.WebDavPortal.UI.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WebsitePanel.WebDavPortal.Resources.UI", typeof(UI).Assembly); resourceMan = temp; } return resourceMan; @@ -78,6 +78,15 @@ namespace WebsitePanel.WebDavPortal.UI { } } + /// + /// Looks up a localized string similar to Cancel All. + /// + public static string CancelAll { + get { + return ResourceManager.GetString("CancelAll", resourceCulture); + } + } + /// /// Looks up a localized string similar to Close. /// @@ -114,6 +123,15 @@ namespace WebsitePanel.WebDavPortal.UI { } } + /// + /// Looks up a localized string similar to Details. + /// + public static string Details { + get { + return ResourceManager.GetString("Details", resourceCulture); + } + } + /// /// Looks up a localized string similar to Are you sure you want to delete {0} item(s)?. /// @@ -123,6 +141,15 @@ namespace WebsitePanel.WebDavPortal.UI { } } + /// + /// Looks up a localized string similar to Error. + /// + public static string Error { + get { + return ResourceManager.GetString("Error", resourceCulture); + } + } + /// /// Looks up a localized string similar to File Upload. /// @@ -150,6 +177,24 @@ namespace WebsitePanel.WebDavPortal.UI { } } + /// + /// Looks up a localized string similar to Modified. + /// + public static string Modified { + get { + return ResourceManager.GetString("Modified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name. + /// + public static string Name { + get { + return ResourceManager.GetString("Name", resourceCulture); + } + } + /// /// Looks up a localized string similar to No files are selected.. /// @@ -168,6 +213,24 @@ namespace WebsitePanel.WebDavPortal.UI { } } + /// + /// Looks up a localized string similar to or drag and drop files here.. + /// + public static string OrDragAndDropFilesHere { + get { + return ResourceManager.GetString("OrDragAndDropFilesHere", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please wait.... + /// + public static string PleaseWaitWithDots { + get { + return ResourceManager.GetString("PleaseWaitWithDots", resourceCulture); + } + } + /// /// Looks up a localized string similar to Processing. /// @@ -186,6 +249,51 @@ namespace WebsitePanel.WebDavPortal.UI { } } + /// + /// Looks up a localized string similar to Search. + /// + public static string Search { + get { + return ResourceManager.GetString("Search", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Select files to upload. + /// + public static string SelectFilesToUpload { + get { + return ResourceManager.GetString("SelectFilesToUpload", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Size. + /// + public static string Size { + get { + return ResourceManager.GetString("Size", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Table. + /// + public static string Table { + get { + return ResourceManager.GetString("Table", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type. + /// + public static string Type { + get { + return ResourceManager.GetString("Type", resourceCulture); + } + } + /// /// Looks up a localized string similar to Upload. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Resources.resx b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.resx similarity index 85% rename from WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Resources.resx rename to WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.resx index edd8c739..5cb4b1a3 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/UI/Resources.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.resx @@ -123,6 +123,9 @@ Cancel + + Cancel All + Close @@ -135,9 +138,15 @@ Delete File? + + Details + Are you sure you want to delete {0} item(s)? + + Error + File Upload @@ -147,18 +156,45 @@ {0} items was removed. + + Modified + + + Name + No files are selected. Not a file. + + or drag and drop files here. + + + Please wait... + Processing Processing... + + Search + + + Select files to upload + + + Size + + + Table + + + Type + Upload diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/DataTables-1.10.4/dataTables.autoFill.js b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/DataTables-1.10.4/dataTables.autoFill.js new file mode 100644 index 00000000..6bbfa35b --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/DataTables-1.10.4/dataTables.autoFill.js @@ -0,0 +1,855 @@ +/*! AutoFill 1.2.1 + * ©2008-2014 SpryMedia Ltd - datatables.net/license + */ + +/** + * @summary AutoFill + * @description Add Excel like click and drag auto-fill options to DataTables + * @version 1.2.1 + * @file dataTables.autoFill.js + * @author SpryMedia Ltd (www.sprymedia.co.uk) + * @contact www.sprymedia.co.uk/contact + * @copyright Copyright 2010-2014 SpryMedia Ltd. + * + * This source file is free software, available under the following license: + * MIT license - http://datatables.net/license/mit + * + * This source file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + * + * For details please refer to: http://www.datatables.net + */ + +(function( window, document, undefined ) { + +var factory = function( $, DataTable ) { +"use strict"; + +/** + * AutoFill provides Excel like auto-fill features for a DataTable + * + * @class AutoFill + * @constructor + * @param {object} oTD DataTables settings object + * @param {object} oConfig Configuration object for AutoFill + */ +var AutoFill = function( oDT, oConfig ) +{ + /* Sanity check that we are a new instance */ + if ( ! (this instanceof AutoFill) ) { + throw( "Warning: AutoFill must be initialised with the keyword 'new'" ); + } + + if ( ! $.fn.dataTableExt.fnVersionCheck('1.7.0') ) { + throw( "Warning: AutoFill requires DataTables 1.7 or greater"); + } + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Public class variables + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + this.c = {}; + + /** + * @namespace Settings object which contains customisable information for AutoFill instance + */ + this.s = { + /** + * @namespace Cached information about the little dragging icon (the filler) + */ + "filler": { + "height": 0, + "width": 0 + }, + + /** + * @namespace Cached information about the border display + */ + "border": { + "width": 2 + }, + + /** + * @namespace Store for live information for the current drag + */ + "drag": { + "startX": -1, + "startY": -1, + "startTd": null, + "endTd": null, + "dragging": false + }, + + /** + * @namespace Data cache for information that we need for scrolling the screen when we near + * the edges + */ + "screen": { + "interval": null, + "y": 0, + "height": 0, + "scrollTop": 0 + }, + + /** + * @namespace Data cache for the position of the DataTables scrolling element (when scrolling + * is enabled) + */ + "scroller": { + "top": 0, + "bottom": 0 + }, + + /** + * @namespace Information stored for each column. An array of objects + */ + "columns": [] + }; + + + /** + * @namespace Common and useful DOM elements for the class instance + */ + this.dom = { + "table": null, + "filler": null, + "borderTop": null, + "borderRight": null, + "borderBottom": null, + "borderLeft": null, + "currentTarget": null + }; + + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Public class methods + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * Retreieve the settings object from an instance + * @method fnSettings + * @returns {object} AutoFill settings object + */ + this.fnSettings = function () { + return this.s; + }; + + + /* Constructor logic */ + this._fnInit( oDT, oConfig ); + return this; +}; + + + +AutoFill.prototype = { + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Private methods (they are of course public in JS, but recommended as private) + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * Initialisation + * @method _fnInit + * @param {object} dt DataTables settings object + * @param {object} config Configuration object for AutoFill + * @returns void + */ + "_fnInit": function ( dt, config ) + { + var + that = this, + i, iLen; + + // Use DataTables API to get the settings allowing selectors, instances + // etc to be used, or for backwards compatibility get from the old + // fnSettings method + this.s.dt = DataTable.Api ? + new DataTable.Api( dt ).settings()[0] : + dt.fnSettings(); + this.s.init = config || {}; + this.dom.table = this.s.dt.nTable; + + $.extend( true, this.c, AutoFill.defaults, config ); + + /* Add and configure the columns */ + this._initColumns(); + + /* Auto Fill click and drag icon */ + var filler = $('
', { + 'class': 'AutoFill_filler' + } ) + .appendTo( 'body' ); + this.dom.filler = filler[0]; + + // Get the height / width of the click element + this.s.filler.height = filler.height(); + this.s.filler.width = filler.width(); + filler[0].style.display = "none"; + + /* Border display - one div for each side. We can't just use a single + * one with a border, as we want the events to effectively pass through + * the transparent bit of the box + */ + var border; + var appender = document.body; + if ( that.s.dt.oScroll.sY !== "" ) { + that.s.dt.nTable.parentNode.style.position = "relative"; + appender = that.s.dt.nTable.parentNode; + } + + border = $('
', { + "class": "AutoFill_border" + } ); + this.dom.borderTop = border.clone().appendTo( appender )[0]; + this.dom.borderRight = border.clone().appendTo( appender )[0]; + this.dom.borderBottom = border.clone().appendTo( appender )[0]; + this.dom.borderLeft = border.clone().appendTo( appender )[0]; + + /* Events */ + filler.on( 'mousedown.DTAF', function (e) { + this.onselectstart = function() { return false; }; + that._fnFillerDragStart.call( that, e ); + return false; + } ); + + $('tbody', this.dom.table).on( + 'mouseover.DTAF mouseout.DTAF', + '>tr>td, >tr>th', + function (e) { + that._fnFillerDisplay.call( that, e ); + } + ); + + $(this.dom.table).on( 'destroy.dt.DTAF', function () { + filler.off( 'mousedown.DTAF' ).remove(); + $('tbody', this.dom.table).off( 'mouseover.DTAF mouseout.DTAF' ); + } ); + }, + + + _initColumns: function ( ) + { + var that = this; + var i, ien; + var dt = this.s.dt; + var config = this.s.init; + + for ( i=0, ien=dt.aoColumns.length ; i offsetEnd.left) { + x1 = offsetEnd.left - border; + x2 = offsetStart.left + $(nStart).outerWidth(); + width = offsetStart.left + $(nStart).outerWidth() - offsetEnd.left + (2*border); + } + + if ( this.s.dt.oScroll.sY !== "" ) + { + /* The border elements are inside the DT scroller - so position relative to that */ + var + offsetScroll = $(this.s.dt.nTable.parentNode).offset(), + scrollTop = $(this.s.dt.nTable.parentNode).scrollTop(), + scrollLeft = $(this.s.dt.nTable.parentNode).scrollLeft(); + + x1 -= offsetScroll.left - scrollLeft; + x2 -= offsetScroll.left - scrollLeft; + y1 -= offsetScroll.top - scrollTop; + y2 -= offsetScroll.top - scrollTop; + } + + /* Top */ + oStyle = this.dom.borderTop.style; + oStyle.top = y1+"px"; + oStyle.left = x1+"px"; + oStyle.height = this.s.border.width+"px"; + oStyle.width = width+"px"; + + /* Bottom */ + oStyle = this.dom.borderBottom.style; + oStyle.top = y2+"px"; + oStyle.left = x1+"px"; + oStyle.height = this.s.border.width+"px"; + oStyle.width = width+"px"; + + /* Left */ + oStyle = this.dom.borderLeft.style; + oStyle.top = y1+"px"; + oStyle.left = x1+"px"; + oStyle.height = height+"px"; + oStyle.width = this.s.border.width+"px"; + + /* Right */ + oStyle = this.dom.borderRight.style; + oStyle.top = y1+"px"; + oStyle.left = x2+"px"; + oStyle.height = height+"px"; + oStyle.width = this.s.border.width+"px"; + }, + + + /** + * Mouse down event handler for starting a drag + * @method _fnFillerDragStart + * @param {Object} e Event object + * @returns void + */ + "_fnFillerDragStart": function (e) + { + var that = this; + var startingTd = this.dom.currentTarget; + + this.s.drag.dragging = true; + + that.dom.borderTop.style.display = "block"; + that.dom.borderRight.style.display = "block"; + that.dom.borderBottom.style.display = "block"; + that.dom.borderLeft.style.display = "block"; + + var coords = this._fnTargetCoords( startingTd ); + this.s.drag.startX = coords.x; + this.s.drag.startY = coords.y; + + this.s.drag.startTd = startingTd; + this.s.drag.endTd = startingTd; + + this._fnUpdateBorder( startingTd, startingTd ); + + $(document).bind('mousemove.AutoFill', function (e) { + that._fnFillerDragMove.call( that, e ); + } ); + + $(document).bind('mouseup.AutoFill', function (e) { + that._fnFillerFinish.call( that, e ); + } ); + + /* Scrolling information cache */ + this.s.screen.y = e.pageY; + this.s.screen.height = $(window).height(); + this.s.screen.scrollTop = $(document).scrollTop(); + + if ( this.s.dt.oScroll.sY !== "" ) + { + this.s.scroller.top = $(this.s.dt.nTable.parentNode).offset().top; + this.s.scroller.bottom = this.s.scroller.top + $(this.s.dt.nTable.parentNode).height(); + } + + /* Scrolling handler - we set an interval (which is cancelled on mouse up) which will fire + * regularly and see if we need to do any scrolling + */ + this.s.screen.interval = setInterval( function () { + var iScrollTop = $(document).scrollTop(); + var iScrollDelta = iScrollTop - that.s.screen.scrollTop; + that.s.screen.y += iScrollDelta; + + if ( that.s.screen.height - that.s.screen.y + iScrollTop < 50 ) + { + $('html, body').animate( { + "scrollTop": iScrollTop + 50 + }, 240, 'linear' ); + } + else if ( that.s.screen.y - iScrollTop < 50 ) + { + $('html, body').animate( { + "scrollTop": iScrollTop - 50 + }, 240, 'linear' ); + } + + if ( that.s.dt.oScroll.sY !== "" ) + { + if ( that.s.screen.y > that.s.scroller.bottom - 50 ) + { + $(that.s.dt.nTable.parentNode).animate( { + "scrollTop": $(that.s.dt.nTable.parentNode).scrollTop() + 50 + }, 240, 'linear' ); + } + else if ( that.s.screen.y < that.s.scroller.top + 50 ) + { + $(that.s.dt.nTable.parentNode).animate( { + "scrollTop": $(that.s.dt.nTable.parentNode).scrollTop() - 50 + }, 240, 'linear' ); + } + } + }, 250 ); + }, + + + /** + * Mouse move event handler for during a move. See if we want to update the display based on the + * new cursor position + * @method _fnFillerDragMove + * @param {Object} e Event object + * @returns void + */ + "_fnFillerDragMove": function (e) + { + if ( e.target && e.target.nodeName.toUpperCase() == "TD" && + e.target != this.s.drag.endTd ) + { + var coords = this._fnTargetCoords( e.target ); + + if ( this.c.mode == "y" && coords.x != this.s.drag.startX ) + { + e.target = $('tbody>tr:eq('+coords.y+')>td:eq('+this.s.drag.startX+')', this.dom.table)[0]; + } + if ( this.c.mode == "x" && coords.y != this.s.drag.startY ) + { + e.target = $('tbody>tr:eq('+this.s.drag.startY+')>td:eq('+coords.x+')', this.dom.table)[0]; + } + + if ( this.c.mode == "either") + { + if(coords.x != this.s.drag.startX ) + { + e.target = $('tbody>tr:eq('+this.s.drag.startY+')>td:eq('+coords.x+')', this.dom.table)[0]; + } + else if ( coords.y != this.s.drag.startY ) { + e.target = $('tbody>tr:eq('+coords.y+')>td:eq('+this.s.drag.startX+')', this.dom.table)[0]; + } + } + + // update coords + if ( this.c.mode !== "both" ) { + coords = this._fnTargetCoords( e.target ); + } + + var drag = this.s.drag; + drag.endTd = e.target; + + if ( coords.y >= this.s.drag.startY ) { + this._fnUpdateBorder( drag.startTd, drag.endTd ); + } + else { + this._fnUpdateBorder( drag.endTd, drag.startTd ); + } + this._fnFillerPosition( e.target ); + } + + /* Update the screen information so we can perform scrolling */ + this.s.screen.y = e.pageY; + this.s.screen.scrollTop = $(document).scrollTop(); + + if ( this.s.dt.oScroll.sY !== "" ) + { + this.s.scroller.scrollTop = $(this.s.dt.nTable.parentNode).scrollTop(); + this.s.scroller.top = $(this.s.dt.nTable.parentNode).offset().top; + this.s.scroller.bottom = this.s.scroller.top + $(this.s.dt.nTable.parentNode).height(); + } + }, + + + /** + * Mouse release handler - end the drag and take action to update the cells with the needed values + * @method _fnFillerFinish + * @param {Object} e Event object + * @returns void + */ + "_fnFillerFinish": function (e) + { + var that = this, i, iLen, j; + + $(document).unbind('mousemove.AutoFill mouseup.AutoFill'); + + this.dom.borderTop.style.display = "none"; + this.dom.borderRight.style.display = "none"; + this.dom.borderBottom.style.display = "none"; + this.dom.borderLeft.style.display = "none"; + + this.s.drag.dragging = false; + + clearInterval( this.s.screen.interval ); + + var cells = []; + var table = this.dom.table; + var coordsStart = this._fnTargetCoords( this.s.drag.startTd ); + var coordsEnd = this._fnTargetCoords( this.s.drag.endTd ); + var columnIndex = function ( visIdx ) { + return that.s.dt.oApi._fnVisibleToColumnIndex( that.s.dt, visIdx ); + }; + + // xxx - urgh - there must be a way of reducing this... + if ( coordsStart.y <= coordsEnd.y ) { + for ( i=coordsStart.y ; i<=coordsEnd.y ; i++ ) { + if ( coordsStart.x <= coordsEnd.x ) { + for ( j=coordsStart.x ; j<=coordsEnd.x ; j++ ) { + cells.push( { + node: $('tbody>tr:eq('+i+')>td:eq('+j+')', table)[0], + x: j - coordsStart.x, + y: i - coordsStart.y, + colIdx: columnIndex( j ) + } ); + } + } + else { + for ( j=coordsStart.x ; j>=coordsEnd.x ; j-- ) { + cells.push( { + node: $('tbody>tr:eq('+i+')>td:eq('+j+')', table)[0], + x: j - coordsStart.x, + y: i - coordsStart.y, + colIdx: columnIndex( j ) + } ); + } + } + } + } + else { + for ( i=coordsStart.y ; i>=coordsEnd.y ; i-- ) { + if ( coordsStart.x <= coordsEnd.x ) { + for ( j=coordsStart.x ; j<=coordsEnd.x ; j++ ) { + cells.push( { + node: $('tbody>tr:eq('+i+')>td:eq('+j+')', table)[0], + x: j - coordsStart.x, + y: i - coordsStart.y, + colIdx: columnIndex( j ) + } ); + } + } + else { + for ( j=coordsStart.x ; j>=coordsEnd.x ; j-- ) { + cells.push( { + node: $('tbody>tr:eq('+i+')>td:eq('+j+')', table)[0], + x: coordsStart.x - j, + y: coordsStart.y - i, + colIdx: columnIndex( j ) + } ); + } + } + } + } + + // An auto-fill requires 2 or more cells + if ( cells.length <= 1 ) { + return; + } + + var edited = []; + var previous; + + for ( i=0, iLen=cells.length ; i",{"class":"AutoFill_filler"}).appendTo("body");this.dom.filler=e[0];this.s.filler.height=e.height();this.s.filler.width=e.width();e[0].style.display= +"none";var g,f=j.body;""!==a.s.dt.oScroll.sY&&(a.s.dt.nTable.parentNode.style.position="relative",f=a.s.dt.nTable.parentNode);g=c("
",{"class":"AutoFill_border"});this.dom.borderTop=g.clone().appendTo(f)[0];this.dom.borderRight=g.clone().appendTo(f)[0];this.dom.borderBottom=g.clone().appendTo(f)[0];this.dom.borderLeft=g.clone().appendTo(f)[0];e.on("mousedown.DTAF",function(b){this.onselectstart=function(){return false};a._fnFillerDragStart.call(a,b);return false});c("tbody",this.dom.table).on("mouseover.DTAF mouseout.DTAF", +">tr>td, >tr>th",function(b){a._fnFillerDisplay.call(a,b)});c(this.dom.table).on("destroy.dt.DTAF",function(){e.off("mousedown.DTAF").remove();c("tbody",this.dom.table).off("mouseover.DTAF mouseout.DTAF")})},_initColumns:function(){var d=this,b,a,e=this.s.dt,g=this.s.init;b=0;for(a=e.aoColumns.length;bg.left&&(f=g.left-a,i=e.left+c(d).outerWidth(),j=e.left+c(d).outerWidth()-g.left+2*a);""!==this.s.dt.oScroll.sY&&(a=c(this.s.dt.nTable.parentNode).offset(),e=c(this.s.dt.nTable.parentNode).scrollTop(), +g=c(this.s.dt.nTable.parentNode).scrollLeft(),f-=a.left-g,i-=a.left-g,n-=a.top-e,h-=a.top-e);a=this.dom.borderTop.style;a.top=n+"px";a.left=f+"px";a.height=this.s.border.width+"px";a.width=j+"px";a=this.dom.borderBottom.style;a.top=h+"px";a.left=f+"px";a.height=this.s.border.width+"px";a.width=j+"px";a=this.dom.borderLeft.style;a.top=n+"px";a.left=f+"px";a.height=k+"px";a.width=this.s.border.width+"px";a=this.dom.borderRight.style;a.top=n+"px";a.left=i+"px";a.height=k+"px";a.width=this.s.border.width+ +"px"},_fnFillerDragStart:function(d){var b=this,a=this.dom.currentTarget;this.s.drag.dragging=!0;b.dom.borderTop.style.display="block";b.dom.borderRight.style.display="block";b.dom.borderBottom.style.display="block";b.dom.borderLeft.style.display="block";var e=this._fnTargetCoords(a);this.s.drag.startX=e.x;this.s.drag.startY=e.y;this.s.drag.startTd=a;this.s.drag.endTd=a;this._fnUpdateBorder(a,a);c(j).bind("mousemove.AutoFill",function(a){b._fnFillerDragMove.call(b,a)});c(j).bind("mouseup.AutoFill", +function(a){b._fnFillerFinish.call(b,a)});this.s.screen.y=d.pageY;this.s.screen.height=c(o).height();this.s.screen.scrollTop=c(j).scrollTop();""!==this.s.dt.oScroll.sY&&(this.s.scroller.top=c(this.s.dt.nTable.parentNode).offset().top,this.s.scroller.bottom=this.s.scroller.top+c(this.s.dt.nTable.parentNode).height());this.s.screen.interval=setInterval(function(){var a=c(j).scrollTop();b.s.screen.y=b.s.screen.y+(a-b.s.screen.scrollTop);b.s.screen.height-b.s.screen.y+a<50?c("html, body").animate({scrollTop:a+ +50},240,"linear"):b.s.screen.y-a<50&&c("html, body").animate({scrollTop:a-50},240,"linear");b.s.dt.oScroll.sY!==""&&(b.s.screen.y>b.s.scroller.bottom-50?c(b.s.dt.nTable.parentNode).animate({scrollTop:c(b.s.dt.nTable.parentNode).scrollTop()+50},240,"linear"):b.s.screen.ytr:eq("+b.y+")>td:eq("+this.s.drag.startX+")",this.dom.table)[0]);"x"==this.c.mode&&b.y!=this.s.drag.startY&&(d.target=c("tbody>tr:eq("+this.s.drag.startY+")>td:eq("+b.x+")",this.dom.table)[0]);"either"==this.c.mode&&(b.x!=this.s.drag.startX?d.target=c("tbody>tr:eq("+this.s.drag.startY+")>td:eq("+b.x+")",this.dom.table)[0]:b.y!=this.s.drag.startY&&(d.target=c("tbody>tr:eq("+b.y+")>td:eq("+this.s.drag.startX+ +")",this.dom.table)[0]));"both"!==this.c.mode&&(b=this._fnTargetCoords(d.target));var a=this.s.drag;a.endTd=d.target;b.y>=this.s.drag.startY?this._fnUpdateBorder(a.startTd,a.endTd):this._fnUpdateBorder(a.endTd,a.startTd);this._fnFillerPosition(d.target)}this.s.screen.y=d.pageY;this.s.screen.scrollTop=c(j).scrollTop();""!==this.s.dt.oScroll.sY&&(this.s.scroller.scrollTop=c(this.s.dt.nTable.parentNode).scrollTop(),this.s.scroller.top=c(this.s.dt.nTable.parentNode).offset().top,this.s.scroller.bottom= +this.s.scroller.top+c(this.s.dt.nTable.parentNode).height())},_fnFillerFinish:function(){var d=this,b,a;c(j).unbind("mousemove.AutoFill mouseup.AutoFill");this.dom.borderTop.style.display="none";this.dom.borderRight.style.display="none";this.dom.borderBottom.style.display="none";this.dom.borderLeft.style.display="none";this.s.drag.dragging=!1;clearInterval(this.s.screen.interval);var e=[],g=this.dom.table,f=this._fnTargetCoords(this.s.drag.startTd),i=this._fnTargetCoords(this.s.drag.endTd),h=function(a){return d.s.dt.oApi._fnVisibleToColumnIndex(d.s.dt, +a)};if(f.y<=i.y)for(b=f.y;b<=i.y;b++)if(f.x<=i.x)for(a=f.x;a<=i.x;a++)e.push({node:c("tbody>tr:eq("+b+")>td:eq("+a+")",g)[0],x:a-f.x,y:b-f.y,colIdx:h(a)});else for(a=f.x;a>=i.x;a--)e.push({node:c("tbody>tr:eq("+b+")>td:eq("+a+")",g)[0],x:a-f.x,y:b-f.y,colIdx:h(a)});else for(b=f.y;b>=i.y;b--)if(f.x<=i.x)for(a=f.x;a<=i.x;a++)e.push({node:c("tbody>tr:eq("+b+")>td:eq("+a+")",g)[0],x:a-f.x,y:b-f.y,colIdx:h(a)});else for(a=f.x;a>=i.x;a--)e.push({node:c("tbody>tr:eq("+b+")>td:eq("+a+")",g)[0],x:f.x-a,y:f.y- +b,colIdx:h(a)});if(!(1>=e.length)){var g=[],m;b=0;for(a=e.length;bg||0>f?-1:1)):a===m?b:a}}};return h};"function"===typeof define&&define.amd? +define(["jquery","datatables"],l):"object"===typeof exports?l(require("jquery"),require("datatables")):jQuery&&!jQuery.fn.dataTable.AutoFill&&l(jQuery,jQuery.fn.dataTable)})(window,document); diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/DataTables-1.10.4/dataTables.bootstrap.js b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/DataTables-1.10.4/dataTables.bootstrap.js new file mode 100644 index 00000000..5037d7d5 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/DataTables-1.10.4/dataTables.bootstrap.js @@ -0,0 +1,152 @@ +/* Set the defaults for DataTables initialisation */ +$.extend( true, $.fn.dataTable.defaults, { + "sDom": "<'row'<'col-xs-6'l><'col-xs-6'f>r>t<'row'<'col-xs-6'i><'col-xs-6'p>>", + "sPaginationType": "bootstrap", + "oLanguage": { + "sLengthMenu": "_MENU_ records per page" + } +} ); + + + + +/* Default class modification */ +$.extend( $.fn.dataTableExt.oStdClasses, { + "sWrapper": "dataTables_wrapper form-inline", + "sFilterInput": "form-control input-sm", + "sLengthSelect": "form-control input-sm" +} ); + + +/* API method to get paging information */ +$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings ) +{ + return { + "iStart": oSettings._iDisplayStart, + "iEnd": oSettings.fnDisplayEnd(), + "iLength": oSettings._iDisplayLength, + "iTotal": oSettings.fnRecordsTotal(), + "iFilteredTotal": oSettings.fnRecordsDisplay(), + "iPage": oSettings._iDisplayLength === -1 ? + 0 : Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ), + "iTotalPages": oSettings._iDisplayLength === -1 ? + 0 : Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength ) + }; +}; + + +/* Bootstrap style pagination control */ +$.extend( $.fn.dataTableExt.oPagination, { + "bootstrap": { + "fnInit": function( oSettings, nPaging, fnDraw ) { + var oLang = oSettings.oLanguage.oPaginate; + var fnClickHandler = function ( e ) { + e.preventDefault(); + if ( oSettings.oApi._fnPageChange(oSettings, e.data.action) ) { + fnDraw( oSettings ); + } + }; + + $(nPaging).append( + '' + ); + var els = $('a', nPaging); + $(els[0]).bind( 'click.DT', { action: "previous" }, fnClickHandler ); + $(els[1]).bind( 'click.DT', { action: "next" }, fnClickHandler ); + }, + + "fnUpdate": function ( oSettings, fnDraw ) { + var iListLength = 5; + var oPaging = oSettings.oInstance.fnPagingInfo(); + var an = oSettings.aanFeatures.p; + var i, ien, j, sClass, iStart, iEnd, iHalf=Math.floor(iListLength/2); + + if ( oPaging.iTotalPages < iListLength) { + iStart = 1; + iEnd = oPaging.iTotalPages; + } + else if ( oPaging.iPage <= iHalf ) { + iStart = 1; + iEnd = iListLength; + } else if ( oPaging.iPage >= (oPaging.iTotalPages-iHalf) ) { + iStart = oPaging.iTotalPages - iListLength + 1; + iEnd = oPaging.iTotalPages; + } else { + iStart = oPaging.iPage - iHalf + 1; + iEnd = iStart + iListLength - 1; + } + + for ( i=0, ien=an.length ; i'+j+'') + .insertBefore( $('li:last', an[i])[0] ) + .bind('click', function (e) { + e.preventDefault(); + oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength; + fnDraw( oSettings ); + } ); + } + + // Add / remove disabled classes from the static elements + if ( oPaging.iPage === 0 ) { + $('li:first', an[i]).addClass('disabled'); + } else { + $('li:first', an[i]).removeClass('disabled'); + } + + if ( oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0 ) { + $('li:last', an[i]).addClass('disabled'); + } else { + $('li:last', an[i]).removeClass('disabled'); + } + } + } + } +} ); + + +/* + * TableTools Bootstrap compatibility + * Required TableTools 2.1+ + */ +if ( $.fn.DataTable.TableTools ) { + // Set the classes that TableTools uses to something suitable for Bootstrap + $.extend( true, $.fn.DataTable.TableTools.classes, { + "container": "DTTT btn-group", + "buttons": { + "normal": "btn btn-default", + "disabled": "disabled" + }, + "collection": { + "container": "DTTT_dropdown dropdown-menu", + "buttons": { + "normal": "", + "disabled": "disabled" + } + }, + "print": { + "info": "DTTT_print_info modal" + }, + "select": { + "row": "active" + } + } ); + + // Have the collection use a bootstrap compatible dropdown + $.extend( true, $.fn.DataTable.TableTools.DEFAULTS.oTags, { + "collection": { + "container": "ul", + "button": "li", + "liner": "a" + } + } ); +} + diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/DataTables-1.10.4/dataTables.colReorder.js b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/DataTables-1.10.4/dataTables.colReorder.js new file mode 100644 index 00000000..bc5aeee7 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/DataTables-1.10.4/dataTables.colReorder.js @@ -0,0 +1,1371 @@ +/*! ColReorder 1.1.2 + * ©2010-2014 SpryMedia Ltd - datatables.net/license + */ + +/** + * @summary ColReorder + * @description Provide the ability to reorder columns in a DataTable + * @version 1.1.2 + * @file dataTables.colReorder.js + * @author SpryMedia Ltd (www.sprymedia.co.uk) + * @contact www.sprymedia.co.uk/contact + * @copyright Copyright 2010-2014 SpryMedia Ltd. + * + * This source file is free software, available under the following license: + * MIT license - http://datatables.net/license/mit + * + * This source file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + * + * For details please refer to: http://www.datatables.net + */ + +(function(window, document, undefined) { + + +/** + * Switch the key value pairing of an index array to be value key (i.e. the old value is now the + * key). For example consider [ 2, 0, 1 ] this would be returned as [ 1, 2, 0 ]. + * @method fnInvertKeyValues + * @param array aIn Array to switch around + * @returns array + */ +function fnInvertKeyValues( aIn ) +{ + var aRet=[]; + for ( var i=0, iLen=aIn.length ; i= iCols ) + { + this.oApi._fnLog( oSettings, 1, "ColReorder 'from' index is out of bounds: "+iFrom ); + return; + } + + if ( iTo < 0 || iTo >= iCols ) + { + this.oApi._fnLog( oSettings, 1, "ColReorder 'to' index is out of bounds: "+iTo ); + return; + } + + /* + * Calculate the new column array index, so we have a mapping between the old and new + */ + var aiMapping = []; + for ( i=0, iLen=iCols ; i this.s.fixed-1 && i < iLen - this.s.fixedRight ) + { + this._fnMouseListener( i, this.s.dt.aoColumns[i].nTh ); + } + + /* Mark the original column order for later reference */ + this.s.dt.aoColumns[i]._ColReorder_iOrigCol = i; + } + + /* State saving */ + this.s.dt.oApi._fnCallbackReg( this.s.dt, 'aoStateSaveParams', function (oS, oData) { + that._fnStateSave.call( that, oData ); + }, "ColReorder_State" ); + + /* An initial column order has been specified */ + var aiOrder = null; + if ( this.s.init.aiOrder ) + { + aiOrder = this.s.init.aiOrder.slice(); + } + + /* State loading, overrides the column order given */ + if ( this.s.dt.oLoadedState && typeof this.s.dt.oLoadedState.ColReorder != 'undefined' && + this.s.dt.oLoadedState.ColReorder.length == this.s.dt.aoColumns.length ) + { + aiOrder = this.s.dt.oLoadedState.ColReorder; + } + + /* If we have an order to apply - do so */ + if ( aiOrder ) + { + /* We might be called during or after the DataTables initialisation. If before, then we need + * to wait until the draw is done, if after, then do what we need to do right away + */ + if ( !that.s.dt._bInitComplete ) + { + var bDone = false; + this.s.dt.aoDrawCallback.push( { + "fn": function () { + if ( !that.s.dt._bInitComplete && !bDone ) + { + bDone = true; + var resort = fnInvertKeyValues( aiOrder ); + that._fnOrderColumns.call( that, resort ); + } + }, + "sName": "ColReorder_Pre" + } ); + } + else + { + var resort = fnInvertKeyValues( aiOrder ); + that._fnOrderColumns.call( that, resort ); + } + } + else { + this._fnSetColumnIndexes(); + } + }, + + + /** + * Set the column order from an array + * @method _fnOrderColumns + * @param array a An array of integers which dictate the column order that should be applied + * @returns void + * @private + */ + "_fnOrderColumns": function ( a ) + { + if ( a.length != this.s.dt.aoColumns.length ) + { + this.s.dt.oInstance.oApi._fnLog( this.s.dt, 1, "ColReorder - array reorder does not "+ + "match known number of columns. Skipping." ); + return; + } + + for ( var i=0, iLen=a.length ; i
') + .addClass( 'DTCR_pointer' ) + .css( { + position: 'absolute', + top: scrolling ? + $('div.dataTables_scroll', this.s.dt.nTableWrapper).offset().top : + $(this.s.dt.nTable).offset().top, + height : scrolling ? + $('div.dataTables_scroll', this.s.dt.nTableWrapper).height() : + $(this.s.dt.nTable).height() + } ) + .appendTo( 'body' ); + }, + + /** + * Clean up ColReorder memory references and event handlers + * @method _fnDestroy + * @returns void + * @private + */ + "_fnDestroy": function () + { + var i, iLen; + + for ( i=0, iLen=this.s.dt.aoDrawCallback.length ; if||f>=m)this.oApi._fnLog(b,1,"ColReorder 'from' index is out of bounds: "+f);else if(0>a||a>=m)this.oApi._fnLog(b,1,"ColReorder 'to' index is out of bounds: "+a);else{j=[];c=0;for(d=m;cthis.s.fixed-1&&cMath.pow(Math.pow(a.pageX-this.s.mouse.startX,2)+Math.pow(a.pageY-this.s.mouse.startY,2),0.5))return;this._fnCreateDragNode()}this.dom.drag.css({left:a.pageX-this.s.mouse.offsetX,top:a.pageY-this.s.mouse.offsetY});for(var b=!1,c=this.s.mouse.toIndex,d=1,f=this.s.aoTargets.length;d
").addClass("DTCR_pointer").css({position:"absolute",top:a?b("div.dataTables_scroll",this.s.dt.nTableWrapper).offset().top:b(this.s.dt.nTable).offset().top,height:a?b("div.dataTables_scroll",this.s.dt.nTableWrapper).height():b(this.s.dt.nTable).height()}).appendTo("body")}, +_fnDestroy:function(){var a,e;a=0;for(e=this.s.dt.aoDrawCallback.length;a
')[0], +g=c.childNodes[0],f=c.childNodes[1];this.dom.grid.dt.parentNode.insertBefore(c,this.dom.grid.dt);c.appendChild(this.dom.grid.dt);this.dom.grid.wrapper=c;0b.clientWidth&&(c.x=!0);a.offsetHeight>b.clientHeight&&(c.y=!0);return c},_fnDraw:function(a){this._fnGridLayout();this._fnCloneLeft(a);this._fnCloneRight(a);null!==this.s.fnDrawCallback&&this.s.fnDrawCallback.call(this,this.dom.clone.left,this.dom.clone.right);d(this).trigger("draw.dtfc",{leftClone:this.dom.clone.left,rightClone:this.dom.clone.right})},_fnCloneRight:function(a){if(!(0>=this.s.iRightColumns)){var b,c=[];for(b=this.s.iTableColumns-this.s.iRightColumns;b=this.s.iLeftColumns)){var b,c=[];for(b=0;bthead",a.header);j.empty();e=0; +for(h=m.length;ethead",a.header)[0]);e=0;for(h=m.length;etbody>tr",f.dom.body).css("height","auto");null!==a.body&&(a.body.parentNode.removeChild(a.body),a.body=null);a.body=d(this.dom.body).clone(!0)[0];a.body.className+=" DTFC_Cloned";a.body.style.paddingBottom=this.s.dt.oScroll.iBarWidth+"px";a.body.style.marginBottom=2*this.s.dt.oScroll.iBarWidth+"px";null!==a.body.getAttribute("id")&&a.body.removeAttribute("id");d(">thead>tr",a.body).empty();d(">tfoot",a.body).remove();var o=d("tbody",a.body)[0];d(o).empty();if(0thead>tr",a.body)[0];for(k=0;ktbody>tr",f.dom.body).each(function(a){var b=this.cloneNode(false);b.removeAttribute("id");a=f.s.dt.oFeatures.bServerSide===false?f.s.dt.aiDisplay[f.s.dt._iDisplayStart+a]:a;for(k=0;k0){l=d(e[n]).clone(true,true)[0];b.appendChild(l)}}o.appendChild(b)})}else d(">tbody>tr",f.dom.body).each(function(){l=this.cloneNode(true);l.className=l.className+" DTFC_NoData";d("td",l).html("");o.appendChild(l)});a.body.style.width="100%";a.body.style.margin="0";a.body.style.padding="0";g&&"undefined"!=typeof this.s.dt.oScroller&&b.liner.appendChild(this.s.dt.oScroller.dom.force.cloneNode(!0));b.liner.appendChild(a.body);this._fnEqualiseHeights("tbody", +f.dom.body,a.body);if(null!==this.s.dt.nTFoot){if(g){null!==a.footer&&a.footer.parentNode.removeChild(a.footer);a.footer=d(this.dom.footer).clone(!0,!0)[0];a.footer.className+=" DTFC_Cloned";a.footer.style.width="100%";b.foot.appendChild(a.footer);m=this._fnCopyLayout(this.s.dt.aoFooter,c);b=d(">tfoot",a.footer);b.empty();e=0;for(h=m.length;etfoot",a.footer)[0]);e=0;for(h=m.length;ethead",a.header)[0]);d(b).each(function(a){n=c[a];this.style.width=f.s.aiInnerWidths[n]+"px"});null!==f.s.dt.nTFoot&&(b=this.s.dt.oApi._fnGetUniqueThs(this.s.dt,d(">tfoot",a.footer)[0]),d(b).each(function(a){n=c[a];this.style.width=f.s.aiInnerWidths[n]+"px"}))},_fnGetTrNodes:function(a){for(var b= +[],c=0,d=a.childNodes.length;c"+a+">tr:eq(0)",b).children(":first");a.outerHeight();a.height();for(var e=this._fnGetTrNodes(e),b=this._fnGetTrNodes(c),h=[],c=0,a=b.length;cg?f:g,"semiauto"==this.s.sHeightMatch&& +(e[c]._DTTC_iHeight=g),h.push(g);c=0;for(a=b.length;ctfoot', s.nTable).length > 0) ? true : false; + + /* Add the 'sides' that are fixed */ + if ( s.oSides.top ) + { + s.aoCache.push( that._fnCloneTable( "fixedHeader", "FixedHeader_Header", that._fnCloneThead ) ); + } + if ( s.oSides.bottom ) + { + s.aoCache.push( that._fnCloneTable( "fixedFooter", "FixedHeader_Footer", that._fnCloneTfoot ) ); + } + if ( s.oSides.left ) + { + s.aoCache.push( that._fnCloneTable( "fixedLeft", "FixedHeader_Left", that._fnCloneTLeft, s.oSides.left ) ); + } + if ( s.oSides.right ) + { + s.aoCache.push( that._fnCloneTable( "fixedRight", "FixedHeader_Right", that._fnCloneTRight, s.oSides.right ) ); + } + + /* Event listeners for window movement */ + FixedHeader.afnScroll.push( function () { + that._fnUpdatePositions.call(that); + } ); + + $(window).resize( function () { + FixedHeader.fnMeasure(); + that._fnUpdateClones.call(that); + that._fnUpdatePositions.call(that); + } ); + + $(s.nTable) + .on('column-reorder.dt', function () { + FixedHeader.fnMeasure(); + that._fnUpdateClones( true ); + that._fnUpdatePositions(); + } ) + .on('column-visibility.dt', function () { + FixedHeader.fnMeasure(); + that._fnUpdateClones( true ); + that._fnUpdatePositions(); + } ); + + /* Get things right to start with */ + FixedHeader.fnMeasure(); + that._fnUpdateClones(); + that._fnUpdatePositions(); + + s.bInitComplete = true; + }, + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Support functions + */ + + /* + * Function: fnInitSettings + * Purpose: Take the user's settings and copy them to our local store + * Returns: - + * Inputs: object:s - the local settings object + * object:oInit - the user's settings object + */ + fnInitSettings: function ( s, oInit ) + { + if ( oInit !== undefined ) + { + if ( oInit.top !== undefined ) { + s.oSides.top = oInit.top; + } + if ( oInit.bottom !== undefined ) { + s.oSides.bottom = oInit.bottom; + } + if ( typeof oInit.left == 'boolean' ) { + s.oSides.left = oInit.left ? 1 : 0; + } + else if ( oInit.left !== undefined ) { + s.oSides.left = oInit.left; + } + if ( typeof oInit.right == 'boolean' ) { + s.oSides.right = oInit.right ? 1 : 0; + } + else if ( oInit.right !== undefined ) { + s.oSides.right = oInit.right; + } + + if ( oInit.zTop !== undefined ) { + s.oZIndexes.top = oInit.zTop; + } + if ( oInit.zBottom !== undefined ) { + s.oZIndexes.bottom = oInit.zBottom; + } + if ( oInit.zLeft !== undefined ) { + s.oZIndexes.left = oInit.zLeft; + } + if ( oInit.zRight !== undefined ) { + s.oZIndexes.right = oInit.zRight; + } + + if ( oInit.offsetTop !== undefined ) { + s.oOffset.top = oInit.offsetTop; + } + if ( oInit.alwaysCloneTop !== undefined ) { + s.oCloneOnDraw.top = oInit.alwaysCloneTop; + } + if ( oInit.alwaysCloneBottom !== undefined ) { + s.oCloneOnDraw.bottom = oInit.alwaysCloneBottom; + } + if ( oInit.alwaysCloneLeft !== undefined ) { + s.oCloneOnDraw.left = oInit.alwaysCloneLeft; + } + if ( oInit.alwaysCloneRight !== undefined ) { + s.oCloneOnDraw.right = oInit.alwaysCloneRight; + } + } + }, + + /* + * Function: _fnCloneTable + * Purpose: Clone the table node and do basic initialisation + * Returns: - + * Inputs: - + */ + _fnCloneTable: function ( sType, sClass, fnClone, iCells ) + { + var s = this.fnGetSettings(); + var nCTable; + + /* We know that the table _MUST_ has a DIV wrapped around it, because this is simply how + * DataTables works. Therefore, we can set this to be relatively position (if it is not + * alreadu absolute, and use this as the base point for the cloned header + */ + if ( $(s.nTable.parentNode).css('position') != "absolute" ) + { + s.nTable.parentNode.style.position = "relative"; + } + + /* Just a shallow clone will do - we only want the table node */ + nCTable = s.nTable.cloneNode( false ); + nCTable.removeAttribute( 'id' ); + + var nDiv = document.createElement( 'div' ); + nDiv.style.position = "absolute"; + nDiv.style.top = "0px"; + nDiv.style.left = "0px"; + nDiv.className += " FixedHeader_Cloned "+sType+" "+sClass; + + /* Set the zIndexes */ + if ( sType == "fixedHeader" ) + { + nDiv.style.zIndex = s.oZIndexes.top; + } + if ( sType == "fixedFooter" ) + { + nDiv.style.zIndex = s.oZIndexes.bottom; + } + if ( sType == "fixedLeft" ) + { + nDiv.style.zIndex = s.oZIndexes.left; + } + else if ( sType == "fixedRight" ) + { + nDiv.style.zIndex = s.oZIndexes.right; + } + + /* remove margins since we are going to position it absolutely */ + nCTable.style.margin = "0"; + + /* Insert the newly cloned table into the DOM, on top of the "real" header */ + nDiv.appendChild( nCTable ); + document.body.appendChild( nDiv ); + + return { + "nNode": nCTable, + "nWrapper": nDiv, + "sType": sType, + "sPosition": "", + "sTop": "", + "sLeft": "", + "fnClone": fnClone, + "iCells": iCells + }; + }, + + /* + * Function: _fnMeasure + * Purpose: Get the current positioning of the table in the DOM + * Returns: - + * Inputs: - + */ + _fnMeasure: function () + { + var + s = this.fnGetSettings(), + m = s.oMes, + jqTable = $(s.nTable), + oOffset = jqTable.offset(), + iParentScrollTop = this._fnSumScroll( s.nTable.parentNode, 'scrollTop' ), + iParentScrollLeft = this._fnSumScroll( s.nTable.parentNode, 'scrollLeft' ); + + m.iTableWidth = jqTable.outerWidth(); + m.iTableHeight = jqTable.outerHeight(); + m.iTableLeft = oOffset.left + s.nTable.parentNode.scrollLeft; + m.iTableTop = oOffset.top + iParentScrollTop; + m.iTableRight = m.iTableLeft + m.iTableWidth; + m.iTableRight = FixedHeader.oDoc.iWidth - m.iTableLeft - m.iTableWidth; + m.iTableBottom = FixedHeader.oDoc.iHeight - m.iTableTop - m.iTableHeight; + }, + + /* + * Function: _fnSumScroll + * Purpose: Sum node parameters all the way to the top + * Returns: int: sum + * Inputs: node:n - node to consider + * string:side - scrollTop or scrollLeft + */ + _fnSumScroll: function ( n, side ) + { + var i = n[side]; + while ( n = n.parentNode ) + { + if ( n.nodeName == 'HTML' || n.nodeName == 'BODY' ) + { + break; + } + i = n[side]; + } + return i; + }, + + /* + * Function: _fnUpdatePositions + * Purpose: Loop over the fixed elements for this table and update their positions + * Returns: - + * Inputs: - + */ + _fnUpdatePositions: function () + { + var s = this.fnGetSettings(); + this._fnMeasure(); + + for ( var i=0, iLen=s.aoCache.length ; i oWin.iScrollTop + s.oOffset.top ) + { + /* Above the table */ + this._fnUpdateCache( oCache, 'sPosition', "absolute", 'position', nTable.style ); + this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style ); + this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style ); + } + else if ( oWin.iScrollTop + s.oOffset.top > oMes.iTableTop+iTbodyHeight ) + { + /* At the bottom of the table */ + this._fnUpdateCache( oCache, 'sPosition', "absolute", 'position', nTable.style ); + this._fnUpdateCache( oCache, 'sTop', (oMes.iTableTop+iTbodyHeight)+"px", 'top', nTable.style ); + this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style ); + } + else + { + /* In the middle of the table */ + this._fnUpdateCache( oCache, 'sPosition', 'fixed', 'position', nTable.style ); + this._fnUpdateCache( oCache, 'sTop', s.oOffset.top+"px", 'top', nTable.style ); + this._fnUpdateCache( oCache, 'sLeft', (oMes.iTableLeft-oWin.iScrollLeft)+"px", 'left', nTable.style ); + } + }, + + /* + * Function: _fnUpdateCache + * Purpose: Check the cache and update cache and value if needed + * Returns: - + * Inputs: object:oCache - local cache object + * string:sCache - cache property + * string:sSet - value to set + * string:sProperty - object property to set + * object:oObj - object to update + */ + _fnUpdateCache: function ( oCache, sCache, sSet, sProperty, oObj ) + { + if ( oCache[sCache] != sSet ) + { + oObj[sProperty] = sSet; + oCache[sCache] = sSet; + } + }, + + + + /** + * Copy the classes of all child nodes from one element to another. This implies + * that the two have identical structure - no error checking is performed to that + * fact. + * @param {element} source Node to copy classes from + * @param {element} dest Node to copy classes too + */ + _fnClassUpdate: function ( source, dest ) + { + var that = this; + + if ( source.nodeName.toUpperCase() === "TR" || source.nodeName.toUpperCase() === "TH" || + source.nodeName.toUpperCase() === "TD" || source.nodeName.toUpperCase() === "SPAN" ) + { + dest.className = source.className; + } + + $(source).children().each( function (i) { + that._fnClassUpdate( $(source).children()[i], $(dest).children()[i] ); + } ); + }, + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Cloning functions + */ + + /* + * Function: _fnCloneThead + * Purpose: Clone the thead element + * Returns: - + * Inputs: object:oCache - the cached values for this fixed element + */ + _fnCloneThead: function ( oCache ) + { + var s = this.fnGetSettings(); + var nTable = oCache.nNode; + + if ( s.bInitComplete && !s.oCloneOnDraw.top ) + { + this._fnClassUpdate( $('thead', s.nTable)[0], $('thead', nTable)[0] ); + return; + } + + /* Set the wrapper width to match that of the cloned table */ + var iDtWidth = $(s.nTable).outerWidth(); + oCache.nWrapper.style.width = iDtWidth+"px"; + nTable.style.width = iDtWidth+"px"; + + /* Remove any children the cloned table has */ + while ( nTable.childNodes.length > 0 ) + { + $('thead th', nTable).unbind( 'click' ); + nTable.removeChild( nTable.childNodes[0] ); + } + + /* Clone the DataTables header */ + var nThead = $('thead', s.nTable).clone(true)[0]; + nTable.appendChild( nThead ); + + /* Copy the widths across - apparently a clone isn't good enough for this */ + var a = []; + var b = []; + + $("thead>tr th", s.nTable).each( function (i) { + a.push( $(this).width() ); + } ); + + $("thead>tr td", s.nTable).each( function (i) { + b.push( $(this).width() ); + } ); + + $("thead>tr th", s.nTable).each( function (i) { + $("thead>tr th:eq("+i+")", nTable).width( a[i] ); + $(this).width( a[i] ); + } ); + + $("thead>tr td", s.nTable).each( function (i) { + $("thead>tr td:eq("+i+")", nTable).width( b[i] ); + $(this).width( b[i] ); + } ); + + // Stop DataTables 1.9 from putting a focus ring on the headers when + // clicked to sort + $('th.sorting, th.sorting_desc, th.sorting_asc', nTable).bind( 'click', function () { + this.blur(); + } ); + }, + + /* + * Function: _fnCloneTfoot + * Purpose: Clone the tfoot element + * Returns: - + * Inputs: object:oCache - the cached values for this fixed element + */ + _fnCloneTfoot: function ( oCache ) + { + var s = this.fnGetSettings(); + var nTable = oCache.nNode; + + /* Set the wrapper width to match that of the cloned table */ + oCache.nWrapper.style.width = $(s.nTable).outerWidth()+"px"; + + /* Remove any children the cloned table has */ + while ( nTable.childNodes.length > 0 ) + { + nTable.removeChild( nTable.childNodes[0] ); + } + + /* Clone the DataTables footer */ + var nTfoot = $('tfoot', s.nTable).clone(true)[0]; + nTable.appendChild( nTfoot ); + + /* Copy the widths across - apparently a clone isn't good enough for this */ + $("tfoot:eq(0)>tr th", s.nTable).each( function (i) { + $("tfoot:eq(0)>tr th:eq("+i+")", nTable).width( $(this).width() ); + } ); + + $("tfoot:eq(0)>tr td", s.nTable).each( function (i) { + $("tfoot:eq(0)>tr td:eq("+i+")", nTable).width( $(this).width() ); + } ); + }, + + /* + * Function: _fnCloneTLeft + * Purpose: Clone the left column(s) + * Returns: - + * Inputs: object:oCache - the cached values for this fixed element + */ + _fnCloneTLeft: function ( oCache ) + { + var s = this.fnGetSettings(); + var nTable = oCache.nNode; + var nBody = $('tbody', s.nTable)[0]; + + /* Remove any children the cloned table has */ + while ( nTable.childNodes.length > 0 ) + { + nTable.removeChild( nTable.childNodes[0] ); + } + + /* Is this the most efficient way to do this - it looks horrible... */ + nTable.appendChild( $("thead", s.nTable).clone(true)[0] ); + nTable.appendChild( $("tbody", s.nTable).clone(true)[0] ); + if ( s.bFooter ) + { + nTable.appendChild( $("tfoot", s.nTable).clone(true)[0] ); + } + + /* Remove unneeded cells */ + var sSelector = 'gt(' + (oCache.iCells - 1) + ')'; + $('thead tr', nTable).each( function (k) { + $('th:' + sSelector, this).remove(); + } ); + + $('tfoot tr', nTable).each( function (k) { + $('th:' + sSelector, this).remove(); + } ); + + $('tbody tr', nTable).each( function (k) { + $('td:' + sSelector, this).remove(); + } ); + + this.fnEqualiseHeights( 'thead', nBody.parentNode, nTable ); + this.fnEqualiseHeights( 'tbody', nBody.parentNode, nTable ); + this.fnEqualiseHeights( 'tfoot', nBody.parentNode, nTable ); + + var iWidth = 0; + for (var i = 0; i < oCache.iCells; i++) { + iWidth += $('thead tr th:eq(' + i + ')', s.nTable).outerWidth(); + } + nTable.style.width = iWidth+"px"; + oCache.nWrapper.style.width = iWidth+"px"; + }, + + /* + * Function: _fnCloneTRight + * Purpose: Clone the right most column(s) + * Returns: - + * Inputs: object:oCache - the cached values for this fixed element + */ + _fnCloneTRight: function ( oCache ) + { + var s = this.fnGetSettings(); + var nBody = $('tbody', s.nTable)[0]; + var nTable = oCache.nNode; + var iCols = $('tbody tr:eq(0) td', s.nTable).length; + + /* Remove any children the cloned table has */ + while ( nTable.childNodes.length > 0 ) + { + nTable.removeChild( nTable.childNodes[0] ); + } + + /* Is this the most efficient way to do this - it looks horrible... */ + nTable.appendChild( $("thead", s.nTable).clone(true)[0] ); + nTable.appendChild( $("tbody", s.nTable).clone(true)[0] ); + if ( s.bFooter ) + { + nTable.appendChild( $("tfoot", s.nTable).clone(true)[0] ); + } + $('thead tr th:lt('+(iCols-oCache.iCells)+')', nTable).remove(); + $('tfoot tr th:lt('+(iCols-oCache.iCells)+')', nTable).remove(); + + /* Remove unneeded cells */ + $('tbody tr', nTable).each( function (k) { + $('td:lt('+(iCols-oCache.iCells)+')', this).remove(); + } ); + + this.fnEqualiseHeights( 'thead', nBody.parentNode, nTable ); + this.fnEqualiseHeights( 'tbody', nBody.parentNode, nTable ); + this.fnEqualiseHeights( 'tfoot', nBody.parentNode, nTable ); + + var iWidth = 0; + for (var i = 0; i < oCache.iCells; i++) { + iWidth += $('thead tr th:eq('+(iCols-1-i)+')', s.nTable).outerWidth(); + } + nTable.style.width = iWidth+"px"; + oCache.nWrapper.style.width = iWidth+"px"; + }, + + + /** + * Equalise the heights of the rows in a given table node in a cross browser way. Note that this + * is more or less lifted as is from FixedColumns + * @method fnEqualiseHeights + * @returns void + * @param {string} parent Node type - thead, tbody or tfoot + * @param {element} original Original node to take the heights from + * @param {element} clone Copy the heights to + * @private + */ + "fnEqualiseHeights": function ( parent, original, clone ) + { + var that = this; + var originals = $(parent +' tr', original); + var height; + + $(parent+' tr', clone).each( function (k) { + height = originals.eq( k ).css('height'); + + // This is nasty :-(. IE has a sub-pixel error even when setting + // the height below (the Firefox fix) which causes the fixed column + // to go out of alignment. Need to add a pixel before the assignment + // Can this be feature detected? Not sure how... + if ( navigator.appName == 'Microsoft Internet Explorer' ) { + height = parseInt( height, 10 ) + 1; + } + + $(this).css( 'height', height ); + + // For Firefox to work, we need to also set the height of the + // original row, to the value that we read from it! Otherwise there + // is a sub-pixel rounding error + originals.eq( k ).css( 'height', height ); + } ); + } +}; + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Static properties and methods + * We use these for speed! This information is common to all instances of FixedHeader, so no + * point if having them calculated and stored for each different instance. + */ + +/* + * Variable: oWin + * Purpose: Store information about the window positioning + * Scope: FixedHeader + */ +FixedHeader.oWin = { + "iScrollTop": 0, + "iScrollRight": 0, + "iScrollBottom": 0, + "iScrollLeft": 0, + "iHeight": 0, + "iWidth": 0 +}; + +/* + * Variable: oDoc + * Purpose: Store information about the document size + * Scope: FixedHeader + */ +FixedHeader.oDoc = { + "iHeight": 0, + "iWidth": 0 +}; + +/* + * Variable: afnScroll + * Purpose: Array of functions that are to be used for the scrolling components + * Scope: FixedHeader + */ +FixedHeader.afnScroll = []; + +/* + * Function: fnMeasure + * Purpose: Update the measurements for the window and document + * Returns: - + * Inputs: - + */ +FixedHeader.fnMeasure = function () +{ + var + jqWin = $(window), + jqDoc = $(document), + oWin = FixedHeader.oWin, + oDoc = FixedHeader.oDoc; + + oDoc.iHeight = jqDoc.height(); + oDoc.iWidth = jqDoc.width(); + + oWin.iHeight = jqWin.height(); + oWin.iWidth = jqWin.width(); + oWin.iScrollTop = jqWin.scrollTop(); + oWin.iScrollLeft = jqWin.scrollLeft(); + oWin.iScrollRight = oDoc.iWidth - oWin.iScrollLeft - oWin.iWidth; + oWin.iScrollBottom = oDoc.iHeight - oWin.iScrollTop - oWin.iHeight; +}; + + +FixedHeader.version = "2.1.2"; + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Global processing + */ + +/* + * Just one 'scroll' event handler in FixedHeader, which calls the required components. This is + * done as an optimisation, to reduce calculation and proagation time + */ +$(window).scroll( function () { + FixedHeader.fnMeasure(); + + for ( var i=0, iLen=FixedHeader.afnScroll.length ; itfoot",c.nTable).length?!0:!1,c.oSides.top&&c.aoCache.push(d._fnCloneTable("fixedHeader","FixedHeader_Header",d._fnCloneThead)),c.oSides.bottom&&c.aoCache.push(d._fnCloneTable("fixedFooter","FixedHeader_Footer",d._fnCloneTfoot)),c.oSides.left&&c.aoCache.push(d._fnCloneTable("fixedLeft","FixedHeader_Left",d._fnCloneTLeft,c.oSides.left)), +c.oSides.right&&c.aoCache.push(d._fnCloneTable("fixedRight","FixedHeader_Right",d._fnCloneTRight,c.oSides.right)),FixedHeader.afnScroll.push(function(){d._fnUpdatePositions.call(d)}),e(j).resize(function(){FixedHeader.fnMeasure();d._fnUpdateClones.call(d);d._fnUpdatePositions.call(d)}),e(c.nTable).on("column-reorder.dt",function(){FixedHeader.fnMeasure();d._fnUpdateClones(!0);d._fnUpdatePositions()}).on("column-visibility.dt",function(){FixedHeader.fnMeasure();d._fnUpdateClones(!0);d._fnUpdatePositions()}), +FixedHeader.fnMeasure(),d._fnUpdateClones(),d._fnUpdatePositions(),c.bInitComplete=!0)},fnInitSettings:function(a,b){if(b!==h&&(b.top!==h&&(a.oSides.top=b.top),b.bottom!==h&&(a.oSides.bottom=b.bottom),"boolean"==typeof b.left?a.oSides.left=b.left?1:0:b.left!==h&&(a.oSides.left=b.left),"boolean"==typeof b.right?a.oSides.right=b.right?1:0:b.right!==h&&(a.oSides.right=b.right),b.zTop!==h&&(a.oZIndexes.top=b.zTop),b.zBottom!==h&&(a.oZIndexes.bottom=b.zBottom),b.zLeft!==h&&(a.oZIndexes.left=b.zLeft),b.zRight!== +h&&(a.oZIndexes.right=b.zRight),b.offsetTop!==h&&(a.oOffset.top=b.offsetTop),b.alwaysCloneTop!==h&&(a.oCloneOnDraw.top=b.alwaysCloneTop),b.alwaysCloneBottom!==h&&(a.oCloneOnDraw.bottom=b.alwaysCloneBottom),b.alwaysCloneLeft!==h&&(a.oCloneOnDraw.left=b.alwaysCloneLeft),b.alwaysCloneRight!==h))a.oCloneOnDraw.right=b.alwaysCloneRight},_fnCloneTable:function(a,b,c,d){var f=this.fnGetSettings(),g;"absolute"!=e(f.nTable.parentNode).css("position")&&(f.nTable.parentNode.style.position="relative");g=f.nTable.cloneNode(!1); +g.removeAttribute("id");var i=k.createElement("div");i.style.position="absolute";i.style.top="0px";i.style.left="0px";i.className+=" FixedHeader_Cloned "+a+" "+b;"fixedHeader"==a&&(i.style.zIndex=f.oZIndexes.top);"fixedFooter"==a&&(i.style.zIndex=f.oZIndexes.bottom);"fixedLeft"==a?i.style.zIndex=f.oZIndexes.left:"fixedRight"==a&&(i.style.zIndex=f.oZIndexes.right);g.style.margin="0";i.appendChild(g);k.body.appendChild(i);return{nNode:g,nWrapper:i,sType:a,sPosition:"",sTop:"",sLeft:"",fnClone:c,iCells:d}}, +_fnMeasure:function(){var a=this.fnGetSettings(),b=a.oMes,c=e(a.nTable),d=c.offset(),f=this._fnSumScroll(a.nTable.parentNode,"scrollTop");this._fnSumScroll(a.nTable.parentNode,"scrollLeft");b.iTableWidth=c.outerWidth();b.iTableHeight=c.outerHeight();b.iTableLeft=d.left+a.nTable.parentNode.scrollLeft;b.iTableTop=d.top+f;b.iTableRight=b.iTableLeft+b.iTableWidth;b.iTableRight=FixedHeader.oDoc.iWidth-b.iTableLeft-b.iTableWidth;b.iTableBottom=FixedHeader.oDoc.iHeight-b.iTableTop-b.iTableHeight},_fnSumScroll:function(a, +b){for(var c=a[b];(a=a.parentNode)&&!("HTML"==a.nodeName||"BODY"==a.nodeName);)c=a[b];return c},_fnUpdatePositions:function(){var a=this.fnGetSettings();this._fnMeasure();for(var b=0,c=a.aoCache.length;bd.iScrollTop+b.oOffset.top?(this._fnUpdateCache(a,"sPosition","absolute","position",e.style),this._fnUpdateCache(a,"sTop",c.iTableTop+"px","top",e.style),this._fnUpdateCache(a,"sLeft",c.iTableLeft+"px","left",e.style)):d.iScrollTop+b.oOffset.top>c.iTableTop+ +g?(this._fnUpdateCache(a,"sPosition","absolute","position",e.style),this._fnUpdateCache(a,"sTop",c.iTableTop+g+"px","top",e.style),this._fnUpdateCache(a,"sLeft",c.iTableLeft+"px","left",e.style)):(this._fnUpdateCache(a,"sPosition","fixed","position",e.style),this._fnUpdateCache(a,"sTop",b.oOffset.top+"px","top",e.style),this._fnUpdateCache(a,"sLeft",c.iTableLeft-d.iScrollLeft+"px","left",e.style))},_fnUpdateCache:function(a,b,c,d,e){a[b]!=c&&(e[d]=c,a[b]=c)},_fnClassUpdate:function(a,b){var c=this; +if("TR"===a.nodeName.toUpperCase()||"TH"===a.nodeName.toUpperCase()||"TD"===a.nodeName.toUpperCase()||"SPAN"===a.nodeName.toUpperCase())b.className=a.className;e(a).children().each(function(d){c._fnClassUpdate(e(a).children()[d],e(b).children()[d])})},_fnCloneThead:function(a){var b=this.fnGetSettings(),c=a.nNode;if(b.bInitComplete&&!b.oCloneOnDraw.top)this._fnClassUpdate(e("thead",b.nTable)[0],e("thead",c)[0]);else{var d=e(b.nTable).outerWidth();a.nWrapper.style.width=d+"px";for(c.style.width=d+ +"px";0tr th",b.nTable).each(function(){f.push(e(this).width())});e("thead>tr td",b.nTable).each(function(){g.push(e(this).width())});e("thead>tr th",b.nTable).each(function(a){e("thead>tr th:eq("+a+")",c).width(f[a]);e(this).width(f[a])});e("thead>tr td",b.nTable).each(function(a){e("thead>tr td:eq("+a+")",c).width(g[a]);e(this).width(g[a])}); +e("th.sorting, th.sorting_desc, th.sorting_asc",c).bind("click",function(){this.blur()})}},_fnCloneTfoot:function(a){var b=this.fnGetSettings(),c=a.nNode;for(a.nWrapper.style.width=e(b.nTable).outerWidth()+"px";0tr th",b.nTable).each(function(a){e("tfoot:eq(0)>tr th:eq("+a+")",c).width(e(this).width())});e("tfoot:eq(0)>tr td",b.nTable).each(function(a){e("tfoot:eq(0)>tr td:eq("+ +a+")",c).width(e(this).width())})},_fnCloneTLeft:function(a){for(var b=this.fnGetSettings(),c=a.nNode,d=e("tbody",b.nTable)[0];0<'large-6 columns'f>r>"+ + "t"+ + "<'row'<'large-6 columns'i><'large-6 columns'p>>", + "sPaginationType": "bootstrap", + "oLanguage": { + "sLengthMenu": "_MENU_ records per page" + } +} ); + + +/* API method to get paging information */ +$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings ) +{ + return { + "iStart": oSettings._iDisplayStart, + "iEnd": oSettings.fnDisplayEnd(), + "iLength": oSettings._iDisplayLength, + "iTotal": oSettings.fnRecordsTotal(), + "iFilteredTotal": oSettings.fnRecordsDisplay(), + "iPage": oSettings._iDisplayLength === -1 ? + 0 : Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ), + "iTotalPages": oSettings._iDisplayLength === -1 ? + 0 : Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength ) + }; +}; + + +/* Bootstrap style pagination control */ +$.extend( $.fn.dataTableExt.oPagination, { + "bootstrap": { + "fnInit": function( oSettings, nPaging, fnDraw ) { + var oLang = oSettings.oLanguage.oPaginate; + var fnClickHandler = function ( e ) { + e.preventDefault(); + if ( oSettings.oApi._fnPageChange(oSettings, e.data.action) ) { + fnDraw( oSettings ); + } + }; + + $(nPaging).append( + '
    '+ + ''+ + ''+ + '
' + ); + var els = $('a', nPaging); + $(els[0]).bind( 'click.DT', { action: "previous" }, fnClickHandler ); + $(els[1]).bind( 'click.DT', { action: "next" }, fnClickHandler ); + }, + + "fnUpdate": function ( oSettings, fnDraw ) { + var iListLength = 5; + var oPaging = oSettings.oInstance.fnPagingInfo(); + var an = oSettings.aanFeatures.p; + var pages = []; + var i, ien, klass, host; + + // This could use some improving - however, see + // https://github.com/DataTables/DataTables/issues/163 - this will + // be changing in the near future, so not much point in doing too + // much just now + if ( oPaging.iTotalPages <= 6 ) { + for ( i=0 ; i= oPaging.iTotalPages ? + oPaging.iTotalPages : + oPaging.iPage + 2; + for ( i=oPaging.iPage+1 ; i 0 ? + oPaging.iPage - 2 : + 0; + for ( i=oPaging.iPage-1 ; i>pagesBefore ; i-- ) { + pages.unshift( i ); + } + + // Before gap + if ( pagesBefore > 1 ) { + pages.unshift( null ); + } + + // Start + if ( $.inArray( 1, pages ) === -1 && oPaging.iTotalPages > 1 ) { + pages.unshift( 1 ); + } + if ( $.inArray( 0, pages ) === -1 ) { + pages.unshift( 0 ); + } + } + + for ( i=0, ien=an.length ; i'+(page===null? '…' : page+1)+'') + .insertBefore( $('li:last', host) ) + .bind('click', function (e) { + e.preventDefault(); + oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength; + fnDraw( oSettings ); + } ); + } ); + + // Add / remove disabled classes from the static elements + if ( oPaging.iPage === 0 ) { + $('li:first', host).addClass('unavailable'); + } else { + $('li:first', host).removeClass('unavailable'); + } + + if ( oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0 ) { + $('li:last', host).addClass('unavailable'); + } else { + $('li:last', host).removeClass('unavailable'); + } + } + } + } +} ); + + +/* + * TableTools Foundation compatibility + * Required TableTools 2.1+ + */ +if ( $.fn.DataTable.TableTools ) { + // Set the classes that TableTools uses to something suitable for Foundation + $.extend( true, $.fn.DataTable.TableTools.classes, { + "container": "DTTT button-group", + "buttons": { + "normal": "button", + "disabled": "disabled" + }, + "collection": { + "container": "DTTT_dropdown dropdown-menu", + "buttons": { + "normal": "", + "disabled": "disabled" + } + }, + "select": { + "row": "active" + } + } ); + + // Have the collection use a bootstrap compatible dropdown + $.extend( true, $.fn.DataTable.TableTools.DEFAULTS.oTags, { + "collection": { + "container": "ul", + "button": "li", + "liner": "a" + } + } ); +} + diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/DataTables-1.10.4/dataTables.jqueryui.js b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/DataTables-1.10.4/dataTables.jqueryui.js new file mode 100644 index 00000000..3575e822 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/DataTables-1.10.4/dataTables.jqueryui.js @@ -0,0 +1,102 @@ + +(function(){ + +var DataTable = $.fn.dataTable; +var sort_prefix = 'css_right ui-icon ui-icon-'; +var toolbar_prefix = 'fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-'; + +/* Set the defaults for DataTables initialisation */ +$.extend( true, DataTable.defaults, { + dom: + '<"'+toolbar_prefix+'tl ui-corner-tr"lfr>'+ + 't'+ + '<"'+toolbar_prefix+'bl ui-corner-br"ip>', + renderer: 'jqueryui' +} ); + + +$.extend( DataTable.ext.classes, { + /* Full numbers paging buttons */ + "sPageButton": "fg-button ui-button ui-state-default", + "sPageButtonActive": "ui-state-disabled", + "sPageButtonDisabled": "ui-state-disabled", + + /* Features */ + "sPaging": "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi "+ + "ui-buttonset-multi paging_", /* Note that the type is postfixed */ + + /* Sorting */ + "sSortAsc": "ui-state-default sorting_asc", + "sSortDesc": "ui-state-default sorting_desc", + "sSortable": "ui-state-default sorting", + "sSortableAsc": "ui-state-default sorting_asc_disabled", + "sSortableDesc": "ui-state-default sorting_desc_disabled", + "sSortableNone": "ui-state-default sorting_disabled", + "sSortIcon": "DataTables_sort_icon", + + /* Scrolling */ + "sScrollHead": "dataTables_scrollHead "+"ui-state-default", + "sScrollFoot": "dataTables_scrollFoot "+"ui-state-default", + + /* Misc */ + "sHeaderTH": "ui-state-default", + "sFooterTH": "ui-state-default", +} ); + + +DataTable.ext.renderer.header.jqueryui = function ( settings, cell, column, idx, classes ) { + $('
') + .addClass( 'DataTables_sort_wrapper' ) + .append( cell.contents() ) + .append( $('') + .addClass( classes.sSortIcon+' '+column.sSortingClassJUI ) + ) + .appendTo( cell ); + + // Attach a sort listener to update on sort + $(settings.nTable).on( 'order.dt', function ( e, settings, sorting, columns ) { + cell + .removeClass( classes.sSortAsc +" "+classes.sSortDesc ) + .addClass( columns[ idx ] == 'asc' ? + classes.sSortAsc : columns[ idx ] == 'desc' ? + classes.sSortDesc : + column.sSortingClass + ); + + cell + .find( 'span' ) + .removeClass( + sort_prefix+'triangle-1-n' +" "+ + sort_prefix+'triangle-1-s' +" "+ + sort_prefix+'carat-2-n-s' +" "+ + sort_prefix+'carat-1-n' +" "+ + sort_prefix+'carat-1-s' + ) + .addClass( columns[ idx ] == 'asc' ? + sort_prefix+'triangle-1-n' : columns[ idx ] == 'desc' ? + sort_prefix+'triangle-1-s' : + column.sSortingClassJUI + ); + } ); +} + + +/* + * TableTools jQuery UI compatibility + * Required TableTools 2.1+ + */ +if ( DataTable.TableTools ) { + $.extend( true, DataTable.TableTools.classes, { + "container": "DTTT_container ui-buttonset ui-buttonset-multi", + "buttons": { + "normal": "DTTT_button ui-button ui-state-default" + }, + "collection": { + "container": "DTTT_collection ui-buttonset ui-buttonset-multi" + } + } ); +} + + +}()); + diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/DataTables-1.10.4/dataTables.keyTable.js b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/DataTables-1.10.4/dataTables.keyTable.js new file mode 100644 index 00000000..f303f766 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/DataTables-1.10.4/dataTables.keyTable.js @@ -0,0 +1,1175 @@ +/*! KeyTable 1.2.1 + * ©2010-2014 SpryMedia Ltd - datatables.net/license + */ + +/** + * @summary KeyTable + * @description Spreadsheet like keyboard navigation for DataTables + * @version 1.2.1 + * @file dataTables.keyTable.js + * @author SpryMedia Ltd (www.sprymedia.co.uk) + * @contact www.sprymedia.co.uk/contact + * @copyright Copyright 2009-2014 SpryMedia Ltd. + * + * This source file is free software, available under the following license: + * MIT license - http://datatables.net/license/mit + * + * This source file is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. + * + * For details please refer to: http://www.datatables.net + */ + +// Global scope for KeyTable for backwards compatibility. Will be removed in 1.3 +var KeyTable; + + +(function(window, document, undefined) { + + +var factory = function( $, DataTable ) { +"use strict"; + +KeyTable = function ( oInit ) +{ + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * API parameters + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /* + * Variable: block + * Purpose: Flag whether or not KeyTable events should be processed + * Scope: KeyTable - public + */ + this.block = false; + + /* + * Variable: event + * Purpose: Container for all event application methods + * Scope: KeyTable - public + * Notes: This object contains all the public methods for adding and removing events - these + * are dynamically added later on + */ + this.event = { + "remove": {} + }; + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * API methods + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /* + * Function: fnGetCurrentPosition + * Purpose: Get the currently focused cell's position + * Returns: array int: [ x, y ] + * Inputs: void + */ + this.fnGetCurrentPosition = function () + { + return [ _iOldX, _iOldY ]; + }; + + + /* + * Function: fnGetCurrentData + * Purpose: Get the currently focused cell's data (innerHTML) + * Returns: string: - data requested + * Inputs: void + */ + this.fnGetCurrentData = function () + { + return _nOldFocus.innerHTML; + }; + + + /* + * Function: fnGetCurrentTD + * Purpose: Get the currently focused cell + * Returns: node: - focused element + * Inputs: void + */ + this.fnGetCurrentTD = function () + { + return _nOldFocus; + }; + + + /* + * Function: fnSetPosition + * Purpose: Set the position of the focused cell + * Returns: - + * Inputs: int:x - x coordinate + * int:y - y coordinate + * Notes: Thanks to Rohan Daxini for the basis of this function + */ + this.fnSetPosition = function( x, y ) + { + if ( typeof x == 'object' && x.nodeName ) + { + _fnSetFocus( x ); + } + else + { + _fnSetFocus( _fnCellFromCoords(x, y) ); + } + }; + + + /* + * Function: fnBlur + * Purpose: Blur the current focus + * Returns: - + * Inputs: - + */ + this.fnBlur = function() + { + _fnBlur(); + }; + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Private parameters + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /* + * Variable: _nBody + * Purpose: Body node of the table - cached for renference + * Scope: KeyTable - private + */ + var _nBody = null; + + /* + * Variable: + * Purpose: + * Scope: KeyTable - private + */ + var _nOldFocus = null; + + /* + * Variable: _iOldX and _iOldY + * Purpose: X and Y coords of the old elemet that was focused on + * Scope: KeyTable - private + */ + var _iOldX = null; + var _iOldY = null; + + /* + * Variable: _that + * Purpose: Scope saving for 'this' after a jQuery event + * Scope: KeyTable - private + */ + var _that = null; + + /* + * Variable: sFocusClass + * Purpose: Class that should be used for focusing on a cell + * Scope: KeyTable - private + */ + var _sFocusClass = "focus"; + + /* + * Variable: _bKeyCapture + * Purpose: Flag for should KeyTable capture key events or not + * Scope: KeyTable - private + */ + var _bKeyCapture = false; + + /* + * Variable: _oaoEvents + * Purpose: Event cache object, one array for each supported event for speed of searching + * Scope: KeyTable - private + */ + var _oaoEvents = { + "action": [], + "esc": [], + "focus": [], + "blur": [] + }; + + /* + * Variable: _oDatatable + * Purpose: DataTables settings object for if we are actually using a + * DataTables table + * Scope: KeyTable - private + */ + var _oDatatable = null; + + var _bForm; + var _nInput; + var _bInputFocused = false; + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Private methods + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Key table events + */ + + /* + * Function: _fnEventAddTemplate + * Purpose: Create a function (with closure for sKey) event addition API + * Returns: function: - template function + * Inputs: string:sKey - type of event to detect + */ + function _fnEventAddTemplate( sKey ) + { + /* + * Function: - + * Purpose: API function for adding event to cache + * Returns: - + * Inputs: 1. node:x - target node to add event for + * 2. function:y - callback function to apply + * or + * 1. int:x - x coord. of target cell (can be null for live events) + * 2. int:y - y coord. of target cell (can be null for live events) + * 3. function:z - callback function to apply + * Notes: This function is (interally) overloaded (in as much as javascript allows for + * that) - the target cell can be given by either node or coords. + */ + return function ( x, y, z ) { + if ( (x===null || typeof x == "number") && + (y===null || typeof y == "number") && + typeof z == "function" ) + { + _fnEventAdd( sKey, x, y, z ); + } + else if ( typeof x == "object" && typeof y == "function" ) + { + var aCoords = _fnCoordsFromCell( x ); + _fnEventAdd( sKey, aCoords[0], aCoords[1], y ); + } + else + { + alert( "Unhandable event type was added: x" +x+ " y:" +y+ " z:" +z ); + } + }; + } + + + /* + * Function: _fnEventRemoveTemplate + * Purpose: Create a function (with closure for sKey) event removal API + * Returns: function: - template function + * Inputs: string:sKey - type of event to detect + */ + function _fnEventRemoveTemplate( sKey ) + { + /* + * Function: - + * Purpose: API function for removing event from cache + * Returns: int: - number of events removed + * Inputs: 1. node:x - target node to remove event from + * 2. function:y - callback function to apply + * or + * 1. int:x - x coord. of target cell (can be null for live events) + * 2. int:y - y coord. of target cell (can be null for live events) + * 3. function:z - callback function to remove - optional + * Notes: This function is (interally) overloaded (in as much as javascript allows for + * that) - the target cell can be given by either node or coords and the function + * to remove is optional + */ + return function ( x, y, z ) { + if ( (x===null || typeof arguments[0] == "number") && + (y===null || typeof arguments[1] == "number" ) ) + { + if ( typeof arguments[2] == "function" ) + { + _fnEventRemove( sKey, x, y, z ); + } + else + { + _fnEventRemove( sKey, x, y ); + } + } + else if ( typeof arguments[0] == "object" ) + { + var aCoords = _fnCoordsFromCell( x ); + if ( typeof arguments[1] == "function" ) + { + _fnEventRemove( sKey, aCoords[0], aCoords[1], y ); + } + else + { + _fnEventRemove( sKey, aCoords[0], aCoords[1] ); + } + } + else + { + alert( "Unhandable event type was removed: x" +x+ " y:" +y+ " z:" +z ); + } + }; + } + + /* Use the template functions to add the event API functions */ + for ( var sKey in _oaoEvents ) + { + if ( sKey ) + { + this.event[sKey] = _fnEventAddTemplate( sKey ); + this.event.remove[sKey] = _fnEventRemoveTemplate( sKey ); + } + } + + + /* + * Function: _fnEventAdd + * Purpose: Add an event to the internal cache + * Returns: - + * Inputs: string:sType - type of event to add, given by the available elements in _oaoEvents + * int:x - x-coords to add event to - can be null for "blanket" event + * int:y - y-coords to add event to - can be null for "blanket" event + * function:fn - callback function for when triggered + */ + function _fnEventAdd( sType, x, y, fn ) + { + _oaoEvents[sType].push( { + "x": x, + "y": y, + "fn": fn + } ); + } + + + /* + * Function: _fnEventRemove + * Purpose: Remove an event from the event cache + * Returns: int: - number of matching events removed + * Inputs: string:sType - type of event to look for + * node:nTarget - target table cell + * function:fn - optional - remove this function. If not given all handlers of this + * type will be removed + */ + function _fnEventRemove( sType, x, y, fn ) + { + var iCorrector = 0; + + for ( var i=0, iLen=_oaoEvents[sType].length ; i= oSettings.fnDisplayEnd() ) + { + if ( oSettings._iDisplayLength >= 0 ) + { + /* Make sure we are not over running the display array */ + if ( oSettings._iDisplayStart + oSettings._iDisplayLength < oSettings.fnRecordsDisplay() ) + { + oSettings._iDisplayStart += oSettings._iDisplayLength; + } + } + else + { + oSettings._iDisplayStart = 0; + } + _oDatatable.oApi._fnCalculateEnd( oSettings ); + } + + /* Page backwards */ + while ( iRow < oSettings._iDisplayStart ) + { + oSettings._iDisplayStart = oSettings._iDisplayLength>=0 ? + oSettings._iDisplayStart - oSettings._iDisplayLength : + 0; + + if ( oSettings._iDisplayStart < 0 ) + { + oSettings._iDisplayStart = 0; + } + _oDatatable.oApi._fnCalculateEnd( oSettings ); + } + + /* Re-draw the table */ + _oDatatable.oApi._fnDraw( oSettings ); + + /* Restore the key capture */ + _bKeyCapture = bKeyCaptureCache; + } + + /* Cache the information that we are interested in */ + var aNewPos = _fnCoordsFromCell( nTarget ); + _nOldFocus = nTarget; + _iOldX = aNewPos[0]; + _iOldY = aNewPos[1]; + + var iViewportHeight, iViewportWidth, iScrollTop, iScrollLeft, iHeight, iWidth, aiPos; + if ( bAutoScroll ) + { + /* Scroll the viewport such that the new cell is fully visible in the rendered window */ + iViewportHeight = $(window).height(); + iViewportWidth = $(window).width(); + iScrollTop = $(document).scrollTop(); + iScrollLeft = $(document).scrollLeft(); + iHeight = nTarget.offsetHeight; + iWidth = nTarget.offsetWidth; + aiPos = _fnGetPos( nTarget ); + + /* Take account of scrolling in DataTables 1.7 - remove scrolling since that would add to + * the positioning calculation + */ + if ( _oDatatable && typeof oSettings.oScroll != 'undefined' && + (oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "") ) + { + aiPos[1] -= $(oSettings.nTable.parentNode).scrollTop(); + aiPos[0] -= $(oSettings.nTable.parentNode).scrollLeft(); + } + + /* Correct viewport positioning for vertical scrolling */ + if ( aiPos[1]+iHeight > iScrollTop+iViewportHeight ) + { + /* Displayed element if off the bottom of the viewport */ + _fnSetScrollTop( aiPos[1]+iHeight - iViewportHeight ); + } + else if ( aiPos[1] < iScrollTop ) + { + /* Displayed element if off the top of the viewport */ + _fnSetScrollTop( aiPos[1] ); + } + + /* Correct viewport positioning for horizontal scrolling */ + if ( aiPos[0]+iWidth > iScrollLeft+iViewportWidth ) + { + /* Displayed element is off the bottom of the viewport */ + _fnSetScrollLeft( aiPos[0]+iWidth - iViewportWidth ); + } + else if ( aiPos[0] < iScrollLeft ) + { + /* Displayed element if off the Left of the viewport */ + _fnSetScrollLeft( aiPos[0] ); + } + } + + /* Take account of scrolling in DataTables 1.7 */ + if ( _oDatatable && typeof oSettings.oScroll != 'undefined' && + (oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "") ) + { + var dtScrollBody = oSettings.nTable.parentNode; + iViewportHeight = dtScrollBody.clientHeight; + iViewportWidth = dtScrollBody.clientWidth; + iScrollTop = dtScrollBody.scrollTop; + iScrollLeft = dtScrollBody.scrollLeft; + iHeight = nTarget.offsetHeight; + iWidth = nTarget.offsetWidth; + + /* Correct for vertical scrolling */ + if ( nTarget.offsetTop + iHeight > iViewportHeight+iScrollTop ) + { + dtScrollBody.scrollTop = (nTarget.offsetTop + iHeight) - iViewportHeight; + } + else if ( nTarget.offsetTop < iScrollTop ) + { + dtScrollBody.scrollTop = nTarget.offsetTop; + } + + /* Correct for horizontal scrolling */ + if ( nTarget.offsetLeft + iWidth > iViewportWidth+iScrollLeft ) + { + dtScrollBody.scrollLeft = (nTarget.offsetLeft + iWidth) - iViewportWidth; + } + else if ( nTarget.offsetLeft < iScrollLeft ) + { + dtScrollBody.scrollLeft = nTarget.offsetLeft; + } + } + + /* Focused - so we want to capture the keys */ + _fnCaptureKeys(); + + /* Fire of the focus event if there is one */ + _fnEventFire( "focus", _iOldX, _iOldY ); + } + + + /* + * Function: _fnBlur + * Purpose: Blur focus from the whole table + * Returns: - + * Inputs: - + */ + function _fnBlur() + { + _fnRemoveFocus( _nOldFocus ); + _iOldX = null; + _iOldY = null; + _nOldFocus = null; + _fnReleaseKeys(); + } + + + /* + * Function: _fnRemoveFocus + * Purpose: Remove focus from a cell and fire any blur events which are attached + * Returns: - + * Inputs: node:nTarget - cell of interest + */ + function _fnRemoveFocus( nTarget ) + { + $(nTarget).removeClass( _sFocusClass ); + $(nTarget).parent().removeClass( _sFocusClass ); + _fnEventFire( "blur", _iOldX, _iOldY ); + } + + + /* + * Function: _fnClick + * Purpose: Focus on the element that has been clicked on by the user + * Returns: - + * Inputs: event:e - click event + */ + function _fnClick ( e ) + { + var nTarget = this; + while ( nTarget.nodeName != "TD" ) + { + nTarget = nTarget.parentNode; + } + + _fnSetFocus( nTarget ); + _fnCaptureKeys(); + } + + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Key events + */ + + /* + * Function: _fnKey + * Purpose: Deal with a key events, be it moving the focus or return etc. + * Returns: bool: - allow browser default action + * Inputs: event:e - key event + */ + function _fnKey ( e ) + { + /* If user or system has blocked KeyTable from doing anything, just ignore this event */ + if ( _that.block || !_bKeyCapture ) + { + return true; + } + + /* If a modifier key is pressed (exapct shift), ignore the event */ + if ( e.metaKey || e.altKey || e.ctrlKey ) + { + return true; + } + var + x, y, + iTableWidth = _nBody.getElementsByTagName('tr')[0].getElementsByTagName('td').length, + iTableHeight; + + /* Get table height and width - done here so as to be dynamic (if table is updated) */ + if ( _oDatatable ) + { + /* + * Locate the current node in the DataTable overriding the old positions - the reason for + * is is that there might have been some DataTables interaction between the last focus and + * now + */ + iTableHeight = _oDatatable.aiDisplay.length; + + var aDtPos = _fnFindDtCell( _nOldFocus ); + if ( aDtPos === null ) + { + /* If the table has been updated such that the focused cell can't be seen - do nothing */ + return; + } + _iOldX = aDtPos[ 0 ]; + _iOldY = aDtPos[ 1 ]; + } + else + { + iTableHeight = _nBody.getElementsByTagName('tr').length; + } + + /* Capture shift+tab to match the left arrow key */ + var iKey = (e.keyCode == 9 && e.shiftKey) ? -1 : e.keyCode; + + switch( iKey ) + { + case 13: /* return */ + e.preventDefault(); + e.stopPropagation(); + _fnEventFire( "action", _iOldX, _iOldY ); + return true; + + case 27: /* esc */ + if ( !_fnEventFire( "esc", _iOldX, _iOldY ) ) + { + /* Only lose focus if there isn't an escape handler on the cell */ + _fnBlur(); + return; + } + x = _iOldX; + y = _iOldY; + break; + + case -1: + case 37: /* left arrow */ + if ( _iOldX > 0 ) { + x = _iOldX - 1; + y = _iOldY; + } else if ( _iOldY > 0 ) { + x = iTableWidth-1; + y = _iOldY - 1; + } else { + /* at start of table */ + if ( iKey == -1 && _bForm ) + { + /* If we are in a form, return focus to the 'input' element such that tabbing will + * follow correctly in the browser + */ + _bInputFocused = true; + _nInput.focus(); + + /* This timeout is a little nasty - but IE appears to have some asyhnc behaviour for + * focus + */ + setTimeout( function(){ _bInputFocused = false; }, 0 ); + _bKeyCapture = false; + _fnBlur(); + return true; + } + else + { + return false; + } + } + break; + + case 38: /* up arrow */ + if ( _iOldY > 0 ) { + x = _iOldX; + y = _iOldY - 1; + } else { + return false; + } + break; + + case 36: /* home */ + x = _iOldX; + y = 0; + break; + + case 33: /* page up */ + x = _iOldX; + y = _iOldY - 10; + if (y < 0) { + y = 0; + } + break; + + case 9: /* tab */ + case 39: /* right arrow */ + if ( _iOldX < iTableWidth-1 ) { + x = _iOldX + 1; + y = _iOldY; + } else if ( _iOldY < iTableHeight-1 ) { + x = 0; + y = _iOldY + 1; + } else { + /* at end of table */ + if ( iKey == 9 && _bForm ) + { + /* If we are in a form, return focus to the 'input' element such that tabbing will + * follow correctly in the browser + */ + _bInputFocused = true; + _nInput.focus(); + + /* This timeout is a little nasty - but IE appears to have some asyhnc behaviour for + * focus + */ + setTimeout( function(){ _bInputFocused = false; }, 0 ); + _bKeyCapture = false; + _fnBlur(); + return true; + } + else + { + return false; + } + } + break; + + case 40: /* down arrow */ + if ( _iOldY < iTableHeight-1 ) { + x = _iOldX; + y = _iOldY + 1; + } else { + return false; + } + break; + + case 35: /* end */ + x = _iOldX; + y = iTableHeight-1; + break; + + case 34: /* page down */ + x = _iOldX; + y = _iOldY+10; + if (y > iTableHeight-1) { + y = iTableHeight-1; + } + break; + + default: /* Nothing we are interested in */ + return true; + } + + _fnSetFocus( _fnCellFromCoords(x, y) ); + return false; + } + + + /* + * Function: _fnCaptureKeys + * Purpose: Start capturing key events for this table + * Returns: - + * Inputs: - + */ + function _fnCaptureKeys( ) + { + if ( !_bKeyCapture ) + { + _bKeyCapture = true; + } + } + + + /* + * Function: _fnReleaseKeys + * Purpose: Stop capturing key events for this table + * Returns: - + * Inputs: - + */ + function _fnReleaseKeys( ) + { + _bKeyCapture = false; + } + + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Support functions + */ + + /* + * Function: _fnCellFromCoords + * Purpose: Calulate the target TD cell from x and y coordinates + * Returns: node: - TD target + * Inputs: int:x - x coordinate + * int:y - y coordinate + */ + function _fnCellFromCoords( x, y ) + { + if ( _oDatatable ) + { + if ( typeof _oDatatable.aoData[ _oDatatable.aiDisplay[ y ] ] != 'undefined' ) + { + return _oDatatable.aoData[ _oDatatable.aiDisplay[ y ] ].nTr.getElementsByTagName('td')[x]; + } + else + { + return null; + } + } + else + { + return $('tr:eq('+y+')>td:eq('+x+')', _nBody )[0]; + } + } + + + /* + * Function: _fnCoordsFromCell + * Purpose: Calculate the x and y position in a table from a TD cell + * Returns: array[2] int: [x, y] + * Inputs: node:n - TD cell of interest + * Notes: Not actually interested in this for DataTables since it might go out of date + */ + function _fnCoordsFromCell( n ) + { + if ( _oDatatable ) + { + return [ + $('td', n.parentNode).index(n), + $('tr', n.parentNode.parentNode).index(n.parentNode) + _oDatatable._iDisplayStart + ]; + } + else + { + return [ + $('td', n.parentNode).index(n), + $('tr', n.parentNode.parentNode).index(n.parentNode) + ]; + } + } + + + /* + * Function: _fnSetScrollTop + * Purpose: Set the vertical scrolling position + * Returns: - + * Inputs: int:iPos - scrolltop + * Notes: This is so nasty, but without browser detection you can't tell which you should set + * So on browsers that support both, the scroll top will be set twice. I can live with + * that :-) + */ + function _fnSetScrollTop( iPos ) + { + document.documentElement.scrollTop = iPos; + document.body.scrollTop = iPos; + } + + + /* + * Function: _fnSetScrollLeft + * Purpose: Set the horizontal scrolling position + * Returns: - + * Inputs: int:iPos - scrollleft + */ + function _fnSetScrollLeft( iPos ) + { + document.documentElement.scrollLeft = iPos; + document.body.scrollLeft = iPos; + } + + + /* + * Function: _fnGetPos + * Purpose: Get the position of an object on the rendered page + * Returns: array[2] int: [left, right] + * Inputs: node:obj - element of interest + */ + function _fnGetPos ( obj ) + { + var iLeft = 0; + var iTop = 0; + + if (obj.offsetParent) + { + iLeft = obj.offsetLeft; + iTop = obj.offsetTop; + obj = obj.offsetParent; + while (obj) + { + iLeft += obj.offsetLeft; + iTop += obj.offsetTop; + obj = obj.offsetParent; + } + } + return [iLeft,iTop]; + } + + + /* + * Function: _fnFindDtCell + * Purpose: Get the coords. of a cell from the DataTables internal information + * Returns: array[2] int: [x, y] coords. or null if not found + * Inputs: node:nTarget - the node of interest + */ + function _fnFindDtCell( nTarget ) + { + for ( var i=0, iLen=_oDatatable.aiDisplay.length ; i
'; + } + else { + // all other browsers get an EMBED tag + html += ''; + } + return html; + }, + + hide: function() { + // temporarily hide floater offscreen + if (this.div) { + this.div.style.left = '-2000px'; + } + }, + + show: function() { + // show ourselves after a call to hide() + this.reposition(); + }, + + destroy: function() { + // destroy control and floater + if (this.domElement && this.div) { + this.hide(); + this.div.innerHTML = ''; + + var body = document.getElementsByTagName('body')[0]; + try { body.removeChild( this.div ); } catch(e) {} + + this.domElement = null; + this.div = null; + } + }, + + reposition: function(elem) { + // reposition our floating div, optionally to new container + // warning: container CANNOT change size, only position + if (elem) { + this.domElement = ZeroClipboard_TableTools.$(elem); + if (!this.domElement) { + this.hide(); + } + } + + if (this.domElement && this.div) { + var box = ZeroClipboard_TableTools.getDOMObjectPosition(this.domElement); + var style = this.div.style; + style.left = '' + box.left + 'px'; + style.top = '' + box.top + 'px'; + } + }, + + clearText: function() { + // clear the text to be copy / saved + this.clipText = ''; + if (this.ready) { + this.movie.clearText(); + } + }, + + appendText: function(newText) { + // append text to that which is to be copied / saved + this.clipText += newText; + if (this.ready) { this.movie.appendText(newText) ;} + }, + + setText: function(newText) { + // set text to be copied to be copied / saved + this.clipText = newText; + if (this.ready) { this.movie.setText(newText) ;} + }, + + setCharSet: function(charSet) { + // set the character set (UTF16LE or UTF8) + this.charSet = charSet; + if (this.ready) { this.movie.setCharSet(charSet) ;} + }, + + setBomInc: function(bomInc) { + // set if the BOM should be included or not + this.incBom = bomInc; + if (this.ready) { this.movie.setBomInc(bomInc) ;} + }, + + setFileName: function(newText) { + // set the file name + this.fileName = newText; + if (this.ready) { + this.movie.setFileName(newText); + } + }, + + setAction: function(newText) { + // set action (save or copy) + this.action = newText; + if (this.ready) { + this.movie.setAction(newText); + } + }, + + addEventListener: function(eventName, func) { + // add user event listener for event + // event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel + eventName = eventName.toString().toLowerCase().replace(/^on/, ''); + if (!this.handlers[eventName]) { + this.handlers[eventName] = []; + } + this.handlers[eventName].push(func); + }, + + setHandCursor: function(enabled) { + // enable hand cursor (true), or default arrow cursor (false) + this.handCursorEnabled = enabled; + if (this.ready) { + this.movie.setHandCursor(enabled); + } + }, + + setCSSEffects: function(enabled) { + // enable or disable CSS effects on DOM container + this.cssEffects = !!enabled; + }, + + receiveEvent: function(eventName, args) { + var self; + + // receive event from flash + eventName = eventName.toString().toLowerCase().replace(/^on/, ''); + + // special behavior for certain events + switch (eventName) { + case 'load': + // movie claims it is ready, but in IE this isn't always the case... + // bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function + this.movie = document.getElementById(this.movieId); + if (!this.movie) { + self = this; + setTimeout( function() { self.receiveEvent('load', null); }, 1 ); + return; + } + + // firefox on pc needs a "kick" in order to set these in certain cases + if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) { + self = this; + setTimeout( function() { self.receiveEvent('load', null); }, 100 ); + this.ready = true; + return; + } + + this.ready = true; + this.movie.clearText(); + this.movie.appendText( this.clipText ); + this.movie.setFileName( this.fileName ); + this.movie.setAction( this.action ); + this.movie.setCharSet( this.charSet ); + this.movie.setBomInc( this.incBom ); + this.movie.setHandCursor( this.handCursorEnabled ); + break; + + case 'mouseover': + if (this.domElement && this.cssEffects) { + //this.domElement.addClass('hover'); + if (this.recoverActive) { + this.domElement.addClass('active'); + } + } + break; + + case 'mouseout': + if (this.domElement && this.cssEffects) { + this.recoverActive = false; + if (this.domElement.hasClass('active')) { + this.domElement.removeClass('active'); + this.recoverActive = true; + } + //this.domElement.removeClass('hover'); + } + break; + + case 'mousedown': + if (this.domElement && this.cssEffects) { + this.domElement.addClass('active'); + } + break; + + case 'mouseup': + if (this.domElement && this.cssEffects) { + this.domElement.removeClass('active'); + this.recoverActive = false; + } + break; + } // switch eventName + + if (this.handlers[eventName]) { + for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) { + var func = this.handlers[eventName][idx]; + + if (typeof(func) == 'function') { + // actual function reference + func(this, args); + } + else if ((typeof(func) == 'object') && (func.length == 2)) { + // PHP style object + method, i.e. [myObject, 'myMethod'] + func[0][ func[1] ](this, args); + } + else if (typeof(func) == 'string') { + // name of function + window[func](this, args); + } + } // foreach event handler defined + } // user defined handler for event + } + +}; + +// For the Flash binding to work, ZeroClipboard_TableTools must be on the global +// object list +window.ZeroClipboard_TableTools = ZeroClipboard_TableTools; +//include TableTools.js +/* TableTools + * 2009-2014 SpryMedia Ltd - datatables.net/license + */ + +/*globals TableTools,ZeroClipboard_TableTools*/ + + +(function($, window, document) { + +/** + * TableTools provides flexible buttons and other tools for a DataTables enhanced table + * @class TableTools + * @constructor + * @param {Object} oDT DataTables instance. When using DataTables 1.10 this can + * also be a jQuery collection, jQuery selector, table node, DataTables API + * instance or DataTables settings object. + * @param {Object} oOpts TableTools options + * @param {String} oOpts.sSwfPath ZeroClipboard SWF path + * @param {String} oOpts.sRowSelect Row selection options - 'none', 'single', 'multi' or 'os' + * @param {Function} oOpts.fnPreRowSelect Callback function just prior to row selection + * @param {Function} oOpts.fnRowSelected Callback function just after row selection + * @param {Function} oOpts.fnRowDeselected Callback function when row is deselected + * @param {Array} oOpts.aButtons List of buttons to be used + */ +TableTools = function( oDT, oOpts ) +{ + /* Santiy check that we are a new instance */ + if ( ! this instanceof TableTools ) + { + alert( "Warning: TableTools must be initialised with the keyword 'new'" ); + } + + // In 1.10 we can use the API to get the settings object from a number of + // sources + var dtSettings = $.fn.dataTable.Api ? + new $.fn.dataTable.Api( oDT ).settings()[0] : + oDT.fnSettings(); + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Public class variables + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * @namespace Settings object which contains customisable information for TableTools instance + */ + this.s = { + /** + * Store 'this' so the instance can be retrieved from the settings object + * @property that + * @type object + * @default this + */ + "that": this, + + /** + * DataTables settings objects + * @property dt + * @type object + * @default From the oDT init option + */ + "dt": dtSettings, + + /** + * @namespace Print specific information + */ + "print": { + /** + * DataTables draw 'start' point before the printing display was shown + * @property saveStart + * @type int + * @default -1 + */ + "saveStart": -1, + + /** + * DataTables draw 'length' point before the printing display was shown + * @property saveLength + * @type int + * @default -1 + */ + "saveLength": -1, + + /** + * Page scrolling point before the printing display was shown so it can be restored + * @property saveScroll + * @type int + * @default -1 + */ + "saveScroll": -1, + + /** + * Wrapped function to end the print display (to maintain scope) + * @property funcEnd + * @type Function + * @default function () {} + */ + "funcEnd": function () {} + }, + + /** + * A unique ID is assigned to each button in each instance + * @property buttonCounter + * @type int + * @default 0 + */ + "buttonCounter": 0, + + /** + * @namespace Select rows specific information + */ + "select": { + /** + * Select type - can be 'none', 'single' or 'multi' + * @property type + * @type string + * @default "" + */ + "type": "", + + /** + * Array of nodes which are currently selected + * @property selected + * @type array + * @default [] + */ + "selected": [], + + /** + * Function to run before the selection can take place. Will cancel the select if the + * function returns false + * @property preRowSelect + * @type Function + * @default null + */ + "preRowSelect": null, + + /** + * Function to run when a row is selected + * @property postSelected + * @type Function + * @default null + */ + "postSelected": null, + + /** + * Function to run when a row is deselected + * @property postDeselected + * @type Function + * @default null + */ + "postDeselected": null, + + /** + * Indicate if all rows are selected (needed for server-side processing) + * @property all + * @type boolean + * @default false + */ + "all": false, + + /** + * Class name to add to selected TR nodes + * @property selectedClass + * @type String + * @default "" + */ + "selectedClass": "" + }, + + /** + * Store of the user input customisation object + * @property custom + * @type object + * @default {} + */ + "custom": {}, + + /** + * SWF movie path + * @property swfPath + * @type string + * @default "" + */ + "swfPath": "", + + /** + * Default button set + * @property buttonSet + * @type array + * @default [] + */ + "buttonSet": [], + + /** + * When there is more than one TableTools instance for a DataTable, there must be a + * master which controls events (row selection etc) + * @property master + * @type boolean + * @default false + */ + "master": false, + + /** + * Tag names that are used for creating collections and buttons + * @namesapce + */ + "tags": {} + }; + + + /** + * @namespace Common and useful DOM elements for the class instance + */ + this.dom = { + /** + * DIV element that is create and all TableTools buttons (and their children) put into + * @property container + * @type node + * @default null + */ + "container": null, + + /** + * The table node to which TableTools will be applied + * @property table + * @type node + * @default null + */ + "table": null, + + /** + * @namespace Nodes used for the print display + */ + "print": { + /** + * Nodes which have been removed from the display by setting them to display none + * @property hidden + * @type array + * @default [] + */ + "hidden": [], + + /** + * The information display saying telling the user about the print display + * @property message + * @type node + * @default null + */ + "message": null + }, + + /** + * @namespace Nodes used for a collection display. This contains the currently used collection + */ + "collection": { + /** + * The div wrapper containing the buttons in the collection (i.e. the menu) + * @property collection + * @type node + * @default null + */ + "collection": null, + + /** + * Background display to provide focus and capture events + * @property background + * @type node + * @default null + */ + "background": null + } + }; + + /** + * @namespace Name space for the classes that this TableTools instance will use + * @extends TableTools.classes + */ + this.classes = $.extend( true, {}, TableTools.classes ); + if ( this.s.dt.bJUI ) + { + $.extend( true, this.classes, TableTools.classes_themeroller ); + } + + + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Public class methods + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * Retreieve the settings object from an instance + * @method fnSettings + * @returns {object} TableTools settings object + */ + this.fnSettings = function () { + return this.s; + }; + + + /* Constructor logic */ + if ( typeof oOpts == 'undefined' ) + { + oOpts = {}; + } + + + TableTools._aInstances.push( this ); + this._fnConstruct( oOpts ); + + return this; +}; + + + +TableTools.prototype = { + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Public methods + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + /** + * Retreieve the settings object from an instance + * @returns {array} List of TR nodes which are currently selected + * @param {boolean} [filtered=false] Get only selected rows which are + * available given the filtering applied to the table. By default + * this is false - i.e. all rows, regardless of filtering are + selected. + */ + "fnGetSelected": function ( filtered ) + { + var + out = [], + data = this.s.dt.aoData, + displayed = this.s.dt.aiDisplay, + i, iLen; + + if ( filtered ) + { + // Only consider filtered rows + for ( i=0, iLen=displayed.length ; i 0 ) + { + sTitle = anTitle[0].innerHTML; + } + } + + /* Strip characters which the OS will object to - checking for UTF8 support in the scripting + * engine + */ + if ( "\u00A1".toString().length < 4 ) { + return sTitle.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g, ""); + } else { + return sTitle.replace(/[^a-zA-Z0-9_\.,\-_ !\(\)]/g, ""); + } + }, + + + /** + * Calculate a unity array with the column width by proportion for a set of columns to be + * included for a button. This is particularly useful for PDF creation, where we can use the + * column widths calculated by the browser to size the columns in the PDF. + * @param {Object} oConfig Button configuration object + * @returns {Array} Unity array of column ratios + */ + "fnCalcColRatios": function ( oConfig ) + { + var + aoCols = this.s.dt.aoColumns, + aColumnsInc = this._fnColumnTargets( oConfig.mColumns ), + aColWidths = [], + iWidth = 0, iTotal = 0, i, iLen; + + for ( i=0, iLen=aColumnsInc.length ; i