Merge branch '1.8.x' into 1.x

This commit is contained in:
Zoltán Lehóczky
2014-07-16 12:39:58 +02:00
5 changed files with 22 additions and 8 deletions

View File

@@ -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 {

View File

@@ -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");

View File

@@ -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 @@
</div>
</fieldset>
<fieldset>
<fieldset class="available-extensions">
<label for="@Html.FieldIdFor(m => m.Themes)">@T("Available Themes")</label>
<div>
<label for="@Html.FieldIdFor(m => m.Themes)">@T("Available Themes")</label>
<span class="hint">@T("Select the Themes which should be available for this tenant. If none is selected, they will all be available.")</span>
<ol>
@@ -81,9 +82,9 @@
</div>
</fieldset>
<fieldset>
<fieldset class="available-extensions">
<label for="@Html.FieldIdFor(m => m.Modules)">@T("Available Modules")</label>
<div>
<label for="@Html.FieldIdFor(m => m.Modules)">@T("Available Modules")</label>
<span class="hint">@T("Select the Modules which should be available for this tenant. If none is selected, they will all be available.")</span>
<ol>

View File

@@ -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 @@
</div>
</fieldset>
<fieldset>
<fieldset class="available-extensions">
<label for="@Html.FieldIdFor(m => m.Themes)">@T("Available Themes")</label>
<div>
<label for="@Html.FieldIdFor(m => m.Themes)">@T("Available Themes")</label>
<span class="hint">@T("Select the Themes which should be available for this tenant. If none is selected, they will all be available.")</span>
<ol>
@@ -82,9 +83,9 @@
</div>
</fieldset>
<fieldset>
<fieldset class="available-extensions">
<label for="@Html.FieldIdFor(m => m.Modules)">@T("Available Modules")</label>
<div>
<label for="@Html.FieldIdFor(m => m.Modules)">@T("Available Modules")</label>
<span class="hint">@T("Select the Modules which should be available for this tenant. If none is selected, they will all be available.")</span>
<ol>

View File

@@ -298,6 +298,10 @@ namespace Orchard.FileSystems.Media {
/// <returns>True if success; False otherwise.</returns>
public bool TrySaveStream(string path, Stream inputStream) {
try {
if (FileExists(path)) {
return false;
}
SaveStream(path, inputStream);
}
catch {