Merge integration -> contributions.

--HG--
branch : contributions
This commit is contained in:
Suha Can
2011-06-13 13:52:52 -07:00
68 changed files with 1502 additions and 1000 deletions

View File

@@ -18,6 +18,7 @@
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<TargetFrameworkProfile />
<UseIISExpress>false</UseIISExpress>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -43,25 +44,33 @@
<Reference Include="Autofac, Version=2.1.13.813, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\autofac\Autofac.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.Web">
<HintPath>..\..\..\lib\autofac\Autofac.Integration.Web.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.Web.Mvc">
<HintPath>..\..\..\lib\autofac\Autofac.Integration.Web.Mvc.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\aspnetmvc\Microsoft.Web.Infrastructure.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="NHibernate.ByteCode.Castle">
<HintPath>..\..\..\lib\fluentnhibernate\NHibernate.ByteCode.Castle.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System">
<Private>False</Private>
@@ -172,151 +181,188 @@
<ProjectReference Include="..\..\Orchard.Web\Core\Orchard.Core.csproj">
<Project>{9916839C-39FC-4CEB-A5AF-89CA7E87119F}</Project>
<Name>Orchard.Core</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Lucene\Lucene.csproj">
<Project>{D5D447D7-EF8E-43A6-B9A4-3B025DD9F45D}</Project>
<Name>Lucene</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.ArchiveLater\Orchard.ArchiveLater.csproj">
<Project>{1C981BB3-26F7-494C-9005-CC27A5144233}</Project>
<Name>Orchard.ArchiveLater</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Blogs\Orchard.Blogs.csproj">
<Project>{63FBD4D9-E1DA-4A7B-AA6A-D6074FE50867}</Project>
<Name>Orchard.Blogs</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.CodeGeneration\Orchard.CodeGeneration.csproj">
<Project>{C0C45321-B51D-4D8D-9B7B-AA4C2E0B2962}</Project>
<Name>Orchard.CodeGeneration</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Comments\Orchard.Comments.csproj">
<Project>{14C049FD-B35B-415A-A824-87F26B26E7FD}</Project>
<Name>Orchard.Comments</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.ContentTypes\Orchard.ContentTypes.csproj">
<Project>{0E7646E8-FE8F-43C1-8799-D97860925EC4}</Project>
<Name>Orchard.ContentTypes</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.DesignerTools\Orchard.DesignerTools.csproj">
<Project>{4A4595EF-6C37-4F99-96ED-4AE0B9E438D3}</Project>
<Name>Orchard.DesignerTools</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Email\Orchard.Email.csproj">
<Project>{05660F47-D649-48BD-9DED-DF4E01E7CFF9}</Project>
<Name>Orchard.Email</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Experimental\Orchard.Experimental.csproj">
<Project>{AB3C207C-0126-4143-8D62-1119DF80D366}</Project>
<Name>Orchard.Experimental</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Indexing\Orchard.Indexing.csproj">
<Project>{EA2B9121-EF54-40A6-A53E-6593C86EE696}</Project>
<Name>Orchard.Indexing</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.jQuery\Orchard.jQuery.csproj">
<Project>{8F116B06-1C0E-4E4C-9A0A-D2FAB851E768}</Project>
<Name>Orchard.jQuery</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Lists\Orchard.Lists.csproj">
<Project>{137906EA-15FE-4AD8-A6A0-27528F0477D6}</Project>
<Name>Orchard.Lists</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Localization\Orchard.Localization.csproj">
<Project>{FBC8B571-ED50-49D8-8D9D-64AB7454A0D6}</Project>
<Name>Orchard.Localization</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.MediaPicker\Orchard.MediaPicker.csproj">
<Project>{43D0EC0B-1955-4566-8D31-7B9102DA1703}</Project>
<Name>Orchard.MediaPicker</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Media\Orchard.Media.csproj">
<Project>{D9A7B330-CD22-4DA1-A95A-8DE1982AD8EB}</Project>
<Name>Orchard.Media</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Messaging\Orchard.Messaging.csproj">
<Project>{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}</Project>
<Name>Orchard.Messaging</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Migrations\Orchard.Migrations.csproj">
<Project>{EA4F1DA7-F2AB-4384-9AA4-9B756E2026B1}</Project>
<Name>Orchard.Migrations</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Modules\Orchard.Modules.csproj">
<Project>{17F86780-9A1F-4AA1-86F1-875EEC2730C7}</Project>
<Name>Orchard.Modules</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.MultiTenancy\Orchard.MultiTenancy.csproj">
<Project>{72457126-E118-4171-A08F-9A709EE4B7FC}</Project>
<Name>Orchard.MultiTenancy</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Packaging\Orchard.Packaging.csproj">
<Project>{DFD137A2-DDB5-4D22-BE0D-FA9AD4C8B059}</Project>
<Name>Orchard.Packaging</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Pages\Orchard.Pages.csproj">
<Project>{3420C92A-747F-4990-BA08-F2C9531E44AD}</Project>
<Name>Orchard.Pages</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.PublishLater\Orchard.PublishLater.csproj">
<Project>{C889167C-E52C-4A65-A419-224B3D1B957D}</Project>
<Name>Orchard.PublishLater</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Recipes\Orchard.Recipes.csproj">
<Project>{FC1D74E8-7A4D-48F4-83DE-95C6173780C4}</Project>
<Name>Orchard.Recipes</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Roles\Orchard.Roles.csproj">
<Project>{D10AD48F-407D-4DB5-A328-173EC7CB010F}</Project>
<Name>Orchard.Roles</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Scripting.Dlr\Orchard.Scripting.Dlr.csproj">
<Project>{2AD6973D-C7BB-416E-89FE-EEE34664E05F}</Project>
<Name>Orchard.Scripting.Dlr</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Scripting\Orchard.Scripting.csproj">
<Project>{2AD6973D-C7BB-416E-89FE-EEE34664E05F}</Project>
<Name>Orchard.Scripting</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Search\Orchard.Search.csproj">
<Project>{4BE4EB01-AC56-4048-924E-2CA77F509ABA}</Project>
<Name>Orchard.Search</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Setup\Orchard.Setup.csproj">
<Project>{8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}</Project>
<Name>Orchard.Setup</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Tags\Orchard.Tags.csproj">
<Project>{5D0F00F0-26C9-4785-AD61-B85710C60EB0}</Project>
<Name>Orchard.Tags</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Themes\Orchard.Themes.csproj">
<Project>{CDE24A24-01D3-403C-84B9-37722E18DFB7}</Project>
<Name>Orchard.Themes</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Users\Orchard.Users.csproj">
<Project>{79AED36E-ABD0-4747-93D3-8722B042454B}</Project>
<Name>Orchard.Users</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\Orchard.Widgets\Orchard.Widgets.csproj">
<Project>{194D3CCC-1153-474D-8176-FDE8D7D0D0BD}</Project>
<Name>Orchard.Widgets</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard.Web\Modules\TinyMce\TinyMce.csproj">
<Project>{954CA994-D204-468B-9D69-51F6AD3E1C29}</Project>
<Name>TinyMce</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Orchard\Orchard.Framework.csproj">
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
<Name>Orchard.Framework</Name>
<EmbedInteropTypes>False</EmbedInteropTypes>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\Tools\Orchard\Orchard.csproj">
<Project>{33B1BC8D-E292-4972-A363-22056B207156}</Project>
<Name>Orchard</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\Orchard.Azure.csproj">
<Project>{2505AA84-65A6-43D0-9C27-4F44FD576284}</Project>
<Name>Orchard.Azure</Name>
<Private>True</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>

View File

@@ -54,7 +54,9 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
@@ -81,6 +83,7 @@
<ProjectReference Include="..\Orchard\Orchard.Framework.csproj">
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
<Name>Orchard.Framework</Name>
<Private>True</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>

View File

