diff --git a/src/Orchard.Web/Modules/Orchard.Azure/Services/FileSystems/Media/AzureBlobStorageProvider.cs b/src/Orchard.Web/Modules/Orchard.Azure/Services/FileSystems/Media/AzureBlobStorageProvider.cs index c843c2aee..2c480a277 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure/Services/FileSystems/Media/AzureBlobStorageProvider.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure/Services/FileSystems/Media/AzureBlobStorageProvider.cs @@ -23,6 +23,10 @@ namespace Orchard.Azure.Services.FileSystems.Media { public bool TrySaveStream(string path, Stream inputStream) { try { + if (FileExists(path)) { + return false; + } + SaveStream(path, inputStream); } catch { diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Scripts/multi-tenancy.admin.js b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Scripts/multi-tenancy.admin.js index 7c20ed9da..634e45af5 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Scripts/multi-tenancy.admin.js +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Scripts/multi-tenancy.admin.js @@ -1,5 +1,9 @@ (function ($) { $(function () { + $(".available-extensions") + .find("label") + .expandoControl(function (controller) { return controller.next("div"); }, { collapse: false, remember: true }); + $(".select-all").click(function () { var $checkbox = $(this); var $allCheckboxes = $checkbox.closest("ol").find(":checkbox"); diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Add.cshtml b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Add.cshtml index 58ab616d4..59411a967 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Add.cshtml +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Add.cshtml @@ -4,6 +4,7 @@ Layout.Title = T("Add New Tenant").ToString(); Script.Require("jQuery").AtFoot(); + Script.Include(Url.Content("~/Themes/TheAdmin/Scripts/admin.js")).AtFoot(); Script.Include("multi-tenancy.admin.js").AtFoot(); } @@ -54,9 +55,9 @@ -
+
+
- @T("Select the Themes which should be available for this tenant. If none is selected, they will all be available.")
    @@ -81,9 +82,9 @@
-
+
+
- @T("Select the Modules which should be available for this tenant. If none is selected, they will all be available.")
    diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Edit.cshtml b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Edit.cshtml index 957bf533a..544b8636d 100644 --- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Edit.cshtml +++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Admin/Edit.cshtml @@ -5,6 +5,7 @@ Layout.Title = T("Edit Tenant").ToString(); Script.Require("jQuery").AtFoot(); + Script.Include(Url.Content("~/Themes/TheAdmin/Scripts/admin.js")).AtFoot(); Script.Include("multi-tenancy.admin.js").AtFoot(); } @@ -55,9 +56,9 @@
-
+
+
- @T("Select the Themes which should be available for this tenant. If none is selected, they will all be available.")
    @@ -82,9 +83,9 @@
-
+
+
- @T("Select the Modules which should be available for this tenant. If none is selected, they will all be available.")
    diff --git a/src/Orchard/FileSystems/Media/FileSystemStorageProvider.cs b/src/Orchard/FileSystems/Media/FileSystemStorageProvider.cs index 56ca1382c..61da10c0b 100644 --- a/src/Orchard/FileSystems/Media/FileSystemStorageProvider.cs +++ b/src/Orchard/FileSystems/Media/FileSystemStorageProvider.cs @@ -298,6 +298,10 @@ namespace Orchard.FileSystems.Media { /// True if success; False otherwise. public bool TrySaveStream(string path, Stream inputStream) { try { + if (FileExists(path)) { + return false; + } + SaveStream(path, inputStream); } catch {