diff --git a/README.md b/README.md index fd0bc053d..6d9b34f6a 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,7 @@ Our mission is to empower our users and foster a dedicated and diverse community ## Project Status -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.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*. +Orchard is currently in version **[1.10.1](https://github.com/OrchardCMS/Orchard/releases/tag/1.10.1)**: It contains bugfixes and the more impactful changes and new features added in the latest major version (*1.10*). We invite participation by the developer community in shaping the project’s direction, so that we can publicly validate our designs and development approach. All our releases are available on our [Releases](https://github.com/OrchardCMS/Orchard/releases) page, and it's easy to [Install Orchard using the Web Platform Installer](http://docs.orchardproject.net/Documentation/Installing-Orchard) as well. We encourage interested developers to check out the source code on the Orchard GitHub site and get involved with the project. diff --git a/src/Orchard.Web/Config/log4net.Release.config b/src/Orchard.Web/Config/log4net.Release.config index 513756754..c96a859e0 100644 --- a/src/Orchard.Web/Config/log4net.Release.config +++ b/src/Orchard.Web/Config/log4net.Release.config @@ -1,9 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/Orchard.Web/Core/Contents/Views/Content.Summary.cshtml b/src/Orchard.Web/Core/Contents/Views/Content.Summary.cshtml index 0c5b8efa9..1d008f869 100644 --- a/src/Orchard.Web/Core/Contents/Views/Content.Summary.cshtml +++ b/src/Orchard.Web/Core/Contents/Views/Content.Summary.cshtml @@ -1,8 +1,12 @@ @using Orchard.Utility.Extensions; @{ var contentTypeClassName = ((string)Model.ContentItem.ContentType).HtmlClassify(); + Model.Classes.Add(contentTypeClassName); + Model.Classes.Add("content-item"); + + var tag = Tag(Model, "article"); } -
+@tag.StartElement
@Display(Model.Header) @if (Model.Meta != null) { @@ -17,4 +21,4 @@ @Display(Model.Footer) } -
\ No newline at end of file +@tag.EndElement diff --git a/src/Orchard.Web/Modules/Lucene/Services/LuceneIndexProvider.cs b/src/Orchard.Web/Modules/Lucene/Services/LuceneIndexProvider.cs index 32f858829..1bf2be810 100644 --- a/src/Orchard.Web/Modules/Lucene/Services/LuceneIndexProvider.cs +++ b/src/Orchard.Web/Modules/Lucene/Services/LuceneIndexProvider.cs @@ -168,7 +168,7 @@ namespace Lucene.Services { writer.DeleteDocuments(query); } catch (Exception ex) { - Logger.Error(ex, "An unexpected error occured while removing the documents [{0}] from the index [{1}].", String.Join(", ", documentIds), indexName); + Logger.Error(ex, "An unexpected error occurred while removing the documents [{0}] from the index [{1}].", String.Join(", ", documentIds), indexName); } } } diff --git a/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs index 41d7b76b6..880b0cb09 100644 --- a/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Alias/Controllers/AdminController.cs @@ -172,8 +172,8 @@ namespace Orchard.Alias.Controllers { } catch (Exception ex) { Services.TransactionManager.Cancel(); - Services.Notifier.Error(T("An error occured while creating the alias {0}: {1}. Please check the values are correct.", aliasPath, ex.Message)); - Logger.Error(ex, T("An error occured while creating the alias {0}", aliasPath).Text); + Services.Notifier.Error(T("An error occurred while creating the alias {0}: {1}. Please check the values are correct.", aliasPath, ex.Message)); + Logger.Error(ex, T("An error occurred while creating the alias {0}", aliasPath).Text); ViewBag.Path = aliasPath; ViewBag.Route = routePath; @@ -236,8 +236,8 @@ namespace Orchard.Alias.Controllers { } catch (Exception ex) { Services.TransactionManager.Cancel(); - Services.Notifier.Error(T("An error occured while editing the alias '{0}': {1}. Please check the values are correct.", aliasPath, ex.Message)); - Logger.Error(ex, T("An error occured while creating the alias '{0}'", aliasPath).Text); + Services.Notifier.Error(T("An error occurred while editing the alias '{0}': {1}. Please check the values are correct.", aliasPath, ex.Message)); + Logger.Error(ex, T("An error occurred while creating the alias '{0}'", aliasPath).Text); ViewBag.Path = aliasPath; ViewBag.Route = routePath; diff --git a/src/Orchard.Web/Modules/Orchard.AntiSpam/Services/AkismetApiSpamFilter.cs b/src/Orchard.Web/Modules/Orchard.AntiSpam/Services/AkismetApiSpamFilter.cs index 76d3779e7..41c19db6d 100644 --- a/src/Orchard.Web/Modules/Orchard.AntiSpam/Services/AkismetApiSpamFilter.cs +++ b/src/Orchard.Web/Modules/Orchard.AntiSpam/Services/AkismetApiSpamFilter.cs @@ -36,7 +36,7 @@ namespace Orchard.AntiSpam.Services { return SpamStatus.Ham; } catch(Exception e) { - Logger.Error(e, "An error occured while checking for spam"); + Logger.Error(e, "An error occurred while checking for spam"); return SpamStatus.Spam; } } @@ -46,7 +46,7 @@ namespace Orchard.AntiSpam.Services { var result = ExecuteValidateRequest(context, "submit-spam"); } catch (Exception e) { - Logger.Error(e, "An error occured while reporting spam"); + Logger.Error(e, "An error occurred while reporting spam"); } } @@ -55,7 +55,7 @@ namespace Orchard.AntiSpam.Services { var result = ExecuteValidateRequest(context, "submit-ham"); } catch (Exception e) { - Logger.Error(e, "An error occured while reporting ham"); + Logger.Error(e, "An error occurred while reporting ham"); } } diff --git a/src/Orchard.Web/Modules/Orchard.Azure/Services/FileSystems/AzureFileSystem.cs b/src/Orchard.Web/Modules/Orchard.Azure/Services/FileSystems/AzureFileSystem.cs index 8b6a9e717..cfb2837aa 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure/Services/FileSystems/AzureFileSystem.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure/Services/FileSystems/AzureFileSystem.cs @@ -82,7 +82,7 @@ namespace Orchard.Azure.Services.FileSystems { private static string ConvertToRelativeUriPath(string path) { var newPath = path.Replace(@"\", "/"); - if (newPath.StartsWith("/") || newPath.StartsWith("http://") || newPath.StartsWith("https://")) { + if (newPath.StartsWith("/", StringComparison.OrdinalIgnoreCase) || newPath.StartsWith("http://", StringComparison.OrdinalIgnoreCase) || newPath.StartsWith("https://", StringComparison.OrdinalIgnoreCase)) { throw new ArgumentException("Path must be relative"); } @@ -106,7 +106,7 @@ namespace Orchard.Azure.Services.FileSystems { return path2; } - if (path2.StartsWith("http://") || path2.StartsWith("https://")) { + if (path2.StartsWith("http://", StringComparison.OrdinalIgnoreCase) || path2.StartsWith("https://", StringComparison.OrdinalIgnoreCase)) { return path2; } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Commands/BlogCommands.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Commands/BlogCommands.cs index 3fcf7d7b5..59c2315b5 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Commands/BlogCommands.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Commands/BlogCommands.cs @@ -134,7 +134,7 @@ namespace Orchard.Blogs.Commands { Context.Output.WriteLine(T("Found {0} items", doc.Descendants("item").Count())); } catch (Exception ex) { - throw new OrchardException(T("An error occured while loading the feed at {0}.", FeedUrl), ex); + throw new OrchardException(T("An error occurred while loading the feed at {0}.", FeedUrl), ex); } var blog = _blogService.Get(BlogId, VersionOptions.Latest); diff --git a/src/Orchard.Web/Modules/Orchard.CodeGeneration/Commands/CodeGenerationCommands.cs b/src/Orchard.Web/Modules/Orchard.CodeGeneration/Commands/CodeGenerationCommands.cs index 0be4e98ab..5f5501776 100644 --- a/src/Orchard.Web/Modules/Orchard.CodeGeneration/Commands/CodeGenerationCommands.cs +++ b/src/Orchard.Web/Modules/Orchard.CodeGeneration/Commands/CodeGenerationCommands.cs @@ -517,7 +517,7 @@ namespace Orchard.CodeGeneration.Commands { File.SetLastWriteTime(solutionPath, DateTime.Now); } catch { - output.WriteLine(T("An unexpected error occured while trying to refresh the Visual Studio solution. Please reload it.")); + output.WriteLine(T("An unexpected error occurred while trying to refresh the Visual Studio solution. Please reload it.")); } } } diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentService.cs b/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentService.cs index 53f9f0f4c..02dd576f1 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentService.cs +++ b/src/Orchard.Web/Modules/Orchard.Comments/Services/CommentService.cs @@ -241,7 +241,7 @@ namespace Orchard.Comments.Services { _messageService.Send("Email", parameters); } catch(Exception e) { - Logger.Error(e, "An unexpected error occured while sending a notification email"); + Logger.Error(e, "An unexpected error occurred while sending a notification email"); } } diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs index 2f446f115..59d183366 100644 --- a/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Indexing/Controllers/AdminController.cs @@ -83,8 +83,8 @@ namespace Orchard.Indexing.Controllers { Services.Notifier.Success(T("Index named {0} created successfully", id)); } catch(Exception e) { - Services.Notifier.Error(T("An error occured while creating the index: {0}", id)); - Logger.Error("An error occured while creatign the index " + id, e); + Services.Notifier.Error(T("An error occurred while creating the index: {0}", id)); + Logger.Error("An error occurred while creatign the index " + id, e); return View("Create", id); } diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingTaskExecutor.cs b/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingTaskExecutor.cs index e55036916..b62583d79 100644 --- a/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingTaskExecutor.cs +++ b/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexingTaskExecutor.cs @@ -288,7 +288,7 @@ namespace Orchard.Indexing.Services { } } catch (Exception ex) { - Logger.Warning(ex, "An error occured while adding a document to the index"); + Logger.Warning(ex, "An error occurred while adding a document to the index"); } // removing documents from the index @@ -299,7 +299,7 @@ namespace Orchard.Indexing.Services { } } catch (Exception ex) { - Logger.Warning(ex, "An error occured while removing a document from the index"); + Logger.Warning(ex, "An error occurred while removing a document from the index"); } return true; diff --git a/src/Orchard.Web/Modules/Orchard.Layouts/Helpers/TagBuilderExtensions.cs b/src/Orchard.Web/Modules/Orchard.Layouts/Helpers/TagBuilderExtensions.cs index e8b8675a0..f053f3678 100644 --- a/src/Orchard.Web/Modules/Orchard.Layouts/Helpers/TagBuilderExtensions.cs +++ b/src/Orchard.Web/Modules/Orchard.Layouts/Helpers/TagBuilderExtensions.cs @@ -14,9 +14,10 @@ namespace Orchard.Layouts.Helpers { public static OrchardTagBuilder CreateElementTagBuilder(dynamic shape, string tag = "div") { return AddCommonElementAttributes(new OrchardTagBuilder(tag), shape); } - + public static OrchardTagBuilder AddCommonElementAttributes(this OrchardTagBuilder tagBuilder, dynamic shape) { var attributes = GetCommonElementAttributes(shape); + tagBuilder.MergeAttributes(shape.Attributes); tagBuilder.MergeAttributes(attributes); return tagBuilder; } @@ -46,7 +47,7 @@ namespace Orchard.Layouts.Helpers { classes.Add(cssClass); } - if(classes.Any()) + if (classes.Any()) attributes["class"] = String.Join(" ", classes); return attributes; diff --git a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Shapes/MediaShapes.cs b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Shapes/MediaShapes.cs index 32e004055..c2d640bce 100644 --- a/src/Orchard.Web/Modules/Orchard.MediaProcessing/Shapes/MediaShapes.cs +++ b/src/Orchard.Web/Modules/Orchard.MediaProcessing/Shapes/MediaShapes.cs @@ -54,7 +54,7 @@ namespace Orchard.MediaProcessing.Shapes { Output.Write(_imageProfileManager.Value.GetImageProfileUrl(Path, Profile, CustomFilter, ContentItem)); } catch (Exception ex) { - Logger.Error(ex, "An error occured while rendering shape {0} for image {1}", Profile, Path); + Logger.Error(ex, "An error occurred while rendering shape {0} for image {1}", Profile, Path); } } diff --git a/src/Orchard.Web/Modules/Orchard.MessageBus/Brokers/SqlServer/SqlServerBroker.cs b/src/Orchard.Web/Modules/Orchard.MessageBus/Brokers/SqlServer/SqlServerBroker.cs index cdecaab18..fdb058474 100644 --- a/src/Orchard.Web/Modules/Orchard.MessageBus/Brokers/SqlServer/SqlServerBroker.cs +++ b/src/Orchard.Web/Modules/Orchard.MessageBus/Brokers/SqlServer/SqlServerBroker.cs @@ -82,7 +82,7 @@ namespace Orchard.MessageBus.Brokers.SqlServer { } } catch(Exception e) { - Logger.Error(e, "An error occured while creating a Worker."); + Logger.Error(e, "An error occurred while creating a Worker."); } } diff --git a/src/Orchard.Web/Modules/Orchard.MessageBus/Brokers/SqlServer/Worker.cs b/src/Orchard.Web/Modules/Orchard.MessageBus/Brokers/SqlServer/Worker.cs index fe8980008..92febc12d 100644 --- a/src/Orchard.Web/Modules/Orchard.MessageBus/Brokers/SqlServer/Worker.cs +++ b/src/Orchard.Web/Modules/Orchard.MessageBus/Brokers/SqlServer/Worker.cs @@ -72,7 +72,7 @@ namespace Orchard.MessageBus.Brokers.SqlServer { } catch (Exception e) { - Logger.Error(e, "An unexpected error occured while monitoring sql dependencies."); + Logger.Error(e, "An unexpected error occurred while monitoring sql dependencies."); } } diff --git a/src/Orchard.Web/Modules/Orchard.Migrations/Commands/DataMigrationCommands.cs b/src/Orchard.Web/Modules/Orchard.Migrations/Commands/DataMigrationCommands.cs index f128be779..f561ef4e5 100644 --- a/src/Orchard.Web/Modules/Orchard.Migrations/Commands/DataMigrationCommands.cs +++ b/src/Orchard.Web/Modules/Orchard.Migrations/Commands/DataMigrationCommands.cs @@ -33,7 +33,7 @@ namespace Orchard.Migrations.Commands { } } catch ( Exception ex ) { - throw new OrchardException(T("An error occured while upgrading the database."), ex); + throw new OrchardException(T("An error occurred while upgrading the database."), ex); } Context.Output.WriteLine(T("Database upgraded")); diff --git a/src/Orchard.Web/Modules/Orchard.Migrations/Commands/DatabaseUpdateCommands.cs b/src/Orchard.Web/Modules/Orchard.Migrations/Commands/DatabaseUpdateCommands.cs index 85b9376f3..2c1586b68 100644 --- a/src/Orchard.Web/Modules/Orchard.Migrations/Commands/DatabaseUpdateCommands.cs +++ b/src/Orchard.Web/Modules/Orchard.Migrations/Commands/DatabaseUpdateCommands.cs @@ -29,7 +29,7 @@ namespace Orchard.Migrations.Commands { _schemaCommandGenerator.UpdateDatabase(); } catch ( Exception ex ) { - throw new OrchardException(T("An error occured while updating the database."), ex); + throw new OrchardException(T("An error occurred while updating the database."), ex); } Context.Output.WriteLine(T("Database updated")); @@ -54,7 +54,7 @@ namespace Orchard.Migrations.Commands { } } catch ( Exception ex ) { - throw new OrchardException(T("An error occured while creating the tables."), ex); + throw new OrchardException(T("An error occurred while creating the tables."), ex); } Context.Output.WriteLine(T("Tables created")); diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs index 3ebd12623..20e6061db 100644 --- a/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Modules/Controllers/AdminController.cs @@ -232,7 +232,7 @@ namespace Orchard.Modules.Controllers { Services.Notifier.Success(T("The feature {0} was updated successfully", id)); } catch (Exception exception) { - Services.Notifier.Error(T("An error occured while updating the feature {0}: {1}", id, exception.Message)); + Services.Notifier.Error(T("An error occurred while updating the feature {0}: {1}", id, exception.Message)); } } break; diff --git a/src/Orchard.Web/Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs b/src/Orchard.Web/Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs index 21fc75f5d..620fb6a03 100644 --- a/src/Orchard.Web/Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs +++ b/src/Orchard.Web/Modules/Orchard.OutputCache/Filters/OutputCacheFilter.cs @@ -226,6 +226,12 @@ namespace Orchard.OutputCache.Filters { // To prevent access to the original lifetime scope a new work context scope should be created here and dependencies // should be resolved from it. + // Recheck the response status code incase it was modified before the callback. + if (response.StatusCode != 200) { + Logger.Debug("Response for item '{0}' will not be cached because status code was set to {1} during rendering.", _cacheKey, response.StatusCode); + return; + } + using (var scope = _workContextAccessor.CreateWorkContextScope()) { var cacheItem = new CacheItem() { CachedOnUtc = _now, @@ -613,7 +619,7 @@ namespace Orchard.OutputCache.Filters { return cacheItem; } catch (Exception e) { - Logger.Error(e, "An unexpected error occured while reading a cache entry"); + Logger.Error(e, "An unexpected error occurred while reading a cache entry"); } return null; diff --git a/src/Orchard.Web/Modules/Orchard.Projections/FilterEditors/Forms/StringFilterForm.cs b/src/Orchard.Web/Modules/Orchard.Projections/FilterEditors/Forms/StringFilterForm.cs index 225903263..bd13ead9c 100644 --- a/src/Orchard.Web/Modules/Orchard.Projections/FilterEditors/Forms/StringFilterForm.cs +++ b/src/Orchard.Web/Modules/Orchard.Projections/FilterEditors/Forms/StringFilterForm.cs @@ -69,6 +69,8 @@ namespace Orchard.Projections.FilterEditors.Forms { case StringOperator.Contains: return x => x.Like(property, Convert.ToString(value), HqlMatchMode.Anywhere); case StringOperator.ContainsAny: + if (string.IsNullOrEmpty((string)value)) + return x => x.Eq("Id", "0"); var values1 = Convert.ToString(value).Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); var predicates1 = values1.Skip(1).Select>(x => y => y.Like(property, x, HqlMatchMode.Anywhere)).ToArray(); return x => x.Disjunction(y => y.Like(property, values1[0], HqlMatchMode.Anywhere), predicates1); diff --git a/src/Orchard.Web/Modules/Orchard.Redis/MessageBus/RedisMessageBusBroker.cs b/src/Orchard.Web/Modules/Orchard.Redis/MessageBus/RedisMessageBusBroker.cs index 804d38a1a..99128a279 100644 --- a/src/Orchard.Web/Modules/Orchard.Redis/MessageBus/RedisMessageBusBroker.cs +++ b/src/Orchard.Web/Modules/Orchard.Redis/MessageBus/RedisMessageBusBroker.cs @@ -67,7 +67,7 @@ namespace Orchard.Redis.MessageBus { } catch (Exception e) { - Logger.Error(e, "An error occured while subscribing to " + channel); + Logger.Error(e, "An error occurred while subscribing to " + channel); } } diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs b/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs index f8fa41c59..ceeeb163d 100644 --- a/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs +++ b/src/Orchard.Web/Modules/Orchard.Setup/Services/SetupService.cs @@ -128,7 +128,7 @@ namespace Orchard.Setup.Services { using (var environment = bootstrapLifetimeScope.CreateWorkContextScope()) { - // Check if the database is already created (in case an exception occured in the second phase). + // Check if the database is already created (in case an exception occurred in the second phase). var schemaBuilder = new SchemaBuilder(environment.Resolve()); var installationPresent = true; try { diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs index 991d357b6..061f886a4 100644 --- a/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Themes/Controllers/AdminController.cs @@ -249,8 +249,8 @@ namespace Orchard.Themes.Controllers { Services.Notifier.Success(T("The theme {0} was updated successfully", themeId)); Logger.Information("The theme {0} was updated successfully.", themeId); } catch (Exception exception) { - Logger.Error(T("An error occured while updating the theme {0}: {1}", themeId, exception.Message).Text); - Services.Notifier.Error(T("An error occured while updating the theme {0}: {1}", themeId, exception.Message)); + Logger.Error(T("An error occurred while updating the theme {0}: {1}", themeId, exception.Message).Text); + Services.Notifier.Error(T("An error occurred while updating the theme {0}: {1}", themeId, exception.Message)); } return RedirectToAction("Index"); diff --git a/src/Orchard.Web/Modules/Orchard.Users/Activities/CreateUserActivity.cs b/src/Orchard.Web/Modules/Orchard.Users/Activities/CreateUserActivity.cs index 8ef1512ef..2bfcea843 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Activities/CreateUserActivity.cs +++ b/src/Orchard.Web/Modules/Orchard.Users/Activities/CreateUserActivity.cs @@ -67,6 +67,8 @@ namespace Orchard.Users.Activities { yield break; } + userName = userName.Trim(); + var user = _membershipService.CreateUser( new CreateUserParams( userName, diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Items/Content-User.Edit.cshtml b/src/Orchard.Web/Modules/Orchard.Users/Views/Items/Content-User.Edit.cshtml index 493cbc636..11cb50133 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Views/Items/Content-User.Edit.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Items/Content-User.Edit.cshtml @@ -5,4 +5,7 @@
@Display(Model.Sidebar)
- \ No newline at end of file + +@if (!String.IsNullOrWhiteSpace(Request.QueryString["returnUrl"])) { + @Html.Hidden("returnUrl", Request.QueryString["returnUrl"]) +} diff --git a/src/Orchard.Web/Modules/Orchard.Warmup/Services/WebDownloader.cs b/src/Orchard.Web/Modules/Orchard.Warmup/Services/WebDownloader.cs index 3a9411824..f0067c0dc 100644 --- a/src/Orchard.Web/Modules/Orchard.Warmup/Services/WebDownloader.cs +++ b/src/Orchard.Web/Modules/Orchard.Warmup/Services/WebDownloader.cs @@ -41,7 +41,7 @@ namespace Orchard.Warmup.Services { return null; } catch(Exception e) { - Logger.Error(e, "An error occured while downloading url: {0}", url); + Logger.Error(e, "An error occurred while downloading url: {0}", url); return null; } } diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Layouts/Providers/WidgetElementHarvester.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Layouts/Providers/WidgetElementHarvester.cs index b5578837a..42ccb9084 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Layouts/Providers/WidgetElementHarvester.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Layouts/Providers/WidgetElementHarvester.cs @@ -56,7 +56,7 @@ namespace Orchard.Widgets.Layouts.Providers { ? _contentManager.Value.Get(widgetId.Value, versionOptions) : _contentManager.Value.New(contentTypeName); - var widgetShape = widget != null ? _contentManager.Value.BuildDisplay(widget) : default(dynamic); + var widgetShape = widget != null ? _contentManager.Value.BuildDisplay(widget, context.DisplayType) : default(dynamic); context.ElementShape.Widget = widget; context.ElementShape.WidgetShape = widgetShape; } diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Views/EditorTemplates/Parts.Widgets.LayerPart.cshtml b/src/Orchard.Web/Modules/Orchard.Widgets/Views/EditorTemplates/Parts.Widgets.LayerPart.cshtml index 4bc79214a..35134b094 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Views/EditorTemplates/Parts.Widgets.LayerPart.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Views/EditorTemplates/Parts.Widgets.LayerPart.cshtml @@ -15,5 +15,5 @@
@Html.LabelFor(layer => layer.LayerRule, T("Layer Rule")) @Html.TextAreaFor(layer => layer.LayerRule, new { spellcheck = "false" }) - @T("An expression that evaluates to true when the widgets in this layer must be displayed. See http://docs.orchardproject.net/Documentation/Managing-widgets#AddingaLayer for more information.") + @T("An expression that evaluates to true when the widgets in this layer must be displayed. See http://docs.orchardproject.net/en/latest/Documentation/Managing-widgets/#adding-a-layer for more information.")
diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Views/Elements/Widget.Design.cshtml b/src/Orchard.Web/Modules/Orchard.Widgets/Views/Elements/Widget.Design.cshtml index f109e9b73..faf4bfc91 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Views/Elements/Widget.Design.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Views/Elements/Widget.Design.cshtml @@ -4,9 +4,9 @@ }
@if (widget != null) { - @String.Format("{0} - {1}", Html.ItemDisplayText(widget), widget.TypeDefinition.DisplayName) + @T("{0} - {1}", Html.ItemDisplayText(widget), widget.TypeDefinition.DisplayName) } else { @T("Widget Not Found"); } -
\ No newline at end of file + diff --git a/src/Orchard.Web/Modules/TinyMce/Assets/Less/orchard-tinymce.css b/src/Orchard.Web/Modules/TinyMce/Assets/Less/orchard-tinymce.css index e0501ffdf..50691392a 100644 --- a/src/Orchard.Web/Modules/TinyMce/Assets/Less/orchard-tinymce.css +++ b/src/Orchard.Web/Modules/TinyMce/Assets/Less/orchard-tinymce.css @@ -2,11 +2,9 @@ top: 0; position: fixed; background-color: white; + border-top: 1px solid #9e9e9e; + border-bottom: 1px solid #9e9e9e; } #stickyContainer.container-layout { width: 100%; -} -#stickyContainer.sticky-container-layout { - border-top: 1px solid #9e9e9e; - border-bottom: 1px solid #9e9e9e; } \ No newline at end of file diff --git a/src/Orchard.Web/Modules/TinyMce/Assets/Less/orchard-tinymce.less b/src/Orchard.Web/Modules/TinyMce/Assets/Less/orchard-tinymce.less index 4cf833fb3..3f6a62441 100644 --- a/src/Orchard.Web/Modules/TinyMce/Assets/Less/orchard-tinymce.less +++ b/src/Orchard.Web/Modules/TinyMce/Assets/Less/orchard-tinymce.less @@ -2,11 +2,9 @@ top: 0; position: fixed; background-color: white; + border-top: 1px solid #9e9e9e; + border-bottom: 1px solid #9e9e9e; } #stickyContainer.container-layout { width: 100%; } -#stickyContainer.sticky-container-layout { - border-top: 1px solid #9e9e9e; - border-bottom: 1px solid #9e9e9e; -} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/TinyMce/Assets/Less/orchard-tinymce.min.css b/src/Orchard.Web/Modules/TinyMce/Assets/Less/orchard-tinymce.min.css index 152e1faf0..369fb45a3 100644 --- a/src/Orchard.Web/Modules/TinyMce/Assets/Less/orchard-tinymce.min.css +++ b/src/Orchard.Web/Modules/TinyMce/Assets/Less/orchard-tinymce.min.css @@ -1 +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;} \ No newline at end of file +#stickyContainer.sticky-top{top:0;position:fixed;background-color:#fff;border-top:1px solid #9e9e9e;border-bottom:1px solid #9e9e9e;}#stickyContainer.container-layout{width:100%;} \ No newline at end of file diff --git a/src/Orchard.Web/Modules/TinyMce/Scripts/orchard-tinymce.js b/src/Orchard.Web/Modules/TinyMce/Scripts/orchard-tinymce.js index aeb3f6c97..d178c28fd 100644 --- a/src/Orchard.Web/Modules/TinyMce/Scripts/orchard-tinymce.js +++ b/src/Orchard.Web/Modules/TinyMce/Scripts/orchard-tinymce.js @@ -34,51 +34,75 @@ tinyMCE.init({ $(document).bind("localization.ui.directionalitychanged", function(event, directionality) { editor.getBody().dir = directionality; }); + + // If the focused 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. + + editor.on('focus', function () { + var $contentArea = $(this.contentAreaContainer.parentElement); + stickyToolbar($contentArea); + }); + + editor.on('blur', function () { + var $contentArea = $(this.contentAreaContainer.parentElement); + var isAdded = false; + $contentArea.prepend($contentArea.find("div.mce-toolbar-grp")); + $contentArea.prepend($contentArea.find("div.mce-menubar")); + $("#stickyContainer").remove(); + $("#stickyPlaceholder").remove(); + }); + + function stickyToolbar($contentArea) { + var $container = $("
", { id: "stickyContainer", class: "container-layout" }); + + $contentArea.prepend($container); + $container.append($contentArea.find("div.mce-menubar")); + $container.append($contentArea.find("div.mce-toolbar-grp")); + + var $containerPosition = $container.offset(); + var $placeholder = $("
", { id: "stickyPlaceholder" }); + var isAdded = false; + + if ($(window).scrollTop() >= $containerPosition.top && !isAdded) { + $container.addClass("sticky-top"); + $placeholder.insertBefore($container); + $container.width($placeholder.width()); + $placeholder.height($container.height()); + } + + $(window).scroll(function (event) { + var $statusbarPosition = $contentArea.find("div.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()); + }); + isAdded = true; + } else if ($(window).scrollTop() < $containerPosition.top && isAdded) { + $container.removeClass("sticky-top"); + $placeholder.remove(); + $(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(); + } + }); + } } }); -// 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 = $("
", { 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 = $("
"); - 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(); - } - }); -}); diff --git a/src/Orchard.Web/Modules/TinyMce/Styles/orchard-tinymce.css b/src/Orchard.Web/Modules/TinyMce/Styles/orchard-tinymce.css index bb0acd05e..4466db7ac 100644 --- a/src/Orchard.Web/Modules/TinyMce/Styles/orchard-tinymce.css +++ b/src/Orchard.Web/Modules/TinyMce/Styles/orchard-tinymce.css @@ -7,13 +7,11 @@ top: 0; position: fixed; background-color: white; + border-top: 1px solid #9e9e9e; + border-bottom: 1px solid #9e9e9e; } #stickyContainer.container-layout { width: 100%; } -#stickyContainer.sticky-container-layout { - border-top: 1px solid #9e9e9e; - border-bottom: 1px solid #9e9e9e; -} -/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9yY2hhcmQtdGlueW1jZS5jc3MiLCJvcmNoYXJkLXRpbnltY2UubGVzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQUNMQTtFQUNFLE9BQUE7RUFDQSxnQkFBQTtFQUNBLHdCQUFBO0NEQ0Q7QUNDRDtFQUNFLFlBQUE7Q0RDRDtBQ0NEO0VBQ0UsOEJBQUE7RUFDQSxpQ0FBQTtDRENEIiwiZmlsZSI6Im9yY2hhcmQtdGlueW1jZS5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIjc3RpY2t5Q29udGFpbmVyLnN0aWNreS10b3Age1xuICB0b3A6IDA7XG4gIHBvc2l0aW9uOiBmaXhlZDtcbiAgYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7XG59XG4jc3RpY2t5Q29udGFpbmVyLmNvbnRhaW5lci1sYXlvdXQge1xuICB3aWR0aDogMTAwJTtcbn1cbiNzdGlja3lDb250YWluZXIuc3RpY2t5LWNvbnRhaW5lci1sYXlvdXQge1xuICBib3JkZXItdG9wOiAxcHggc29saWQgIzllOWU5ZTtcbiAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkICM5ZTllOWU7XG59XG4iLCLvu78jc3RpY2t5Q29udGFpbmVyLnN0aWNreS10b3Age1xyXG4gIHRvcDogMDtcclxuICBwb3NpdGlvbjogZml4ZWQ7XHJcbiAgYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7XHJcbn1cclxuI3N0aWNreUNvbnRhaW5lci5jb250YWluZXItbGF5b3V0IHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG4jc3RpY2t5Q29udGFpbmVyLnN0aWNreS1jb250YWluZXItbGF5b3V0IHtcclxuICBib3JkZXItdG9wOiAxcHggc29saWQgIzllOWU5ZTtcclxuICBib3JkZXItYm90dG9tOiAxcHggc29saWQgIzllOWU5ZTtcclxufSJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ== */ +/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9yY2hhcmQtdGlueW1jZS5jc3MiLCJvcmNoYXJkLXRpbnltY2UubGVzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsQUNMQTtFQUNFLE9BQUE7RUFDQSxnQkFBQTtFQUNBLHdCQUFBO0VBQ0EsOEJBQUE7RUFDQSxpQ0FBQTtDRENEO0FDQ0Q7RUFDRSxZQUFBO0NEQ0QiLCJmaWxlIjoib3JjaGFyZC10aW55bWNlLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIiNzdGlja3lDb250YWluZXIuc3RpY2t5LXRvcCB7XG4gIHRvcDogMDtcbiAgcG9zaXRpb246IGZpeGVkO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTtcbiAgYm9yZGVyLXRvcDogMXB4IHNvbGlkICM5ZTllOWU7XG4gIGJvcmRlci1ib3R0b206IDFweCBzb2xpZCAjOWU5ZTllO1xufVxuI3N0aWNreUNvbnRhaW5lci5jb250YWluZXItbGF5b3V0IHtcbiAgd2lkdGg6IDEwMCU7XG59XG4iLCLvu78jc3RpY2t5Q29udGFpbmVyLnN0aWNreS10b3Age1xyXG4gIHRvcDogMDtcclxuICBwb3NpdGlvbjogZml4ZWQ7XHJcbiAgYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7XHJcbiAgYm9yZGVyLXRvcDogMXB4IHNvbGlkICM5ZTllOWU7XHJcbiAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkICM5ZTllOWU7XHJcbn1cclxuI3N0aWNreUNvbnRhaW5lci5jb250YWluZXItbGF5b3V0IHtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0= */ diff --git a/src/Orchard.Web/Modules/TinyMce/Styles/orchard-tinymce.min.css b/src/Orchard.Web/Modules/TinyMce/Styles/orchard-tinymce.min.css index a0cb9dd89..16003b576 100644 --- a/src/Orchard.Web/Modules/TinyMce/Styles/orchard-tinymce.min.css +++ b/src/Orchard.Web/Modules/TinyMce/Styles/orchard-tinymce.min.css @@ -1 +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} \ No newline at end of file +#stickyContainer.sticky-top{top:0;position:fixed;background-color:#fff;border-top:1px solid #9e9e9e;border-bottom:1px solid #9e9e9e}#stickyContainer.container-layout{width:100%} \ No newline at end of file diff --git a/src/Orchard/Data/Migration/Schema/SchemaBuilder.cs b/src/Orchard/Data/Migration/Schema/SchemaBuilder.cs index 216589110..e4d444303 100644 --- a/src/Orchard/Data/Migration/Schema/SchemaBuilder.cs +++ b/src/Orchard/Data/Migration/Schema/SchemaBuilder.cs @@ -76,7 +76,7 @@ namespace Orchard.Data.Migration.Schema { if (ex.IsFatal()) { throw; } - throw new OrchardException(T("An unexpected error occured while executing the SQL statement: {0}", sql), ex); // Add the sql to the nested exception information + throw new OrchardException(T("An unexpected error occurred while executing the SQL statement: {0}", sql), ex); // Add the sql to the nested exception information } } diff --git a/src/Orchard/Environment/DefaultOrchardShell.cs b/src/Orchard/Environment/DefaultOrchardShell.cs index 8bb7b000d..0a15f036f 100644 --- a/src/Orchard/Environment/DefaultOrchardShell.cs +++ b/src/Orchard/Environment/DefaultOrchardShell.cs @@ -105,7 +105,7 @@ namespace Orchard.Environment { throw; } - Logger.Error(ex, "An unexpected error occured while terminating the Shell"); + Logger.Error(ex, "An unexpected error occurred while terminating the Shell"); } } } diff --git a/src/Orchard/Exceptions/Filters/UnhandledExceptionFilter.cs b/src/Orchard/Exceptions/Filters/UnhandledExceptionFilter.cs index 45abc21e2..17faa6b7a 100644 --- a/src/Orchard/Exceptions/Filters/UnhandledExceptionFilter.cs +++ b/src/Orchard/Exceptions/Filters/UnhandledExceptionFilter.cs @@ -31,7 +31,7 @@ namespace Orchard.Exceptions.Filters { } public void OnActionExecuted(ActionExecutedContext filterContext) { - // for exceptions which occured during the action execution + // for exceptions which occurred during the action execution // don't provide custom errors if the action has some custom code to handle exceptions if (!filterContext.ActionDescriptor.GetCustomAttributes(typeof(HandleErrorAttribute), false).Any()) { @@ -92,7 +92,7 @@ namespace Orchard.Exceptions.Filters { } public void OnResultExecuted(ResultExecutedContext filterContext) { - // for exceptions which occured during the action execution + // for exceptions which occurred during the action execution // don't provide custom errors if the action has some custom code to handle exceptions if (!filterContext.ExceptionHandled && filterContext.Exception != null) { diff --git a/src/Orchard/FileSystems/LockFile/DefaultLockFileManager.cs b/src/Orchard/FileSystems/LockFile/DefaultLockFileManager.cs index 29b0825d2..9d45a17cd 100644 --- a/src/Orchard/FileSystems/LockFile/DefaultLockFileManager.cs +++ b/src/Orchard/FileSystems/LockFile/DefaultLockFileManager.cs @@ -31,7 +31,7 @@ namespace Orchard.FileSystems.LockFile { return true; } catch { - // an error occured while reading/creating the lock file + // an error occurred while reading/creating the lock file return false; } finally { @@ -46,7 +46,7 @@ namespace Orchard.FileSystems.LockFile { return IsLockedImpl(path); } catch { - // an error occured while reading the file + // an error occurred while reading the file return true; } finally { diff --git a/src/Orchard/Messaging/Services/DefaultMessageManager.cs b/src/Orchard/Messaging/Services/DefaultMessageManager.cs index 6fd1b568f..8bae885c1 100644 --- a/src/Orchard/Messaging/Services/DefaultMessageManager.cs +++ b/src/Orchard/Messaging/Services/DefaultMessageManager.cs @@ -45,7 +45,7 @@ namespace Orchard.Messaging.Services { if (ex.IsFatal()) { throw; } - Logger.Error(ex, "An error occured while sending the message {0}", type); + Logger.Error(ex, "An error occurred while sending the message {0}", type); } } @@ -68,7 +68,7 @@ namespace Orchard.Messaging.Services { if (ex.IsFatal()) { throw; } - Logger.Error(ex, "An error occured while sending the message {0}", type); + Logger.Error(ex, "An error occurred while sending the message {0}", type); } }