@@ -7,7 +7,7 @@ Scenario: Root request shows setup form
Given I have a clean site with
| extension | names |
| Module | Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Messaging, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.jQuery, TinyMce |
| Core | Common, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc |
| Core | Common, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc |
| Theme | SafeMode |
When I go to "/"
Then I should see "Welcome to Orchard"
@@ -18,7 +18,7 @@ Scenario: Setup folder also shows setup form
Given I have a clean site with
| extension | names |
| Module | Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Messaging, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.jQuery, TinyMce |
| Core | Common, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc |
| Core | Common, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc |
| Theme | SafeMode |
When I go to "/Setup"
Then I should see "Welcome to Orchard"
@@ -29,7 +29,7 @@ Scenario: Some of the initial form values are required
Given I have a clean site with
| extension | names |
| Module | Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Messaging, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.jQuery, TinyMce |
| Core | Common, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc |
| Core | Common, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc |
| Theme | SafeMode |
When I go to "/Setup"
And I hit "Finish Setup"
@@ -39,8 +39,8 @@ Scenario: Some of the initial form values are required
Scenario: Calling setup on a brand new install
Given I have a clean site with
| extension | names |
| Module | Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Lists, Orchard.ContentTypes, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Scripting, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.Modules, Orchard.Widgets, Orchard.jQuery, TinyMce, Orchard.Blogs, Orchard.Tags, Orchard.Packaging, Orchard.Recipes |
| Core | Common, Containers, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc |
| Module | Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Lists, Orchard.ContentTypes, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Scripting, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.Modules, Orchard.Widgets, Orchard.jQuery, TinyMce, Orchard.Blogs, Orchard.Tags, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup |
| Core | Common, Containers, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, Scheduling, Settings, Shapes, XmlRpc |
| Theme | SafeMode, TheThemeMachine |
And I am on "/Setup"
When I fill in

View File

@@ -2,7 +2,7 @@
// <auto-generated>
// This code was generated by SpecFlow (http://www.specflow.org/).
// SpecFlow Version:1.5.0.0
// Runtime Version:4.0.30319.1
// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -176,7 +176,7 @@ this.ScenarioSetup(scenarioInfo);
"names"});
table4.AddRow(new string[] {
"Module",
@"Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Lists, Orchard.ContentTypes, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Scripting, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.Modules, Orchard.Widgets, Orchard.jQuery, TinyMce, Orchard.Blogs, Orchard.Tags, Orchard.Packaging, Orchard.Recipes"});
@"Orchard.Setup, Orchard.Pages, Orchard.Users, Orchard.Roles, Orchard.Lists, Orchard.ContentTypes, Orchard.Messaging, Orchard.Media, Orchard.MediaPicker, Orchard.Scripting, Orchard.Comments, Orchard.PublishLater, Orchard.Themes, Orchard.Modules, Orchard.Widgets, Orchard.jQuery, TinyMce, Orchard.Blogs, Orchard.Tags, Orchard.Packaging, Orchard.Recipes, Orchard.Warmup"});
table4.AddRow(new string[] {
"Core",
"Common, Containers, Contents, Dashboard, Feeds, HomePage, Navigation, Routable, S" +

View File

@@ -43,6 +43,7 @@
<Reference Include="ClaySharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\claysharp\ClaySharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
@@ -53,10 +54,12 @@
<Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\aspnetmvc\System.Web.Mvc.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\lib\aspnetmvc\System.Web.WebPages.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
@@ -208,7 +211,6 @@
<Compile Include="Settings\Commands\SiteSettingsCommands.cs" />
<Compile Include="Settings\Models\SiteSettings2Part.cs" />
<Compile Include="Settings\Models\SiteSettings2PartRecord.cs" />
<Compile Include="Settings\Models\SiteSettingsCache.cs" />
<Compile Include="Settings\ResourceManifest.cs" />
<Compile Include="Settings\Migrations.cs" />
<Compile Include="Settings\Drivers\SiteSettingsPartDriver.cs" />
@@ -320,6 +322,7 @@
<ProjectReference Include="..\..\Orchard\Orchard.Framework.csproj">
<Project>{2D1D92BB-4555-4CBE-8D0E-63563D6CE4C6}</Project>
<Name>Orchard.Framework</Name>
<Private>True</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>

View File

@@ -1,18 +0,0 @@
--- Orchard.Core.csproj
+++ Orchard.Core.csproj
@@ -18,6 +18,7 @@
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<TargetFrameworkProfile />
+ <UseIISExpress>false</UseIISExpress>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -200,6 +201,7 @@
<Compile Include="Scheduling\Services\ScheduledTaskManager.cs" />
<Compile Include="Scheduling\Services\ScheduledTaskExecutor.cs" />
<Compile Include="Scheduling\Models\Task.cs" />
+ <Compile Include="Settings\Models\SiteSettingsCache.cs" />
<Compile Include="Settings\Models\SiteSettings2Part.cs" />
<Compile Include="Settings\Models\SiteSettings2PartRecord.cs" />
<Compile Include="Settings\ResourceManifest.cs" />

View File

@@ -1,5 +1,4 @@
using System;
using JetBrains.Annotations;
using JetBrains.Annotations;
using Orchard.Core.Settings.Models;
using Orchard.Data;
using Orchard.ContentManagement.Handlers;
@@ -12,14 +11,6 @@ namespace Orchard.Core.Settings.Handlers {
Filters.Add(new ActivatingFilter<SiteSettings2Part>("Site"));
Filters.Add(StorageFilter.For(repository));
Filters.Add(StorageFilter.For(repository2));
OnInitializing<SiteSettingsPart>(InitializeSiteSettings);
}
private static void InitializeSiteSettings(InitializingContentContext initializingContentContext, SiteSettingsPart siteSettingsPart) {
siteSettingsPart.Record.SiteSalt = Guid.NewGuid().ToString("N");
siteSettingsPart.Record.SiteName = "My Orchard Project Application";
siteSettingsPart.Record.PageTitleSeparator = " - ";
}
}
}

View File

@@ -1,141 +0,0 @@
using Orchard.ContentManagement;
using Orchard.Settings;
namespace Orchard.Core.Settings.Models {
public class SiteSettingsCache : ISite {
private readonly int _id;
private SiteSettingsPart _siteSettingsPart;
private string _pageTitleSeparator;
private string _siteName;
private string _siteSalt;
private string _superUser;
private string _homePage;
private string _siteCulture;
private ResourceDebugMode _resourceDebugMode;
private int _pageSize;
private string _baseUrl;
public SiteSettingsCache(ISite site) {
_id = site.Id;
_pageTitleSeparator = site.PageTitleSeparator;
_siteName = site.SiteName;
_siteSalt = site.SiteSalt;
_superUser = site.SuperUser;
_homePage = site.HomePage;
_siteCulture = site.SiteCulture;
_resourceDebugMode = site.ResourceDebugMode;
_pageSize = site.PageSize;
_baseUrl = site.BaseUrl;
}
public int Id {
get { return _id; }
}
public string PageTitleSeparator {
get { return _pageTitleSeparator; }
set {
_pageTitleSeparator = value;
SiteSettingsPart.PageTitleSeparator = value;
}
}
public string SiteName {
get { return _siteName; }
set {
_siteName = value;
SiteSettingsPart.SiteName = value;
}
}
public string SiteSalt {
get { return _siteSalt; }
set {
_siteSalt = value;
SiteSettingsPart.Record.SiteSalt = value;
}
}
public string SuperUser {
get { return _superUser; }
set {
_superUser = value;
SiteSettingsPart.SuperUser = value;
}
}
public string HomePage {
get { return _homePage; }
set {
_homePage = value;
SiteSettingsPart.HomePage = value;
}
}
public string SiteCulture {
get { return _siteCulture; }
set {
_siteCulture = value;
SiteSettingsPart.SiteCulture = value;
}
}
public ResourceDebugMode ResourceDebugMode {
get { return _resourceDebugMode; }
set {
_resourceDebugMode = value;
SiteSettingsPart.ResourceDebugMode = value;
}
}
public int PageSize {
get { return _pageSize; }
set {
_pageSize = value;
SiteSettingsPart.PageSize = value;
}
}
public string BaseUrl {
get { return _baseUrl; }
set {
_baseUrl = value;
SiteSettingsPart.BaseUrl = value;
}
}
public ContentItem ContentItem {
get { return SiteSettingsPart.ContentItem; }
}
private ISiteService SiteService { get; set; }
private SiteSettingsPart SiteSettingsPart {
get {
if (_siteSettingsPart == null) {
_siteSettingsPart = SiteService.GetSiteSettingsPart() as SiteSettingsPart;
}
return _siteSettingsPart;
}
set { _siteSettingsPart = value; }
}
public void ResetCache(ISiteService siteService) {
SiteService = siteService;
SiteSettingsPart = null;
}
}
}

