Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Daniel Stolt
2016-07-03 13:08:32 +02:00
14 changed files with 136 additions and 7 deletions

View File

@@ -6,7 +6,7 @@ Orchard is a free, open source, community-focused Content Management System buil
You can try it for free on [DotNest.com](https://dotnest.com) or on Microsoft Azure by clicking on this button.
[![Deploy to Azure](https://azuredeploy.net/deploybutton.png)](https://portal.azure.com/#create/OutercurveFoundation.OrchardCMS.1.0.4)
[![Deploy to Azure](https://azuredeploy.net/deploybutton.png)](https://portal.azure.com/#create/OutercurveFoundation.OrchardCMS)
## About The Orchard Project
@@ -22,9 +22,9 @@ Our mission is to empower our users and foster a dedicated and diverse community
## Project Status
Orchard is currently in version **1.10** and **1.9.3**:
Orchard is currently in version **[1.10.1](https://github.com/OrchardCMS/Orchard/releases/tag/1.10.1)** and **[1.9.3](https://github.com/OrchardCMS/Orchard/releases/tag/1.9.3)**:
- *1.10* is the latest major version which introduces more impactful changes and new features as well. If you're new to Orchard, you should start with this version.
- *1.10.1* is the latest minor version that contains bugfixes and the more impactful changes and new features added in the latest major version (*1.10*). **If you're new to Orchard, you should use this version.**
- *1.9.3* contains further bugfixes in addition to *1.9.2* and these versions are based on the feature set of Orchard *1.9*.
We invite participation by the developer community in shaping the projects direction, so that we can publicly validate our designs and development approach.

View File

@@ -41,14 +41,14 @@ namespace Orchard.Alias.Navigation {
var urlLevel = endsWithSlash ? requestUrl.Count(l => l == '/') - 1 : requestUrl.Count(l => l == '/');
var menuLevel = menuPosition.Count(l => l == '.');
// Checking menu item if it's the leaf element or it's an intermediate element
// Checking the menu item whether it's the leaf element or it's an intermediate element
// or it's an unneccessary element according to the url.
RouteValueDictionary contentRoute;
if (menuLevel == urlLevel) {
contentRoute = request.RequestContext.RouteData.Values;
}
else {
// If menuLevel doesn't equal with urlLevel it can mean that this menu item is
// If menuLevel doesn't equal to urlLevel it can mean that this menu item is
// an intermediate element (the difference is a positive value) or this menu
// item is lower in the navigation hierarchy according to the url (negative
// value). If the value is negative, removing the menu item, if the value

View File

@@ -118,7 +118,7 @@ namespace Orchard.Users.Services {
template.Metadata.Wrappers.Add("Template_User_Wrapper");
var parameters = new Dictionary<string, object> {
{"Subject", T("New account").Text},
{"Subject", T("New account on {0}.", _orchardServices.WorkContext.CurrentSite.SiteName).Text},
{"Body", _shapeDisplay.Display(template)},
{"Recipients", recipient.Email }
};

View File

@@ -0,0 +1,8 @@
[
{
"inputs": [
"Assets/Less/orchard-tinymce.less"
],
"output": "Styles/orchard-tinymce.css"
}
]

View File

@@ -0,0 +1,12 @@
#stickyContainer.sticky-top {
top: 0;
position: fixed;
background-color: white;
}
#stickyContainer.container-layout {
width: 100%;
}
#stickyContainer.sticky-container-layout {
border-top: 1px solid #9e9e9e;
border-bottom: 1px solid #9e9e9e;
}

View File

@@ -0,0 +1,12 @@
#stickyContainer.sticky-top {
top: 0;
position: fixed;
background-color: white;
}
#stickyContainer.container-layout {
width: 100%;
}
#stickyContainer.sticky-container-layout {
border-top: 1px solid #9e9e9e;
border-bottom: 1px solid #9e9e9e;
}

View File

@@ -0,0 +1 @@
#stickyContainer.sticky-top{top:0;position:fixed;background-color:#fff;}#stickyContainer.container-layout{width:100%;}#stickyContainer.sticky-container-layout{border-top:1px solid #9e9e9e;border-bottom:1px solid #9e9e9e;}

View File

@@ -6,6 +6,7 @@ namespace TinyMce {
var manifest = builder.Add();
manifest.DefineScript("TinyMce").SetUrl("tinymce.min.js").SetVersion("4.1.6").SetDependencies("jQuery");
manifest.DefineScript("OrchardTinyMce").SetUrl("orchard-tinymce.js").SetDependencies("TinyMce");
manifest.DefineStyle("OrchardTinyMce").SetUrl("orchard-tinymce.css");
}
}
}

View File

@@ -35,4 +35,50 @@ tinyMCE.init({
editor.getBody().dir = directionality;
});
}
});
});
// If the editable area is taller than the window, make the menu and the toolbox sticky-positioned within the editor
// to help the user avoid excessive vertical scrolling.
// There is a built-in fixed_toolbar_container option in the TinyMCE, but we can't use it, because it is only
// available if the selector is a DIV with inline mode.
$(window).load(function () {
var $container = $("<div/>", { id: "stickyContainer", class: "container-layout" });
$(".mce-stack-layout:first").prepend($container);
$container.append($(".mce-menubar"));
$container.append($(".mce-toolbar-grp"));
var containerPosition = $container.get(0).getBoundingClientRect();
var $placeholder = $("<div/>");
var isAdded = false;
$(window).scroll(function (event) {
var $statusbarPosition = $(".mce-statusbar").offset();
if ($(window).scrollTop() >= containerPosition.top && !isAdded) {
$container.addClass("sticky-top");
$placeholder.insertBefore($container);
$container.width($placeholder.width());
$placeholder.height($container.height());
$(window).on("resize", function () {
$container.width($placeholder.width());
$placeholder.height($container.height());
});
$container.addClass("sticky-container-layout");
isAdded = true;
} else if ($(window).scrollTop() < containerPosition.top && isAdded) {
$container.removeClass("sticky-top");
$placeholder.remove();
$container.removeClass("sticky-container-layout");
$(window).on("resize", function () {
$container.width("100%");
});
isAdded = false;
}
if ($(window).scrollTop() >= ($statusbarPosition.top - $container.height())) {
$container.hide();
} else if ($(window).scrollTop() < ($statusbarPosition.top - $container.height()) && isAdded) {
$container.show();
}
});
});

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
</staticContent>
<handlers accessPolicy="Script,Read">
<!-- For any request to a file exists on disk, return it via native http module. AccessPolicy="Script" above is to allow for a managed 404 page. -->
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule" preCondition="integratedMode" resourceType="File" requireAccess="Read" />
</handlers>
</system.webServer>
</configuration>

