mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
// display a message on leave if changes have been made
|
// display a message on leave if changes have been made
|
||||||
window.onbeforeunload = function (e) {
|
window.onbeforeunload = function (e) {
|
||||||
return leaveConfirmation;
|
return $("<div/>").html(leaveConfirmation).text();
|
||||||
};
|
};
|
||||||
|
|
||||||
// cancel leaving message on save
|
// cancel leaving message on save
|
||||||
|
@@ -134,12 +134,12 @@
|
|||||||
|
|
||||||
@using (Script.Foot()) {
|
@using (Script.Foot()) {
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
var leaveConfirmation = '@T("Some items where not saved.")';
|
var leaveConfirmation = '@HttpUtility.JavaScriptStringEncode(T("Some items where not saved.").Text)';
|
||||||
|
|
||||||
$('#menuId').change(function () {
|
$('#menuId').change(function () {
|
||||||
$(this).parents('form').submit();
|
$(this).parents('form').submit();
|
||||||
});
|
});
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
@@ -43,7 +43,7 @@
|
|||||||
var force = actionLink.data("feature-force");
|
var force = actionLink.data("feature-force");
|
||||||
var dependants = actionLink.data("feature-dependants");
|
var dependants = actionLink.data("feature-dependants");
|
||||||
|
|
||||||
if (!dependants || /^\s*$/.test(dependants) || confirm(confirmDisableMessage + "\n\n" + dependants)) {
|
if (!dependants || /^\s*$/.test(dependants) || confirm($("<div/>").html(confirmDisableMessage + "\n\n" + dependants).text())) {
|
||||||
|
|
||||||
$("[name='submit.BulkExecute']").val("yes");
|
$("[name='submit.BulkExecute']").val("yes");
|
||||||
$("[name='featureIds']").val(featureId);
|
$("[name='featureIds']").val(featureId);
|
||||||
|
@@ -1,4 +1 @@
|
|||||||
$(function(){var n=function(){var n=$(".bulk-actions-wrapper").addClass("visible"),t=$(".switch-for-switchable");t.prepend(n);$("#search-box").focus().keyup(function(){var n=$(this).val(),t;if(n==""){$("li.category").show();$("li.feature:hidden").show();return}$("li.feature").each(function(){var t=$(this),i=t.find("h3:first").text();i.toLowerCase().indexOf(n.toLowerCase())>=0?t.show():t.hide()});$("li.category:hidden").show();t=$("li.category:not(:has(li.feature:visible))").hide()})},t=function(){$("li.feature h3").on("change","input[type='checkbox']",function(){var n=$(this).is(":checked"),t=$(this).parents("li.feature:first");t.toggleClass("selected",n)})},i=function(){$("li.feature .actions").on("click","a[data-feature-action]",function(n){var t=$(this),r=t.data("feature-id"),u=t.data("feature-action"),f=t.data("feature-force"),i=t.data("feature-dependants");(!i||/^\s*$/.test(i)||confirm(confirmDisableMessage+"\n\n"+i))&&($("[name='submit.BulkExecute']").val("yes"),$("[name='featureIds']").val(r),$("[name='bulkAction']").val(u),$("[name='force']").val(f),t.parents("form:first").submit());n.preventDefault()})};n();t();i()});
|
$(function(){var n=function(){var n=$(".bulk-actions-wrapper").addClass("visible"),t=$(".switch-for-switchable");t.prepend(n);$("#search-box").keyup(function(){var n=$(this).val(),t;if(n==""){$("li.category").show();$("li.feature:hidden").show();return}$("li.feature").each(function(){var t=$(this),i=t.find("h3:first").text();i.toLowerCase().indexOf(n.toLowerCase())>=0?t.show():t.hide()});$("li.category:hidden").show();t=$("li.category:not(:has(li.feature:visible))").hide()})},t=function(){$("li.feature h3").on("change","input[type='checkbox']",function(){var n=$(this).is(":checked"),t=$(this).parents("li.feature:first");t.toggleClass("selected",n)})},i=function(){$("li.feature .actions").on("click","a[data-feature-action]",function(n){var t=$(this),r=t.data("feature-id"),u=t.data("feature-action"),f=t.data("feature-force"),i=t.data("feature-dependants");(!i||/^\s*$/.test(i)||confirm($("<div/>").html(confirmDisableMessage+"\n\n"+i).text()))&&($("[name='submit.BulkExecute']").val("yes"),$("[name='featureIds']").val(r),$("[name='bulkAction']").val(u),$("[name='force']").val(f),t.parents("form:first").submit());n.preventDefault()})};n();t();i()});
|
||||||
/*
|
|
||||||
//# sourceMappingURL=features.admin.min.js.map
|
|
||||||
*/
|
|
@@ -16,29 +16,29 @@
|
|||||||
|
|
||||||
@if (Model.Features.Any()) {
|
@if (Model.Features.Any()) {
|
||||||
using (Html.BeginFormAntiForgeryPost()) {
|
using (Html.BeginFormAntiForgeryPost()) {
|
||||||
@Html.Hidden("submit.BulkExecute")
|
@Html.Hidden("submit.BulkExecute")
|
||||||
@Html.Hidden("force", true)
|
@Html.Hidden("force", true)
|
||||||
@Html.Hidden("featureIds")
|
@Html.Hidden("featureIds")
|
||||||
<div class="bulk-actions-wrapper">
|
<div class="bulk-actions-wrapper">
|
||||||
<fieldset class="bulk-actions">
|
<fieldset class="bulk-actions">
|
||||||
<label for="search-box">@T("Filter:")</label>
|
<label for="search-box">@T("Filter:")</label>
|
||||||
<input id="search-box" class="text" type="text" autofocus="autofocus" />
|
<input id="search-box" class="text" type="text" autofocus="autofocus" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset class="bulk-actions">
|
<fieldset class="bulk-actions">
|
||||||
<label for="publishActions">@T("Actions:")</label>
|
<label for="publishActions">@T("Actions:")</label>
|
||||||
<select id="publishActions" name="bulkAction">
|
<select id="publishActions" name="bulkAction">
|
||||||
@Html.SelectOption(Model.BulkAction, FeaturesBulkAction.None, T("Choose action...").ToString())
|
@Html.SelectOption(Model.BulkAction, FeaturesBulkAction.None, T("Choose action...").ToString())
|
||||||
@Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Enable, T("Enable").ToString())
|
@Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Enable, T("Enable").ToString())
|
||||||
@Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Disable, T("Disable").ToString())
|
@Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Disable, T("Disable").ToString())
|
||||||
@Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Update, T("Update").ToString())
|
@Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Update, T("Update").ToString())
|
||||||
@Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Toggle, T("Toggle").ToString())
|
@Html.SelectOption(Model.BulkAction, FeaturesBulkAction.Toggle, T("Toggle").ToString())
|
||||||
</select>
|
</select>
|
||||||
<button type="submit" name="submit.BulkExecute" value="yes">@T("Execute")</button>
|
<button type="submit" name="submit.BulkExecute" value="yes">@T("Execute")</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="features summary-view switchable">
|
<ul class="features summary-view switchable">
|
||||||
@{
|
@{
|
||||||
var featureGroups = Model.Features.OrderBy(f => f.Descriptor.Category, new DoghouseComparer("Core")).GroupBy(f => f.Descriptor.Category).ToList();
|
var featureGroups = Model.Features.OrderBy(f => f.Descriptor.Category, new DoghouseComparer("Core")).GroupBy(f => f.Descriptor.Category).ToList();
|
||||||
foreach (var featureGroup in featureGroups) {
|
foreach (var featureGroup in featureGroups) {
|
||||||
if (!featureGroup.Any(x => Model.IsAllowed(x.Descriptor.Extension))) {
|
if (!featureGroup.Any(x => Model.IsAllowed(x.Descriptor.Extension))) {
|
||||||
@@ -98,8 +98,7 @@
|
|||||||
<input type="checkbox" name="featureIds" value="@feature.Descriptor.Id" />
|
<input type="checkbox" name="featureIds" value="@feature.Descriptor.Id" />
|
||||||
@featureName
|
@featureName
|
||||||
</label>
|
</label>
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
@featureName
|
@featureName
|
||||||
}
|
}
|
||||||
</h3>
|
</h3>
|
||||||
@@ -138,14 +137,14 @@
|
|||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
</li>}
|
</li>}
|
||||||
}
|
}
|
||||||
</ul>}
|
</ul>}
|
||||||
|
|
||||||
using (Script.Foot()) {
|
using (Script.Foot()) {
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
var confirmDisableMessage = '@T("Disabling this feature will also disable the following dependent features. Are you sure you want to continue?")';
|
var confirmDisableMessage = '@HttpUtility.JavaScriptStringEncode(T("Disabling this feature will also disable the following dependent features. Are you sure you want to continue?").Text)';
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user