Making extensions lists on tenant edit screens collapsible

Signed-off-by: Zoltán Lehóczky <lehoczky_zoltan@pyrocenter.hu>
This commit is contained in:
Lombiq
2014-06-27 13:38:48 +02:00
committed by Zoltán Lehóczky
parent aa397faa17
commit 2e9f9afdb9
3 changed files with 14 additions and 8 deletions

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>