View File

@@ -0,0 +1,19 @@
/*
** NOTE: This file is generated by Gulp and should not be edited directly!
** Any changes made directly to this file will be overwritten next time its asset group is processed by Gulp.
*/
#stickyContainer.sticky-top {
top: 0;
position: fixed;
background-color: white;
}
#stickyContainer.container-layout {
width: 100%;
}
#stickyContainer.sticky-container-layout {
border-top: 1px solid #9e9e9e;
border-bottom: 1px solid #9e9e9e;
}
/*# sourceMappingURL=data:application/json;base64,eyJ2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JdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ== */

View File

@@ -0,0 +1 @@
#stickyContainer.sticky-top{top:0;position:fixed;background-color:#fff}#stickyContainer.container-layout{width:100%}#stickyContainer.sticky-container-layout{border-top:1px solid #9e9e9e;border-bottom:1px solid #9e9e9e}

View File

@@ -88,6 +88,12 @@
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Content Include="Assets\Less\orchard-tinymce.css">
<DependentUpon>orchard-tinymce.less</DependentUpon>
</Content>
<Content Include="Assets\Less\orchard-tinymce.min.css">
<DependentUpon>orchard-tinymce.css</DependentUpon>
</Content>
<Content Include="Module.txt" />
<Content Include="Scripts\langs\ar.js" />
<Content Include="Scripts\langs\ar_SA.js" />
@@ -258,6 +264,7 @@
<Compile Include="Services\TinyMceShapeDisplayEvent.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Styles\orchard-tinymce.css" />
<Content Include="Views\Body-Html.Editor.cshtml" />
</ItemGroup>
<ItemGroup>
@@ -305,6 +312,15 @@
<ItemGroup>
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="Styles\Web.config">
<SubType>Designer</SubType>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="Assets.json" />
<Content Include="Assets\Less\orchard-tinymce.less" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>

View File

@@ -18,6 +18,7 @@
Script.Require("OrchardTinyMce");
Script.Require("jQueryColorBox");
Style.Require("jQueryColorBox");
Style.Require("OrchardTinyMce");
}
@Html.TextArea("Text", (string)Model.Text, 25, 80,