View File

@@ -20,27 +20,23 @@ namespace Orchard.Core.Settings.Services {
ICacheManager cacheManager) {
_contentManager = contentManager;
_cacheManager = cacheManager;
Logger = NullLogger.Instance;
}
public ILogger Logger { get; set; }
public ISite GetSiteSettings() {
SiteSettingsCache siteSettingsCache = _cacheManager.Get("SiteSettings",
ctx => new SiteSettingsCache(GetSiteSettingsPart()));
siteSettingsCache.ResetCache(this);
return siteSettingsCache;
}
public ISite GetSiteSettingsPart() {
var siteId = _cacheManager.Get("SiteId", ctx => {
var site = _contentManager.Query("Site")
.Slice(0, 1)
.FirstOrDefault();
if (site == null) {
site = _contentManager.Create<SiteSettingsPart>("Site").ContentItem;
site = _contentManager.Create<SiteSettingsPart>("Site", item => {
item.Record.SiteSalt = Guid.NewGuid().ToString("N");
item.Record.SiteName = "My Orchard Project Application";
item.Record.PageTitleSeparator = " - ";
}).ContentItem;
}
return site.Id;

View File

@@ -14,6 +14,7 @@
<AssemblyName>Lucene</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>false</UseIISExpress>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -36,6 +37,7 @@
<ItemGroup>
<Reference Include="Lucene.Net">
<HintPath>..\..\..\..\lib\lucene.net\Lucene.Net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />

View File

@@ -18,6 +18,7 @@
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<TargetFrameworkProfile />
<UseIISExpress>false</UseIISExpress>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -42,6 +43,7 @@
<Reference Include="Joel.Net.Akismet, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\lib\joel.net.akismet\Joel.Net.Akismet.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />

View File

@@ -42,6 +42,7 @@
<ItemGroup>
<Reference Include="ClaySharp">
<HintPath>..\..\..\..\lib\claysharp\ClaySharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />

View File

@@ -18,6 +18,7 @@
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<TargetFrameworkProfile />
<UseIISExpress>false</UseIISExpress>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -42,6 +43,7 @@
<Reference Include="ICSharpCode.SharpZipLib, Version=0.85.5.452, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\lib\sharpziplib\ICSharpCode.SharpZipLib.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Web.Mvc;
using System.Web.Routing;
using System.Xml.Linq;
@@ -10,6 +11,7 @@ using Orchard.Environment.Extensions.Models;
using Orchard.Localization;
using Orchard.Packaging.Events;
using Orchard.Packaging.Extensions;
using Orchard.Packaging.GalleryServer;
using Orchard.Packaging.Models;
using Orchard.Packaging.Services;
using Orchard.Packaging.ViewModels;
@@ -151,16 +153,17 @@ namespace Orchard.Packaging.Controllers {
int totalCount = 0;
foreach (var source in sources) {
try {
Expression<Func<PublishedPackage, bool>> packagesCriteria = p => p.PackageType == packageType &&
p.IsLatestVersion &&
(string.IsNullOrEmpty(options.SearchText)
|| p.Title.Contains(options.SearchText)
|| p.Description.Contains(options.SearchText)
|| p.Tags.Contains(options.SearchText));
var sourceExtensions = _packagingSourceManager.GetExtensionList(true,
source,
packages => {
packages = packages.Where(p => p.PackageType == packageType &&
p.IsLatestVersion &&
(string.IsNullOrEmpty(options.SearchText)
|| p.Title.Contains(options.SearchText)
|| p.Description.Contains(options.SearchText)
|| p.Tags.Contains(options.SearchText)
));
packages = packages.Where(packagesCriteria);
switch (options.Order) {
case PackagingExtensionsOrder.Downloads:
@@ -174,8 +177,8 @@ namespace Orchard.Packaging.Controllers {
break;
}
if(pager.PageSize != 0) {
packages = packages.Skip((pager.Page - 1)*pager.PageSize).Take(pager.PageSize);
if (pager.PageSize != 0) {
packages = packages.Skip((pager.Page - 1) * pager.PageSize).Take(pager.PageSize);
}
return packages;
@@ -184,10 +187,7 @@ namespace Orchard.Packaging.Controllers {
// count packages separately to prevent loading everything just to count
totalCount += _packagingSourceManager.GetExtensionCount(
source,
packages => packages.Where(p => p.PackageType == packageType &&
p.IsLatestVersion &&
(string.IsNullOrEmpty(options.SearchText) || p.Title.Contains(options.SearchText)))
);
packages => packages.Where(packagesCriteria));
extensions = extensions == null ? sourceExtensions : extensions.Concat(sourceExtensions);

View File

@@ -14,6 +14,7 @@
<AssemblyName>Orchard.Packaging</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>false</UseIISExpress>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -38,6 +39,7 @@
<Reference Include="NuGet.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\lib\nuget\NuGet.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data.Services.Client" />

View File

@@ -14,6 +14,7 @@
<AssemblyName>Orchard.Scripting.Dlr</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>false</UseIISExpress>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -37,19 +38,23 @@
<Reference Include="IronRuby, Version=1.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\lib\dlr\IronRuby.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="IronRuby.Libraries, Version=1.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\lib\dlr\IronRuby.Libraries.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Dynamic, Version=1.1.0.10, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\lib\dlr\Microsoft.Dynamic.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Scripting, Version=1.1.0.10, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\lib\dlr\Microsoft.Scripting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">

View File

@@ -8,7 +8,7 @@
<Tags>blog</Tags>
<Version>1.0</Version>
</Recipe>
<Feature enable="Orchard.Blogs,Orchard.Comments,Orchard.Tags,
XmlRpc,Orchard.Blogs.RemotePublishing,
TinyMce,Orchard.Media,Orchard.MediaPicker,Orchard.PublishLater,
@@ -16,7 +16,7 @@
Orchard.Scripting,Orchard.Scripting.Lightweight,
PackagingServices,Orchard.Packaging,Gallery.Updates,Orchard.Warmup,
TheThemeMachine" />
<Metadata>
<Types>
<Page ContentTypeSettings.Draftable="True" TypeIndexing.Included="true">
@@ -53,5 +53,6 @@
widget create HtmlWidget /Title:"Third Leader Aside" /Zone:"TripelThird" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget3" /UseLoremIpsumText:true
menuitem create /MenuPosition:"1" /MenuText:"Home" /Url:"" /OnMainMenu:true
site setting set baseurl
theme activate "The Theme Machine"
</Command>
</Orchard>

View File

@@ -8,14 +8,14 @@
<Tags></Tags>
<Version>1.0</Version>
</Recipe>
<Feature enable="Orchard.Blogs,Orchard.Comments,Orchard.Tags,
Orchard.Lists,TinyMce,Orchard.Media,Orchard.MediaPicker,Orchard.PublishLater,
Orchard.jQuery,Orchard.Widgets,Orchard.Widgets.PageLayerHinting,Orchard.ContentTypes,
Orchard.Scripting,Orchard.Scripting.Lightweight,
PackagingServices,Orchard.Packaging,Gallery.Updates,Orchard.Warmup,
TheThemeMachine" />
<Metadata>
<Types>
<Page ContentTypeSettings.Draftable="True" TypeIndexing.Included="true">
@@ -49,5 +49,6 @@
widget create HtmlWidget /Title:"Third Leader Aside" /Zone:"TripelThird" /Position:"5" /Layer:"TheHomepage" /Identity:"SetupHtmlWidget3" /UseLoremIpsumText:true
menuitem create /MenuPosition:"1" /MenuText:"Home" /Url:"" /OnMainMenu:true
site setting set baseurl
theme activate "The Theme Machine"
</Command>
</Orchard>

View File

@@ -7,13 +7,15 @@ using Orchard.ContentManagement;
using Orchard.Core.Settings.Descriptor.Records;
using Orchard.Core.Settings.Models;
using Orchard.Data;
using Orchard.Data.Migration;
using Orchard.Data.Migration.Interpreters;
using Orchard.Data.Migration.Schema;
using Orchard.Environment;
using Orchard.Environment.Configuration;
using Orchard.Environment.ShellBuilders;
using Orchard.Environment.Descriptor;
using Orchard.Environment.Descriptor.Models;
using Orchard.Environment.ShellBuilders;
using Orchard.Environment.State;
using Orchard.Localization;
using Orchard.Localization.Services;
using Orchard.Recipes.Models;
@@ -21,9 +23,6 @@ using Orchard.Recipes.Services;
using Orchard.Reports.Services;
using Orchard.Security;
using Orchard.Settings;
using Orchard.Environment.State;
using Orchard.Data.Migration;
using Orchard.Themes.Services;
using Orchard.Utility.Extensions;
namespace Orchard.Setup.Services {
@@ -172,6 +171,7 @@ namespace Orchard.Setup.Services {
private string CreateTenantData(SetupContext context, IWorkContextScope environment) {
string executionId = null;
// create superuser
var membershipService = environment.Resolve<IMembershipService>();
var user =
@@ -191,10 +191,6 @@ namespace Orchard.Setup.Services {
siteSettings.Record.SuperUser = context.AdminUsername;
siteSettings.Record.SiteCulture = "en-US";
// set site theme
var themeService = environment.Resolve<ISiteThemeService>();
themeService.SetSiteTheme("TheThemeMachine");
// add default culture
var cultureManager = environment.Resolve<ICultureManager>();
cultureManager.AddCulture("en-US");
@@ -202,7 +198,7 @@ namespace Orchard.Setup.Services {
var recipeManager = environment.Resolve<IRecipeManager>();
executionId = recipeManager.Execute(Recipes().Where(r => r.Name.Equals(context.Recipe, StringComparison.OrdinalIgnoreCase)).FirstOrDefault());
//null check: temporary fix for running setup in command line
// null check: temporary fix for running setup in command line
if (HttpContext.Current != null) {
authenticationService.SignIn(user, true);
}

View File

@@ -140,10 +140,6 @@ namespace Orchard.Setup {
return site.As<ISite>();
}
public ISite GetSiteSettingsPart() {
return GetSiteSettings();
}
}
class SafeModeSite : ContentPart, ISite {

View File

@@ -69,7 +69,13 @@ namespace Orchard.Themes.Controllers {
bool installThemes = _featureManager.GetEnabledFeatures().FirstOrDefault(f => f.Id == "PackagingServices") != null;
var featuresThatNeedUpdate = _dataMigrationManager.GetFeaturesThatNeedUpdate();
ThemeEntry currentTheme = new ThemeEntry(_siteThemeService.GetSiteTheme());
ThemeEntry currentTheme = null;
ExtensionDescriptor currentThemeDescriptor = _siteThemeService.GetSiteTheme();
if (currentThemeDescriptor != null) {
currentTheme = new ThemeEntry(currentThemeDescriptor);
}
IEnumerable<ThemeEntry> themes = _extensionManager.AvailableExtensions()
.Where(extensionDescriptor => {
bool hidden = false;
@@ -80,7 +86,8 @@ namespace Orchard.Themes.Controllers {
return !hidden &&
DefaultExtensionTypes.IsTheme(extensionDescriptor.ExtensionType) &&
!currentTheme.Descriptor.Id.Equals(extensionDescriptor.Id);
(currentTheme == null ||
!currentTheme.Descriptor.Id.Equals(extensionDescriptor.Id));
})
.Select(extensionDescriptor => {
ThemeEntry themeEntry = new ThemeEntry(extensionDescriptor) {

View File

@@ -61,8 +61,11 @@ namespace Orchard.Warmup.Controllers {
using (var urlReader = new StringReader(viewModel.Settings.Urls)) {
string relativeUrl;
while (null != (relativeUrl = urlReader.ReadLine())) {
if(String.IsNullOrWhiteSpace(relativeUrl)) {
continue;
}
if (!Uri.IsWellFormedUriString(relativeUrl, UriKind.Relative) || !(relativeUrl.StartsWith("/"))) {
AddModelError("Urls", T("{0} is an invalid warmup url.", relativeUrl));
AddModelError("Urls", T("\"{0}\" is an invalid warmup url.", relativeUrl));
}
}
}
@@ -75,14 +78,15 @@ namespace Orchard.Warmup.Controllers {
}
}
if (ModelState.IsValid) {
Services.Notifier.Information(T("Warmup updated successfully."));
}
if (ModelState.IsValid) {
_warmupUpdater.Generate();
Services.Notifier.Information(T("Warmup updated successfully."));
}
else {
Services.TransactionManager.Cancel();
}
return RedirectToAction("Index");
return Index();
}
bool IUpdateModel.TryUpdateModel<TModel>(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) {

View File

@@ -117,6 +117,10 @@ namespace Orchard.Warmup.Services {
using (var urlReader = new StringReader(part.Urls)) {
string relativeUrl;
while (null != (relativeUrl = urlReader.ReadLine())) {
if (String.IsNullOrWhiteSpace(relativeUrl)) {
continue;
}
string url = null;
relativeUrl = relativeUrl.Trim();

View File

@@ -7,14 +7,16 @@
Layout.Title = T("Performance").ToString();
}
<p>The urls below will be requested using @Html.Link(WorkContext.CurrentSite.BaseUrl, WorkContext.CurrentSite.BaseUrl) as a base url. You can change it on the @Html.ActionLink(T("General Settings page").Text, "Index", new { controller = "Admin", area = "Settings" }).</p>
@using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary()
<p>@T("The paths below will be requested using {0} as a base url. You can change the base url on the {1}. ", @Html.Link(WorkContext.CurrentSite.BaseUrl, WorkContext.CurrentSite.BaseUrl), @Html.ActionLink(T("General Settings page").Text, "Index", new { controller = "Admin", area = "Settings" }))</p>
<fieldset>
<div>
@Html.TextAreaFor(m => m.Settings.Urls, new { @class = "textMedium" })
<span class="hint">@T("This must be a set of relative paths, e.g., /, /About")</span>
<span class="hint">@T("This must be a set of relative paths, e.g., /, /About. Please ensure that you enter only one path per line.")</span>
</div>
</fieldset>
<fieldset>
@@ -33,13 +35,10 @@
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.Settings.OnPublish)">@T("Generate warmup pages any time some content is published")</label>
</div>
</fieldset>
<fieldset>
<button class="primaryAction" name="submit" value="@T("Save")" type="submit">@T("Save")</button>
</fieldset>
}
if (Model.ReportEntries.Any()) {
<fieldset>
<label>@T("Report")</label>
<h3>@T("Status")</h3>
<table class="items" summary="@T("This is a table of the reports in your application")">
<colgroup>
<col id="Col1" />
@@ -49,9 +48,9 @@
</colgroup>
<thead>
<tr>
<th scope="col">@T("Url")</th>
<th scope="col">@T("Path")</th>
<th scope="col">@T("Status")</th>
<th scope="col">@T("Date")</th>
<th scope="col">@T("Date generated")</th>
<th scope="col"></th>
</tr>
</thead>
@@ -70,3 +69,8 @@
}
</table>
</fieldset>
}
<fieldset>
<button class="primaryAction" name="submit" value="@T("Save")" type="submit">@T("Save")</button>
</fieldset>
}

View File

@@ -12,6 +12,5 @@ Features:
Orchard.Widgets.PageLayerHinting:
Name: Page Layer Hinting
Description: Adds a notification after creating a new Page with a direct link to create a Widget Layer for that specific page by URL.
Dependencies: Orchard.Widgets
Dependencies: Orchard.Widgets, Routable
Category: Widget
Priority: -1

View File

@@ -30,7 +30,7 @@ namespace Orchard.jQuery {
manifest.DefineScript("jQueryUI_Progressbar").SetUrl("jquery.ui.progressbar.min.js", "jquery.ui.progressbar.js").SetVersion("1.8.10").SetDependencies("jQueryUI_Core", "jQueryUI_Widget");
// Effects
manifest.DefineScript("jQueryEffects_Core").SetUrl("jquery.effects.core.min.js", "jquery.effects.core.js").SetVersion("1.8.10").SetDependencies("jQueryEffects_Core");
manifest.DefineScript("jQueryEffects_Core").SetUrl("jquery.effects.core.min.js", "jquery.effects.core.js").SetVersion("1.8.10").SetDependencies("jQuery");
manifest.DefineScript("jQueryEffects_Blind").SetUrl("jquery.effects.blind.min.js", "jquery.effects.blind.js").SetVersion("1.8.10").SetDependencies("jQueryEffects_Core");
manifest.DefineScript("jQueryEffects_Bounce").SetUrl("jquery.effects.bounce.min.js", "jquery.effects.bounce.js").SetVersion("1.8.10").SetDependencies("jQueryEffects_Core");
manifest.DefineScript("jQueryEffects_Clip").SetUrl("jquery.effects.clip.min.js", "jquery.effects.clip.js").SetVersion("1.8.10").SetDependencies("jQueryEffects_Core");

View File

@@ -1 +1 @@
(function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this,e=0;if(a.getParam("fullscreen_is_enabled")){return}function b(){var i=a.getDoc(),f=i.body,k=i.documentElement,h=tinymce.DOM,j=d.autoresize_min_height,g;g=tinymce.isIE?f.scrollHeight:k.offsetHeight;g=d.bottom_margin+g;if(g>d.autoresize_min_height){j=g}if(j!==e){h.setStyle(h.get(a.id+"_ifr"),"height",j+"px");e=j}if(d.throbbing){a.setProgressState(false);a.setProgressState(true)}}d.editor=a;d.autoresize_min_height=a.getElement().offsetHeight;d.bottom_margin=parseInt(a.getParam("autoresize_bottom_margin",50));a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onInit.add(function(g,f){g.setProgressState(true);d.throbbing=true;g.getBody().style.overflowY="hidden"});a.onLoadContent.add(function(g,f){b();setTimeout(function(){b();g.setProgressState(false);d.throbbing=false},1250)})}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})();
(function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this,e=0;if(a.getParam("fullscreen_is_enabled")){return}function b(){var i=a.getDoc(),f=i.body,k=i.documentElement,h=tinymce.DOM,j=d.autoresize_min_height,g;g=tinymce.isIE?f.scrollHeight:i.body.offsetHeight;if(g>d.autoresize_min_height){j=g}if(d.autoresize_max_height&&g>d.autoresize_max_height){j=d.autoresize_max_height;a.getBody().style.overflowY="auto"}else{a.getBody().style.overflowY="hidden"}if(j!==e){h.setStyle(h.get(a.id+"_ifr"),"height",j+"px");e=j}if(d.throbbing){a.setProgressState(false);a.setProgressState(true)}}d.editor=a;d.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight));d.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0));a.onInit.add(function(f){f.dom.setStyle(f.getBody(),"paddingBottom",f.getParam("autoresize_bottom_margin",50)+"px")});a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onInit.add(function(g,f){g.setProgressState(true);d.throbbing=true;g.getBody().style.overflowY="hidden"});a.onLoadContent.add(function(g,f){b();setTimeout(function(){b();g.setProgressState(false);d.throbbing=false},1250)})}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})();

View File

@@ -38,17 +38,21 @@
var d = ed.getDoc(), b = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
// Get height differently depending on the browser used
myHeight = tinymce.isIE ? b.scrollHeight : de.offsetHeight;
// Bottom margin
myHeight = t.bottom_margin + myHeight;
myHeight = tinymce.isIE ? b.scrollHeight : d.body.offsetHeight;
// Don't make it smaller than the minimum height
if (myHeight > t.autoresize_min_height)
resizeHeight = myHeight;
// If a maximum height has been defined don't exceed this height
if (t.autoresize_max_height && myHeight > t.autoresize_max_height) {
resizeHeight = t.autoresize_max_height;
ed.getBody().style.overflowY = "auto";
} else
ed.getBody().style.overflowY = "hidden";
// Resize content element
if ( resizeHeight !== oldSize ) {
if (resizeHeight !== oldSize) {
DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
oldSize = resizeHeight;
}
@@ -63,10 +67,15 @@
t.editor = ed;
// Define minimum height
t.autoresize_min_height = ed.getElement().offsetHeight;
t.autoresize_min_height = parseInt( ed.getParam('autoresize_min_height', ed.getElement().offsetHeight) );
// Add margin at the bottom for better UX
t.bottom_margin = parseInt( ed.getParam('autoresize_bottom_margin', 50) );
// Define maximum height
t.autoresize_max_height = parseInt( ed.getParam('autoresize_max_height', 0) );
// Add padding at the bottom for better UX
ed.onInit.add(function(ed){
ed.dom.setStyle(ed.getBody(), 'paddingBottom', ed.getParam('autoresize_bottom_margin', 50) + 'px');
});
// Add appropriate listeners for resizing content area
ed.onChange.add(resize);

File diff suppressed because one or more lines are too long

View File

@@ -593,6 +593,7 @@
if (evt.altKey) {
if (evt.keyCode === DOM_VK_F10) {
window.focus();
t.toolbarGroup.focus();
return Event.cancel(evt);
} else if (evt.keyCode === DOM_VK_F11) {
@@ -936,10 +937,10 @@
},
_updateUndoStatus : function(ed) {
var cm = ed.controlManager;
var cm = ed.controlManager, um = ed.undoManager;
cm.setDisabled('undo', !ed.undoManager.hasUndo() && !ed.typing);
cm.setDisabled('redo', !ed.undoManager.hasRedo());
cm.setDisabled('undo', !um.hasUndo() && !um.typing);
cm.setDisabled('redo', !um.hasRedo());
},
_nodeChanged : function(ed, cm, n, co, ob) {
@@ -1095,11 +1096,8 @@
getParent(function(n) {
var na = n.nodeName.toLowerCase(), u, pi, ti = '';
if (n.getAttribute('data-mce-bogus'))
return;
// Ignore non element and hidden elements
if (n.nodeType != 1 || n.nodeName === 'BR' || (DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved')))
// Ignore non element and bogus/hidden elements
if (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved'))
return;
// Handle prefix

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 B

View File

@@ -18,7 +18,7 @@ var ImageDialog = {
e = ed.selection.getNode();
this.fillFileList('image_list', 'tinyMCEImageList');
this.fillFileList('image_list', tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'));
if (e.nodeName == 'IMG') {
f.src.value = ed.dom.getAttrib(e, 'src');
@@ -39,7 +39,7 @@ var ImageDialog = {
fillFileList : function(id, l) {
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
l = window[l];
l = typeof(l) === 'function' ? l() : window[l];
if (l && l.length > 0) {
lst.options[lst.options.length] = new Option('', '');

View File

@@ -0,0 +1,47 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{#advanced_dlg.accessibility_help}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript">tinyMCEPopup.requireLangPack();</script>
</head>
<body id="content">
<h1>{#advanced_dlg.accessibility_usage_title}</h1>
<h2>Toolbars</h2>
<p>Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys.
Press enter to activate a button and return focus to the editor.
Press escape to return focus to the editor without performing any actions.</p>
<h2>Status Bar</h2>
<p>To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path.
Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.</p>
<h2>Context Menu</h2>
<p>Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key.
To close submenus press the left arrow key. Press escape to close the context menu.</p>
<h1>Keyboard Shortcuts</h1>
<table>
<thead>
<tr>
<th>Keystroke</th>
<th>Function</th>
</tr>
</thead>
<tbody>
<tr>
<td>Control-B</td><td>Bold</td>
</tr>
<tr>
<td>Control-I</td><td>Italic</td>
</tr>
<tr>
<td>Control-Z</td><td>Undo</td>
</tr>
<tr>
<td>Control-Y</td><td>Redo</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@@ -9,7 +9,7 @@ h4 {font-size: 1em}
h5 {font-size: .83em}
h6 {font-size: .75em}
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat 0 0;}
a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat center center}
span.mceItemNbsp {background: #DDD}
td.mceSelected, th.mceSelected {background-color:#3399ff !important}
img {border:0;}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 B

After

Width:  |  Height:  |  Size: 64 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -103,6 +103,7 @@
.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center}
.defaultSkin .mceMenu span.mceMenuLine {display:none}
.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;}
.defaultSkin .mceMenuItem td, .defaultSkin .mceMenuItem th {line-height: normal}
/* Progress,Resize */
.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF}

View File

@@ -0,0 +1,23 @@
body, td, pre { margin:8px;}
body.mceForceColors {background:#FFF; color:#000;}
h1 {font-size: 2em}
h2 {font-size: 1.5em}
h3 {font-size: 1.17em}
h4 {font-size: 1em}
h5 {font-size: .83em}
h6 {font-size: .75em}
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;}
span.mceItemNbsp {background: #DDD}
td.mceSelected, th.mceSelected {background-color:#3399ff !important}
img {border:0;}
table {cursor:default}
table td, table th {cursor:text}
ins {border-bottom:1px solid green; text-decoration: none; color:green}
del {color:red; text-decoration:line-through}
cite {border-bottom:1px dashed blue}
acronym {border-bottom:1px dotted #CCC; cursor:help}
abbr {border-bottom:1px dashed #CCC; cursor:help}
img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
font[face=mceinline] {font-family:inherit !important}

View File

@@ -0,0 +1,105 @@
/* Generic */
body {
font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
background:#F0F0EE;
color: black;
padding:0;
margin:8px 8px 0 8px;
}
html {background:#F0F0EE; color:#000;}
td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
textarea {resize:none;outline:none;}
a:link, a:visited {color:black;background-color:transparent;}
a:hover {color:#2B6FB6;background-color:transparent;}
.nowrap {white-space: nowrap}
/* Forms */
fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
legend {color:#2B6FB6; font-weight:bold;}
label.msg {display:none;}
label.invalid {color:#EE0000; display:inline;background-color:transparent;}
input.invalid {border:1px solid #EE0000;background-color:transparent;}
input {background:#FFF; border:1px solid #CCC;color:black;}
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
input, select, textarea {border:1px solid #808080;}
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
.input_noborder {border:0;}
/* Buttons */
#insert, #cancel, input.button, .updateButton {
font-weight:bold;
width:94px; height:23px;
cursor:pointer;
padding-bottom:2px;
float:left;
}
#cancel {float:right}
/* Browse */
a.pickcolor, a.browse {text-decoration:none}
a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
.mceOldBoxModel a.browse span {width:22px; height:20px;}
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
a.pickcolor:hover span {background-color:#B2BBD0;}
a.pickcolor:hover span.disabled {}
/* Charmap */
table.charmap {border:1px solid #AAA; text-align:center}
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
#charmap a {display:block; color:#000; text-decoration:none; border:0}
#charmap a:hover {background:#CCC;color:#2B6FB6}
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
/* Source */
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
.mceActionPanel {margin-top:5px;}
/* Tabs classes */
.tabs {width:100%; height:18px; line-height:normal;}
.tabs ul {margin:0; padding:0; list-style:none;}
.tabs li {float:left; border: 1px solid black; border-bottom:0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block; cursor:pointer;}
.tabs li.current {font-weight: bold; margin-right:2px;}
.tabs span {float:left; display:block; padding:0px 10px 0 0;}
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
/* Panels */
.panel_wrapper div.panel {display:none;}
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
.panel_wrapper {border:1px solid #919B9C; padding:10px; padding-top:5px; clear:both; background:white;}
/* Columns */
.column {float:left;}
.properties {width:100%;}
.properties .column1 {}
.properties .column2 {text-align:left;}
/* Titles */
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
h3 {font-size:14px;}
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
/* Dialog specific */
#link .panel_wrapper, #link div.current {height:125px;}
#image .panel_wrapper, #image div.current {height:200px;}
#plugintable thead {font-weight:bold; background:#DDD;}
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
#plugintable {width:96%; margin-top:10px;}
#pluginscontainer {height:290px; overflow:auto;}
#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;}
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
#colorpicker #light div {overflow:hidden;}
#colorpicker #previewblock {float:right; padding-left:10px; height:20px;}
#colorpicker .panel_wrapper div.current {height:175px;}
#colorpicker #namedcolors {width:150px;}
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
#colorpicker #colornamecontainer {margin-top:5px;}

View File

@@ -0,0 +1,102 @@
/* Reset */
.highcontrastSkin table, .highcontrastSkin tbody, .highcontrastSkin a, .highcontrastSkin img, .highcontrastSkin tr, .highcontrastSkin div, .highcontrastSkin td, .highcontrastSkin iframe, .highcontrastSkin span, .highcontrastSkin *, .highcontrastSkin .mceText {border:0; margin:0; padding:0; vertical-align:baseline; border-collapse:separate;}
.highcontrastSkin a:hover, .highcontrastSkin a:link, .highcontrastSkin a:visited, .highcontrastSkin a:active {text-decoration:none; font-weight:normal; cursor:default;}
.highcontrastSkin table td {vertical-align:middle}
.highcontrastSkin .mceIconOnly {display: block !important;}
/* External */
.highcontrastSkin .mceExternalToolbar {position:absolute; border:1px solid; border-bottom:0; display:none; background-color: white;}
.highcontrastSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
.highcontrastSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px;}
/* Layout */
.highcontrastSkin table.mceLayout {border: 1px solid;}
.highcontrastSkin .mceIframeContainer {border-top:1px solid; border-bottom:1px solid}
.highcontrastSkin .mceStatusbar a:hover {text-decoration:underline}
.highcontrastSkin .mceStatusbar {display:block; line-height:1.5em; overflow:visible;}
.highcontrastSkin .mceStatusbar div {float:left}
.highcontrastSkin .mceStatusbar a.mceResize {display:block; float:right; width:20px; height:20px; cursor:se-resize; outline:0}
.highcontrastSkin .mceToolbar td { display: inline-block; float: left;}
.highcontrastSkin .mceToolbar tr { display: block;}
.highcontrastSkin .mceToolbar table { display: block; }
/* Button */
.highcontrastSkin .mceButton { display:block; margin: 2px; padding: 5px 10px;border: 1px solid; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -ms-border-radius: 3px; height: 2em;}
.highcontrastSkin .mceButton .mceVoiceLabel { height: 100%; vertical-align: center; line-height: 2em}
.highcontrastSkin .mceButtonDisabled .mceVoiceLabel { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);}
.highcontrastSkin .mceButtonActive, .highcontrastSkin .mceButton:focus, .highcontrastSkin .mceButton:active { border: 5px solid; padding: 1px 6px;-webkit-focus-ring-color:none;outline:none;}
/* Separator */
.highcontrastSkin .mceSeparator {display:block; width:16px; height:26px;}
/* ListBox */
.highcontrastSkin .mceListBox { display: block; margin:2px;-webkit-focus-ring-color:none;outline:none;}
.highcontrastSkin .mceListBox .mceText {padding: 5px 6px; line-height: 2em; width: 15ex; overflow: hidden;}
.highcontrastSkin .mceListBoxDisabled .mceText { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);}
.highcontrastSkin .mceListBox a.mceText { padding: 5px 10px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;}
.highcontrastSkin .mceListBox a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-left: 0; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;}
.highcontrastSkin .mceListBox:focus a.mceText, .highcontrastSkin .mceListBox:active a.mceText { border-width: 5px; padding: 1px 10px 1px 6px;}
.highcontrastSkin .mceListBox:focus a.mceOpen, .highcontrastSkin .mceListBox:active a.mceOpen { border-width: 5px; padding: 1px 0px 1px 4px;}
.highcontrastSkin .mceListBoxMenu {overflow-y:auto}
/* SplitButton */
.highcontrastSkin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
.highcontrastSkin .mceSplitButton { border-collapse: collapse; margin: 2px; height: 2em; line-height: 2em;-webkit-focus-ring-color:none;outline:none;}
.highcontrastSkin .mceSplitButton td { display: table-cell; float: none; margin: 0; padding: 0; height: 2em;}
.highcontrastSkin .mceSplitButton tr { display: table-row; }
.highcontrastSkin table.mceSplitButton { display: table; }
.highcontrastSkin .mceSplitButton a.mceAction { padding: 5px 10px; display: block; height: 2em; line-height: 2em; overflow: hidden; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;}
.highcontrastSkin .mceSplitButton a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;}
.highcontrastSkin .mceSplitButton .mceVoiceLabel { height: 2em; vertical-align: center; line-height: 2em; }
.highcontrastSkin .mceSplitButton:focus a.mceAction, .highcontrastSkin .mceSplitButton:active a.mceAction { border-width: 5px; border-right-width: 1px; padding: 1px 10px 1px 6px;-webkit-focus-ring-color:none;outline:none;}
.highcontrastSkin .mceSplitButton:focus a.mceOpen, .highcontrastSkin .mceSplitButton:active a.mceOpen { border-width: 5px; border-left-width: 1px; padding: 1px 0px 1px 4px;-webkit-focus-ring-color:none;outline:none;}
/* Menu */
.highcontrastSkin .mceNoIcons span.mceIcon {width:0;}
.highcontrastSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid; }
.highcontrastSkin .mceMenu table {background:white; color: black}
.highcontrastSkin .mceNoIcons a .mceText {padding-left:10px}
.highcontrastSkin .mceMenu a, .highcontrastSkin .mceMenu span, .highcontrastSkin .mceMenu {display:block;background:white; color: black}
.highcontrastSkin .mceMenu td {height:2em}
.highcontrastSkin .mceMenu a {position:relative;padding:3px 0 4px 0; display: block;}
.highcontrastSkin .mceMenu .mceText {position:relative; display:block; cursor:default; margin:0; padding:0 25px 0 25px;}
.highcontrastSkin .mceMenu pre.mceText {font-family:Monospace}
.highcontrastSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:26px;}
.highcontrastSkin td.mceMenuItemSeparator {border-top:1px solid; height:1px}
.highcontrastSkin .mceMenuItemTitle a {border:0; border-bottom:1px solid}
.highcontrastSkin .mceMenuItemTitle span.mceText {font-weight:bold; padding-left:4px}
.highcontrastSkin .mceNoIcons .mceMenuItemSelected span.mceText:before {content: "\2713\A0";}
.highcontrastSkin .mceMenu span.mceMenuLine {display:none}
.highcontrastSkin .mceMenuItemSub a .mceText:after {content: "\A0\25B8"}
.highcontrastSkin .mceMenuItem td, .highcontrastSkin .mceMenuItem th {line-height: normal}
/* ColorSplitButton */
.highcontrastSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid; color: #000}
.highcontrastSkin .mceColorSplitMenu td {padding:2px}
.highcontrastSkin .mceColorSplitMenu a {display:block; width:16px; height:16px; overflow:hidden; color:#000; margin: 0; padding: 0;}
.highcontrastSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
.highcontrastSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
.highcontrastSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid; background-color:#B6BDD2}
.highcontrastSkin a.mceMoreColors:hover {border:1px solid #0A246A; color: #000;}
.highcontrastSkin .mceColorPreview {display:none;}
.highcontrastSkin .mce_forecolor span.mceAction, .highcontrastSkin .mce_backcolor span.mceAction {height:17px;overflow:hidden}
/* Progress,Resize */
.highcontrastSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF}
.highcontrastSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
/* Formats */
.highcontrastSkin .mce_p span.mceText {}
.highcontrastSkin .mce_address span.mceText {font-style:italic}
.highcontrastSkin .mce_pre span.mceText {font-family:monospace}
.highcontrastSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
.highcontrastSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
.highcontrastSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
.highcontrastSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
.highcontrastSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
.highcontrastSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -106,6 +106,7 @@
.o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center}
.o2k7Skin .mceMenu span.mceMenuLine {display:none}
.o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;}
.o2k7Skin .mceMenuItem td, .o2k7Skin .mceMenuItem th {line-height: normal}
/* Progress,Resize */
.o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 806 B

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -3,13 +3,37 @@
Script.Require("ShapesBase");
Style.Include("site.css");
RegisterLink(new LinkEntry { Condition = "lte IE 6", Rel = "stylesheet", Type="text/css", Href = Href("../Styles/ie6.css")}.AddAttribute("media", "screen, projection"));
if (!string.IsNullOrEmpty(WorkContext.CurrentSite.SuperUser)) {
WorkContext.Layout.Footer.Add(New.User(), "10"); // Login and dashboard links
}
}
<div id="header">
<div id="branding">
<h1>@T("Welcome to Orchard")</h1>
</div>
</div>
@Display(Model.Messages)
@if (Model.Navigation != null) {
<div id="layout-navigation" class="group">
@Display(Model.Navigation)
</div>
}
@if (Model.Messages != null) {
<div id="messages">
@Display(Model.Messages)
</div>
}
<div id="main">
@Display(Model.Content)
</div>
@if (Model.Content != null) {
@Display(Model.Content)
}
</div>
@if (Model.Footer != null) {
<div id="footer" role="contentinfo">
@Display(Model.Footer)
</div>
}

View File

@@ -24,7 +24,10 @@
Model.Classes.Add("pager");
Model.Classes.Add("group");
var tag = Tag(Model, "ul");
var pageTag = Tag(Model, "ul");
Model.Classes.Add("selector");
var pageSizeTag = Tag(Model, "ul");
if (Model.RouteData != null) {
foreach (var rd in Model.RouteData.Values) {
@@ -40,109 +43,134 @@
}
@if (Model.TotalItemCount > 1) {
using (Html.BeginFormAntiForgeryPost()) {
<div class="pager-footer">
<div class="pager-footer">
@if (totalPageCount > 1 || Model.PageSize == 0 || Model.PageSize > pageSizes.First()) {
<div class="page-size-options">
<div>@T("Show:")</div>
@if (totalPageCount > 1 || Model.PageSize == 0 || Model.PageSize > pageSizes.First()) {
<div class="page-size-options">
<input type="hidden" name="Page" value="1" />
<label for="pageSize">@T("Show:")</label>
<select id="pageSize" name="PageSize">
@Html.SelectOption((int)Model.PageSize, 0, T("All").ToString())
@foreach (int size in pageSizes.OrderBy(p => p)) {
@Html.SelectOption((int)Model.PageSize, size, size.ToString())
@pageSizeTag.StartElement
@{ routeData["pageSize"] = 0; }
@if ((int)Model.PageSize == 0) {
<li class="selected"><span>@T("All").ToString()</span></li>
} else {
<li>@Html.ActionLink(T("All").ToString(), (string)routeData["action"], (string)routeData["controller"], routeData, null)</li>
}
@foreach (int size in pageSizes.OrderBy(p => p)) {
routeData["pageSize"] = size;
if ((int)Model.PageSize == size) {
<li class="selected"><span>@size.ToString()</span></li>
} else {
<li>@Html.ActionLink(size.ToString(), (string)routeData["action"], (string)routeData["controller"], routeData, null)</li>
}
</select>
}
<button id="submit-pager" type="submit">@T("Apply")</button>
</div>
@pageSizeTag.EndElement
</div>
}
<span class="page-results">@T("Showing items {0} - {1} of {2}", (Model.Page - 1) * (int)Model.PageSize + 1, Model.PageSize == 0 ? Model.TotalItemCount : Math.Min(Model.TotalItemCount, (Model.Page) * (int)Model.PageSize), Model.TotalItemCount)</span>
@if (totalPageCount > 1) {
routeData["pageSize"] = Model.PageSize;
@pageTag.StartElement
// first
if (firstPage > 1) {
if (routeData.ContainsKey("page")) {
routeData.Remove("page");
}
<li class="page-first">
@Html.ActionLink(T("<<").Text, (string)routeData["action"], (string)routeData["controller"], routeData, null)
</li>
}
<span class="page-results">@T("Showing items {0} - {1} of {2}", (Model.Page - 1) * (int)Model.PageSize + 1, Model.PageSize == 0 ? Model.TotalItemCount : Math.Min(Model.TotalItemCount, (Model.Page) * (int)Model.PageSize), Model.TotalItemCount)</span>
// previous page
if (Model.Page > 1) {
if (Model.Page == 2 && routeData.ContainsKey("page")) {
routeData.Remove("page");
}
else {
routeData["page"] = Model.Page - 1;
}
@if (totalPageCount > 1) {
routeData["pageSize"] = Model.PageSize;
@tag.StartElement
// first
if (firstPage > 1) {
if (routeData.ContainsKey("page")) {
routeData.Remove("page");
}
<li class="page-first">
@Html.ActionLink(T("<<").Text, (string)routeData["action"], (string)routeData["controller"], routeData, null)
</li>
}
// previous page
if (Model.Page > 1) {
if (Model.Page == 2 && routeData.ContainsKey("page")) {
routeData.Remove("page");
} else {
routeData["page"] = Model.Page - 1;
}
<li class="page-previous">
@Html.ActionLink((string)previousText, (string)routeData["action"], (string)routeData["controller"], routeData, null)
</li>
}
// page numbers
for (var p = firstPage; p <= lastPage; p++) {
<li class="page-@p">
@if (p == Model.Page) {
<span>@p</span>
} else {
if (p == 1) {
routeData.Remove("page");
} else {
routeData["page"] = p;
}
@Html.ActionLink(p.ToString(), (string)routeData["action"], (string)routeData["controller"], routeData, null)
}
</li>
}
// next page
if (Model.Page < totalPageCount) {
routeData["page"] = Model.Page + 1;
<li class="page-next">
@Html.ActionLink((string)nextText, (string)routeData["action"], (string)routeData["controller"], routeData, null)
</li>
}
// last page
if (lastPage < totalPageCount) {
routeData["page"] = totalPageCount;
<li class="page-last">
@Html.ActionLink(T(">>").Text, (string)routeData["action"], (string)routeData["controller"], routeData, null)
</li>
}
@tag.EndElement
<li class="page-previous">
@Html.ActionLink((string)previousText, (string)routeData["action"], (string)routeData["controller"], routeData, null)
</li>
}
</div>
}
// page numbers
for (var p = firstPage; p <= lastPage; p++) {
<li class="page-@p">
@if (p == Model.Page) {
<span>@p</span>
}
else {
if (p == 1) {
routeData.Remove("page");
}
else {
routeData["page"] = p;
}
@Html.ActionLink(p.ToString(), (string)routeData["action"], (string)routeData["controller"], routeData, null)
}
</li>
}
// next page
if (Model.Page < totalPageCount) {
routeData["page"] = Model.Page + 1;
<li class="page-next">
@Html.ActionLink((string)nextText, (string)routeData["action"], (string)routeData["controller"], routeData, null)
</li>
}
// last page
if (lastPage < totalPageCount) {
routeData["page"] = totalPageCount;
<li class="page-last">
@Html.ActionLink(T(">>").Text, (string)routeData["action"], (string)routeData["controller"], routeData, null)
</li>
}
@pageTag.EndElement
}
</div>
}
@using(Script.Foot()) {
@using (Script.Foot()) {
<script type="text/javascript">
//<![CDATA[
$(function () {
// Add the event handler for value change in the select field
$("#pageSize").change(function () {
var self = $(this);
var form = self.parents("form");
// Submit form
form.submit();
// disable button so that no other value can be chosen while the form is submited
self.attr("disabled", true);
$('ul.selector').each(function () {
var self = $(this),
options = $.map(self.find("li"), function (li) {
var self = $(li);
return $("<option/>", {
value: self.children("a").attr("href"),
text: self.text(),
selected: self.hasClass("selected")
})[0];
}),
select = $("<select/>", {
id: self.attr("id") + "Selector",
"class": self.attr("class"),
name: self.attr("name") + "Selector"
}).change(onSelectChange).append(options);
self.replaceWith(select);
});
function onSelectChange() {
// redirect to page with new page size
// disable button so that no other value can be chosen while the form is submited
window.location = $(this).attr("disabled", true).val();
}
})
//]]>
</script>

View File

@@ -63,8 +63,6 @@
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<remove assembly="mscorlib" />
<remove assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<remove assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<remove assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<remove assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

View File

@@ -247,7 +247,20 @@ namespace Orchard.Environment.Extensions {
}
private IEnumerable<ExtensionProbeEntry> SortExtensionProbeEntries(IEnumerable<ExtensionProbeEntry> entries, ConcurrentDictionary<string, DateTime> virtualPathModficationDates) {
return entries
// All "entries" are for the same extension ID, so we just need to filter/sort them by priority+ modification dates.
var groupByPriority = entries
.GroupBy(entry => entry.Priority)
.OrderByDescending(g => g.Key);
// Select highest priority group with at least one item
var firstNonEmptyGroup = groupByPriority.FirstOrDefault(g => g.Count() >= 1) ?? Enumerable.Empty<ExtensionProbeEntry>();
// No need for further sorting if only 1 item found
if (firstNonEmptyGroup.Count() <= 1)
return firstNonEmptyGroup;
// Sort by last modification date/loader order
return firstNonEmptyGroup
.OrderByDescending(probe => GetVirtualPathDepedenciesModificationTimeUtc(virtualPathModficationDates, probe))
.ThenBy(probe => probe.Loader.Order)
.ToList();

View File

@@ -32,6 +32,7 @@ namespace Orchard.Environment.Extensions.Loaders {
return new ExtensionProbeEntry {
Descriptor = descriptor,
Loader = this,
Priority = 100, // Higher priority because assemblies in ~/bin always take precedence
VirtualPath = "~/Core/" + descriptor.Id,
VirtualPathDependencies = Enumerable.Empty<string>(),
};

View File

@@ -9,6 +9,7 @@ namespace Orchard.Environment.Extensions.Loaders {
public class ExtensionProbeEntry {
public ExtensionDescriptor Descriptor { get; set; }
public IExtensionLoader Loader { get; set; }
public int Priority { get; set; }
public string VirtualPath { get; set; }
public IEnumerable<string> VirtualPathDependencies { get; set; }
}

View File

@@ -1,4 +1,5 @@
using System.IO;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Orchard.Environment.Extensions.Models;
using Orchard.FileSystems.Dependencies;
@@ -59,6 +60,7 @@ namespace Orchard.Environment.Extensions.Loaders {
return new ExtensionProbeEntry {
Descriptor = descriptor,
Loader = this,
Priority = 100, // Higher priority because assemblies in ~/bin always take precedence
VirtualPath = assemblyPath,
VirtualPathDependencies = new[] { assemblyPath },
};

View File

@@ -56,41 +56,51 @@
<Reference Include="Autofac, Version=2.1.13.813, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\autofac\Autofac.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Configuration, Version=2.1.13.813, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\autofac\Autofac.Configuration.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.Web, Version=2.1.13.813, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\autofac\Autofac.Integration.Web.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Autofac.Integration.Web.Mvc, Version=2.1.13.813, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\autofac\Autofac.Integration.Web.Mvc.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Castle.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\Castle Windsor 2.0\bin\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Castle.DynamicProxy2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\Castle Windsor 2.0\bin\Castle.DynamicProxy2.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Castle.Services.Logging.Log4netIntegration">
<HintPath>..\..\lib\Castle Windsor 2.0\bin\Castle.Services.Logging.Log4netIntegration.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ClaySharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\claysharp\ClaySharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentNHibernate, Version=1.0.0.593, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\fluentnhibernate\FluentNHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\fluentnhibernate\log4net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Web.Infrastructure">
@@ -99,10 +109,12 @@
<Reference Include="NHibernate, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\fluentnhibernate\NHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NHibernate.Linq, Version=1.0.0.4000, Culture=neutral, PublicKeyToken=444cf6a87fdab271, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\linqnhibernate\NHibernate.Linq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />

View File

@@ -1,6 +1,5 @@
namespace Orchard.Settings {
public interface ISiteService : IDependency {
ISite GetSiteSettings();
ISite GetSiteSettingsPart();
}
}

View File

@@ -113,7 +113,12 @@ namespace Orchard.HostContext {
}
private static CommandHost CreateWorkerAppDomainWithHost(string virtualPath, string physicalPath, Type hostType) {
ClientBuildManager clientBuildManager = new ClientBuildManager(virtualPath, physicalPath);
var clientBuildManager = new ClientBuildManager(virtualPath, physicalPath);
// Fix for http://orchard.codeplex.com/workitem/17920
// By forcing the CBM to build App_Code, etc, we ensure that the ASP.NET BuildManager
// is in a state where it can safely (i.e. in a multi-threaded safe way) process
// multiple concurrent calls to "GetCompiledAssembly".
clientBuildManager.CompileApplicationDependencies();
return (CommandHost)clientBuildManager.CreateObject(hostType, false);
}
}