();
+ var dateTimeLocal = new DateTime(1998, 1, 15);
+ var dateTimeLocalString = target.ConvertToLocalizedDateString(dateTimeLocal);
var result = target.ConvertFromLocalizedDateString(dateTimeLocalString);
Assert.AreEqual(DateTimeKind.Utc, result.Value.Kind);
}
diff --git a/src/Orchard.Web/Modules/Orchard.Autoroute/Handlers/AutoroutePartHandler.cs b/src/Orchard.Web/Modules/Orchard.Autoroute/Handlers/AutoroutePartHandler.cs
index 4f7fce25b..0dddf7aee 100644
--- a/src/Orchard.Web/Modules/Orchard.Autoroute/Handlers/AutoroutePartHandler.cs
+++ b/src/Orchard.Web/Modules/Orchard.Autoroute/Handlers/AutoroutePartHandler.cs
@@ -70,6 +70,10 @@ namespace Orchard.Autoroute.Handlers {
if (current != null) {
current.CustomPattern = String.Empty; // force the regeneration
current.DisplayAlias = _autorouteService.Value.GenerateAlias(current);
+
+ // we changed the alias of the previous homepage, so publish this change if the content item was published.
+ if(current.IsPublished())
+ _orchardServices.ContentManager.Publish(current.ContentItem);
}
_autorouteService.Value.PublishAlias(current);
}
diff --git a/src/Orchard.Web/Modules/Orchard.DesignerTools/Views/ShapeTracingTemplates.cshtml b/src/Orchard.Web/Modules/Orchard.DesignerTools/Views/ShapeTracingTemplates.cshtml
index 9a00a5a4e..8e8b0089a 100644
--- a/src/Orchard.Web/Modules/Orchard.DesignerTools/Views/ShapeTracingTemplates.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.DesignerTools/Views/ShapeTracingTemplates.cshtml
@@ -27,7 +27,7 @@
@T("Shape").Text
${shape.type}
@T("Active Template").Text
{{if shape.template != shape.originalTemplate}}
- @T("Original Template").Text Template
${shape.originalTemplate}
+ @T("Original Template").Text
${shape.originalTemplate}
{{/if}}
@T("Display Type").Text
${shape.displayType}
@T("Alternate ({0})", "${shape.alternates.length}").Text
diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/LayoutEditor.js b/src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/LayoutEditor.js
index d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gICAgICAgICByZXN0cmljdDogXCJFXCIsXHJcbiAgICAgICAgICAgICAgICBzY29wZTogeyBlbGVtZW50OiBcIj1cIiB9LFxyXG4gICAgICAgICAgICAgICAgY29udHJvbGxlcjogW1wiJHNjb3BlXCIsIFwiJGVsZW1lbnRcIixcclxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoJHNjb3BlLCAkZWxlbWVudCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZUNvbmZpZ3VyYXRvci5jb25maWd1cmVGb3JFbGVtZW50KCRzY29wZSwgJGVsZW1lbnQpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzY29wZUNvbmZpZ3VyYXRvci5jb25maWd1cmVGb3JDb250YWluZXIoJHNjb3BlLCAkZWxlbWVudCk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRzY29wZS5zb3J0YWJsZU9wdGlvbnNbXCJheGlzXCJdID0gXCJ5XCI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICRzY29wZS5lZGl0ID0gZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJHNjb3BlLiRyb290LmVkaXRFbGVtZW50KCRzY29wZS5lbGVtZW50KS50aGVuKGZ1bmN0aW9uIChhcmdzKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFyZ3MuY2FuY2VsKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHNjb3BlLiRhcHBseShmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHNjb3BlLmVsZW1lbnQuZGF0YSA9IGRlY29kZVVSSUNvbXBvbmVudChhcmdzLmVsZW1lbnQuZGF0YSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRzY29wZS5lbGVtZW50LmFwcGx5RWxlbWVudEVkaXRvck1vZGVsKGFyZ3MuZWxlbWVudEVkaXRvck1vZGVsKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIF0sXHJcbiAgICAgICAgICAgICAgICB0ZW1wbGF0ZVVybDogZW52aXJvbm1lbnQudGVtcGxhdGVVcmwoXCJGaWVsZHNldFwiKSxcclxuICAgICAgICAgICAgICAgIHJlcGxhY2U6IHRydWVcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9XHJcbiAgICBdKTsiLCJhbmd1bGFyXHJcbiAgICAubW9kdWxlKFwiTGF5b3V0RWRpdG9yXCIpXHJcbiAgICAuZGlyZWN0aXZlKFwib3JjTGF5b3V0Rm9ybVwiLCBbXCIkY29tcGlsZVwiLCBcInNjb3BlQ29uZmlndXJhdG9yXCIsIFwiZW52aXJvbm1lbnRcIixcclxuICAgICAgICBmdW5jdGlvbiAoJGNvbXBpbGUsIHNjb3BlQ29uZmlndXJhdG9yLCBlbnZpcm9ubWVudCkge1xyXG4gICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgcmVzdHJpY3Q6IFwiRVwiLFxyXG4gICAgICAgICAgICAgICAgc2NvcGU6IHsgZWxlbWVudDogXCI9XCIgfSxcclxuICAgICAgICAgICAgICAgIGNvbnRyb2xsZXI6IFtcIiRzY29wZVwiLCBcIiRlbGVtZW50XCIsXHJcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKCRzY29wZSwgJGVsZW1lbnQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGVDb25maWd1cmF0b3IuY29uZmlndXJlRm9yRWxlbWVudCgkc2NvcGUsICRlbGVtZW50KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGVDb25maWd1cmF0b3IuY29uZmlndXJlRm9yQ29udGFpbmVyKCRzY29wZSwgJGVsZW1lbnQpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkc2NvcGUuc29ydGFibGVPcHRpb25zW1wiYXhpc1wiXSA9IFwieVwiO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAkc2NvcGUuZWRpdCA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRzY29wZS4kcm9vdC5lZGl0RWxlbWVudCgkc2NvcGUuZWxlbWVudCkudGhlbihmdW5jdGlvbiAoYXJncykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhcmdzLmNhbmNlbClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkc2NvcGUuJGFwcGx5KGZ1bmN0aW9uKCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkc2NvcGUuZWxlbWVudC5kYXRhID0gZGVjb2RlVVJJQ29tcG9uZW50KGFyZ3MuZWxlbWVudC5kYXRhKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHNjb3BlLmVsZW1lbnQuYXBwbHlFbGVtZW50RWRpdG9yTW9kZWwoYXJncy5lbGVtZW50RWRpdG9yTW9kZWwpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgXSxcclxuICAgICAgICAgICAgICAgIHRlbXBsYXRlVXJsOiBlbnZpcm9ubWVudC50ZW1wbGF0ZVVybChcIkZvcm1cIiksXHJcbiAgICAgICAgICAgICAgICByZXBsYWNlOiB0cnVlXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgfVxyXG4gICAgXSk7Il0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/ValidationRules/StringLength.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/ValidationRules/StringLength.cs
index fd1dcd40d..3445893a3 100644
--- a/src/Orchard.Web/Modules/Orchard.DynamicForms/ValidationRules/StringLength.cs
+++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/ValidationRules/StringLength.cs
@@ -45,8 +45,10 @@ namespace Orchard.DynamicForms.ValidationRules {
if(Minimum != null && Maximum != null)
return T("{0} must be between {1} and {2} characters long.", context.FieldName, Minimum, Maximum);
+ else if (Minimum != null)
+ return T("{0} must be at least {1} characters long.", context.FieldName, Minimum);
- return T("{0} must be at least {1} characters long.", context.FieldName, Minimum);
+ return T("{0} must be at most {1} characters long.", context.FieldName, Maximum);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/gulpfile.js b/src/Orchard.Web/Modules/Orchard.DynamicForms/gulpfile.js
index 850ae4309..6f4f33a68 100644
--- a/src/Orchard.Web/Modules/Orchard.DynamicForms/gulpfile.js
+++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/gulpfile.js
@@ -14,12 +14,12 @@
var gulp = require("gulp"),
newer = require("gulp-newer"),
- minify = require("gulp-minify-css"),
- uglify = require("gulp-uglify"),
- rename = require("gulp-rename"),
- concat = require("gulp-concat"),
+ minify = require("gulp-minify-css"),
+ uglify = require("gulp-uglify"),
+ rename = require("gulp-rename"),
+ concat = require("gulp-concat"),
sourcemaps = require("gulp-sourcemaps"),
- merge = require("merge-stream");
+ merge = require("merge-stream");
/*
* General tasks.
@@ -43,11 +43,11 @@ var srcCss = [
gulp.task("buildCss", function () {
return gulp.src(srcCss)
- .pipe(minify())
- .pipe(rename({
- suffix: ".min"
- }))
- .pipe(gulp.dest("Styles"));
+ .pipe(minify())
+ .pipe(rename({
+ suffix: ".min"
+ }))
+ .pipe(gulp.dest("Styles"));
});
gulp.task("watchCss", function () {
@@ -62,9 +62,9 @@ gulp.task("watchCss", function () {
*/
var srcJsLib = [
- "Scripts/Lib/jquery.validate.js",
- "Scripts/Lib/jquery.validate.unobtrusive.additional.js",
- "Scripts/Lib/jquery.validate.unobtrusive.js"
+ "Scripts/Lib/jquery.validate.js",
+ "Scripts/Lib/jquery.validate.unobtrusive.additional.js",
+ "Scripts/Lib/jquery.validate.unobtrusive.js"
];
var srcJsLayoutEditor = [
@@ -90,12 +90,12 @@ function jsPipelineFrom(inputStream, outputFolder, outputFile) {
return inputStream
.pipe(newer(outputFolder + "/" + outputFile))
.pipe(sourcemaps.init())
- .pipe(concat(outputFile))
+ .pipe(concat(outputFile))
.pipe(sourcemaps.write())
- .pipe(gulp.dest(outputFolder))
- .pipe(uglify())
- .pipe(rename({
- suffix: ".min"
- }))
- .pipe(gulp.dest(outputFolder));
+ .pipe(gulp.dest(outputFolder))
+ .pipe(uglify())
+ .pipe(rename({
+ suffix: ".min"
+ }))
+ .pipe(gulp.dest(outputFolder));
}
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingTaskExecutor.cs b/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingTaskExecutor.cs
index a6bac99c8..3658a77ad 100644
--- a/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingTaskExecutor.cs
+++ b/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingTaskExecutor.cs
@@ -174,18 +174,18 @@ namespace Orchard.Indexing.Services {
var settings = GetTypeIndexingSettings(item);
- // skip items from types which are not indexed
+ // skip items from types which are not indexed
if (settings.List.Contains(indexName)) {
- if (item.HasPublished()) {
- var published = _contentManager.Get(item.Id, VersionOptions.Published);
- IDocumentIndex documentIndex = ExtractDocumentIndex(published);
+ if (item.HasPublished()) {
+ var published = _contentManager.Get(item.Id, VersionOptions.Published);
+ IDocumentIndex documentIndex = ExtractDocumentIndex(published);
- if (documentIndex != null && documentIndex.IsDirty) {
- addToIndex.Add(documentIndex);
+ if (documentIndex != null && documentIndex.IsDirty) {
+ addToIndex.Add(documentIndex);
+ }
}
}
- }
- else if (settings.List.Contains(indexName + ":latest")) {
+ else if (settings.List.Contains(indexName + ":latest")) {
IDocumentIndex documentIndex = ExtractDocumentIndex(item);
if (documentIndex != null && documentIndex.IsDirty) {
@@ -205,8 +205,7 @@ namespace Orchard.Indexing.Services {
}
else {
_transactionManager.RequireNew();
- }
-
+ }
} while (loop);
}
@@ -238,10 +237,10 @@ namespace Orchard.Indexing.Services {
if (settings.List.Contains(indexName)) {
documentIndex = ExtractDocumentIndex(item.ContentItem);
}
- else if (settings.List.Contains(indexName + ":latest")) {
- var latest = _contentManager.Get(item.Id, VersionOptions.Latest);
- documentIndex = ExtractDocumentIndex(latest);
- }
+ else if (settings.List.Contains(indexName + ":latest")) {
+ var latest = _contentManager.Get(item.Id, VersionOptions.Latest);
+ documentIndex = ExtractDocumentIndex(latest);
+ }
}
if (documentIndex == null || item.Delete) {
@@ -264,8 +263,8 @@ namespace Orchard.Indexing.Services {
else {
_transactionManager.RequireNew();
}
- }
- while (loop);
+
+ } while (loop);
}
// save current state of the index
diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/_references.js b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/_references.js
index 8641f7da4..b79d85589 100644
--- a/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/_references.js
+++ b/src/Orchard.Web/Modules/Orchard.Layouts/Scripts/_references.js
@@ -1,5 +1,4 @@
///
-///
///
///
///
diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/gulpfile.js b/src/Orchard.Web/Modules/Orchard.Layouts/gulpfile.js
index f3eaf718a..dd1703103 100644
--- a/src/Orchard.Web/Modules/Orchard.Layouts/gulpfile.js
+++ b/src/Orchard.Web/Modules/Orchard.Layouts/gulpfile.js
@@ -14,15 +14,15 @@
var gulp = require("gulp"),
newer = require("gulp-newer"),
- plumber = require("gulp-plumber"),
+ plumber = require("gulp-plumber"),
sourcemaps = require("gulp-sourcemaps"),
less = require("gulp-less"),
- autoprefixer = require("gulp-autoprefixer"),
- minify = require("gulp-minify-css"),
- uglify = require("gulp-uglify"),
- rename = require("gulp-rename"),
- concat = require("gulp-concat"),
- merge = require("merge-stream")
+ autoprefixer = require("gulp-autoprefixer"),
+ minify = require("gulp-minify-css"),
+ uglify = require("gulp-uglify"),
+ rename = require("gulp-rename"),
+ concat = require("gulp-concat"),
+ merge = require("merge-stream");
/*
* General tasks.
@@ -72,18 +72,18 @@ gulp.task("watchLess", function () {
function lessPipelineFrom(inputStream, outputFolder, outputFile) {
return inputStream
.pipe(newer(outputFolder + "/" + outputFile))
- .pipe(plumber())
+ .pipe(plumber())
.pipe(sourcemaps.init())
- .pipe(less())
- .pipe(concat(outputFile))
- .pipe(autoprefixer({ browsers: ["last 2 versions"] }))
+ .pipe(less())
+ .pipe(concat(outputFile))
+ .pipe(autoprefixer({ browsers: ["last 2 versions"] }))
.pipe(sourcemaps.write())
- .pipe(gulp.dest(outputFolder))
- .pipe(minify())
- .pipe(rename({
- suffix: ".min"
- }))
- .pipe(gulp.dest(outputFolder));
+ .pipe(gulp.dest(outputFolder))
+ .pipe(minify())
+ .pipe(rename({
+ suffix: ".min"
+ }))
+ .pipe(gulp.dest(outputFolder));
}
/*
@@ -91,11 +91,11 @@ function lessPipelineFrom(inputStream, outputFolder, outputFile) {
*/
var srcJsLib = [
- "Scripts/Lib/underscore.js",
- "Scripts/Lib/angular.js",
- "Scripts/Lib/angular-sanitize.js",
- "Scripts/Lib/angular-resource.js",
- "Scripts/Lib/sortable.js"
+ "Scripts/Lib/underscore.js",
+ "Scripts/Lib/angular.js",
+ "Scripts/Lib/angular-sanitize.js",
+ "Scripts/Lib/angular-resource.js",
+ "Scripts/Lib/sortable.js"
];
var srcJsLayoutEditor = [
@@ -146,14 +146,14 @@ gulp.task("watchJs", function () {
function jsPipelineFrom(inputStream, outputFolder, outputFile) {
return inputStream
.pipe(newer(outputFolder + "/" + outputFile))
- .pipe(plumber())
+ .pipe(plumber())
.pipe(sourcemaps.init())
- .pipe(concat(outputFile))
+ .pipe(concat(outputFile))
.pipe(sourcemaps.write())
- .pipe(gulp.dest(outputFolder))
- .pipe(uglify())
- .pipe(rename({
- suffix: ".min"
- }))
- .pipe(gulp.dest(outputFolder));
+ .pipe(gulp.dest(outputFolder))
+ .pipe(uglify())
+ .pipe(rename({
+ suffix: ".min"
+ }))
+ .pipe(gulp.dest(outputFolder));
}
diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/package.json b/src/Orchard.Web/Modules/Orchard.Layouts/package.json
index 56b6e9617..83f5ff64a 100644
--- a/src/Orchard.Web/Modules/Orchard.Layouts/package.json
+++ b/src/Orchard.Web/Modules/Orchard.Layouts/package.json
@@ -10,7 +10,8 @@
"gulp-uglify": "^1.2.0",
"gulp-rename": "^1.2.2",
"gulp-concat": "^2.5.2",
- "merge-stream": "^0.1.7"
+ "merge-stream": "^0.1.7",
+ "del": "^1.1.1"
},
"dependencies": { }
}
diff --git a/src/Orchard.Web/Modules/Orchard.Localization/Drivers/LocalizationPartDriver.cs b/src/Orchard.Web/Modules/Orchard.Localization/Drivers/LocalizationPartDriver.cs
index b4a06897c..b6854a51d 100644
--- a/src/Orchard.Web/Modules/Orchard.Localization/Drivers/LocalizationPartDriver.cs
+++ b/src/Orchard.Web/Modules/Orchard.Localization/Drivers/LocalizationPartDriver.cs
@@ -59,8 +59,9 @@ namespace Orchard.Localization.Drivers {
protected override DriverResult Editor(LocalizationPart part, IUpdateModel updater, dynamic shapeHelper) {
var model = new EditLocalizationViewModel();
- // Content culture has to be set only if it's not set already.
- if (updater != null && updater.TryUpdateModel(model, TemplatePrefix, null, null) && GetCulture(part) == null) {
+ // GetCulture(part) is checked against null value, because the content culture has to be set only if it's not set already.
+ // model.SelectedCulture is checked against null value, because the editor group may not contain LocalizationPart when the content item is saved for the first time.
+ if (updater != null && updater.TryUpdateModel(model, TemplatePrefix, null, null) && GetCulture(part) == null && !string.IsNullOrEmpty(model.SelectedCulture)) {
_localizationService.SetContentCulture(part, model.SelectedCulture);
}