ClientDependency upgrade
Fixes: 26639 (sorting users alphabetically) [TFS Changeset #65350]
This commit is contained in:
Binary file not shown.
@@ -3,6 +3,8 @@ using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using umbraco.DataLayer;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace umbraco.BusinessLogic {
|
||||
/// <summary>
|
||||
@@ -320,24 +322,20 @@ namespace umbraco.BusinessLogic {
|
||||
/// Gets all users
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static User[] getAll() {
|
||||
System.Collections.ArrayList tmpContainer = new System.Collections.ArrayList();
|
||||
public static User[] getAll() {
|
||||
|
||||
IRecordsReader dr;
|
||||
dr = SqlHelper.ExecuteReader("Select id from umbracoUser");
|
||||
|
||||
while (dr.Read()) {
|
||||
tmpContainer.Add(BusinessLogic.User.GetUser(dr.GetInt("id")));
|
||||
List<User> users = new List<User>();
|
||||
|
||||
while (dr.Read())
|
||||
{
|
||||
users.Add(User.GetUser(dr.GetInt("id")));
|
||||
}
|
||||
dr.Close();
|
||||
User[] retVal = new User[tmpContainer.Count];
|
||||
|
||||
int c = 0;
|
||||
foreach (User u in tmpContainer) {
|
||||
retVal[c] = u;
|
||||
c++;
|
||||
}
|
||||
return retVal;
|
||||
return users.OrderBy(x => x.Name).ToArray();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -257,28 +257,4 @@ namespace umbraco.cms.businesslogic.task
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A collection of tasks.
|
||||
/// </summary>
|
||||
public class Tasks : CollectionBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds the specified new task.
|
||||
/// </summary>
|
||||
/// <param name="NewTask">The new task.</param>
|
||||
public virtual void Add(Task NewTask)
|
||||
{
|
||||
this.List.Add(NewTask);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="umbraco.cms.businesslogic.task.Task"/> at the specified index.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public virtual Task this[int Index]
|
||||
{
|
||||
get { return (Task) this.List[Index]; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
35
umbraco/cms/businesslogic/task/Tasks.cs
Normal file
35
umbraco/cms/businesslogic/task/Tasks.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Runtime.CompilerServices;
|
||||
using umbraco.BusinessLogic;
|
||||
using umbraco.DataLayer;
|
||||
|
||||
namespace umbraco.cms.businesslogic.task
|
||||
{
|
||||
/// <summary>
|
||||
/// A collection of tasks.
|
||||
/// </summary>
|
||||
public class Tasks : CollectionBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds the specified new task.
|
||||
/// </summary>
|
||||
/// <param name="NewTask">The new task.</param>
|
||||
public virtual void Add(Task NewTask)
|
||||
{
|
||||
this.List.Add(NewTask);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="umbraco.cms.businesslogic.task.Task"/> at the specified index.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public virtual Task this[int Index]
|
||||
{
|
||||
get { return (Task)this.List[Index]; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -176,6 +176,7 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>PackageFiles.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="businesslogic\task\Tasks.cs" />
|
||||
<Compile Include="helpers\Casing.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
<clientDependency version="13">
|
||||
<clientDependency version="14">
|
||||
<fileRegistration defaultProvider="PageHeaderProvider" fileDependencyExtensions="js,css">
|
||||
<providers>
|
||||
<add name="PageHeaderProvider"
|
||||
<add name="PageHeaderProvider"
|
||||
type="ClientDependency.Core.FileRegistration.Providers.PageHeaderProvider, ClientDependency.Core"
|
||||
isDebug="true"/>
|
||||
<add name="LazyLoadProvider"
|
||||
isDebug="false"/>
|
||||
<add name="LazyLoadProvider"
|
||||
type="ClientDependency.Core.FileRegistration.Providers.LazyLoadProvider, ClientDependency.Core"
|
||||
isDebug="true"/>
|
||||
<add name="CanvasProvider"
|
||||
isDebug="false"/>
|
||||
<add name="CanvasProvider"
|
||||
type="umbraco.presentation.LiveEditing.CanvasClientDependencyProvider, umbraco"
|
||||
isDebug="true"/>
|
||||
isDebug="false"/>
|
||||
</providers>
|
||||
</fileRegistration>
|
||||
<compositeFiles defaultProvider="CompositeFileProcessor" compositeFileHandlerPath="DependencyHandler.axd">
|
||||
<compositeFiles defaultProvider="CompositeFileProcessor"
|
||||
compositeFileHandlerPath="DependencyHandler.axd"
|
||||
processRogueJSFiles="true"
|
||||
processRogueCSSFiles="true">
|
||||
<providers>
|
||||
<add name="CompositeFileProcessor"
|
||||
<add name="CompositeFileProcessor"
|
||||
type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core"
|
||||
enableCssMinify="true"
|
||||
enableJsMinify="true"
|
||||
|
||||
@@ -7,8 +7,8 @@ using umbraco.presentation;
|
||||
|
||||
namespace umbraco.presentation.LiveEditing
|
||||
{
|
||||
public class CanvasClientDependencyProvider : LazyLoadProvider
|
||||
{
|
||||
public class CanvasClientDependencyProvider : LazyLoadProvider
|
||||
{
|
||||
public CanvasClientDependencyProvider()
|
||||
: base()
|
||||
{
|
||||
@@ -26,17 +26,20 @@ namespace umbraco.presentation.LiveEditing
|
||||
this.IsDebugMode = true;
|
||||
}
|
||||
|
||||
protected override void ProcessSingleCssFile(string css)
|
||||
{
|
||||
if (UmbracoContext.Current.LiveEditingContext.Enabled)
|
||||
base.ProcessSingleCssFile(css);
|
||||
}
|
||||
protected override string RenderSingleCssFile(string css)
|
||||
{
|
||||
if (UmbracoContext.Current.LiveEditingContext.Enabled)
|
||||
return base.RenderSingleCssFile(css);
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
protected override void ProcessSingleJsFile(string js)
|
||||
{
|
||||
if (UmbracoContext.Current.LiveEditingContext.Enabled)
|
||||
base.ProcessSingleJsFile(js);
|
||||
}
|
||||
protected override string RenderSingleJsFile(string js)
|
||||
{
|
||||
if (UmbracoContext.Current.LiveEditingContext.Enabled)
|
||||
return base.RenderSingleJsFile(js);
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user