mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-11-28 17:32:44 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
@@ -113,11 +113,8 @@ namespace Orchard.Widgets.Controllers {
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
LayerPart currentLayer = layerId == null
|
||||
? layers.First()
|
||||
: layers.FirstOrDefault(layer => layer.Id == layerId);
|
||||
|
||||
if (currentLayer == null && layerId != null) { // Incorrect layer id passed
|
||||
LayerPart currentLayer = layers.FirstOrDefault(layer => layer.Id == layerId);
|
||||
if (currentLayer == null) { // Incorrect layer id passed
|
||||
Services.Notifier.Error(T("Layer not found: {0}", layerId));
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
@@ -151,6 +151,9 @@ margin-top:5px;
|
||||
#widgets-layer-visibility {
|
||||
margin-top:20px;
|
||||
}
|
||||
#widgets-layer-visibility li {
|
||||
cursor:default;
|
||||
}
|
||||
#widgets-layer-visibility .widgets-other-layer {
|
||||
background-image:url(images/eye.png);
|
||||
background-position:5px 11px;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
}
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
document.write("<div id=\"widgets-layer-visibility\"><h3>Layers With Widgets:</h3></div>");
|
||||
document.write("<div id=\"widgets-layer-visibility\"><h3>All Layers:</h3></div>");
|
||||
//]]>
|
||||
</script>
|
||||
@using(Script.Foot()) {
|
||||
@@ -25,11 +25,17 @@
|
||||
var widgetPlacement = $("#widgets-zones");
|
||||
for (var i = 0; i < layers.length; i++) {
|
||||
var layersWidgets = widgetPlacement.find(".widgets-layer-" + layers[i].id);
|
||||
var layer = "";
|
||||
|
||||
if (layersWidgets.length > 0) {
|
||||
var layer = $("<li class=\"widgets-" + ((layers[i].id == currentLayerId && "this") || "other") + "-layer\">" + layers[i].name + "</li>");
|
||||
layer = $("<li class=\"widgets-" + ((layers[i].id == currentLayerId && "this") || "other") + "-layer\">" + layers[i].name + "</li>");
|
||||
layer.data("widgets", layersWidgets);
|
||||
visContainer.append(layer);
|
||||
}
|
||||
else {
|
||||
layer = $("<li class=\"widgets-empty-layer\">" + layers[i].name + " <span>[empty]<span></li>");
|
||||
}
|
||||
|
||||
visContainer.append(layer);
|
||||
}
|
||||
|
||||
$("#widgets-layer-visibility .widgets-other-layer").live("click", function() {
|
||||
|
||||
Reference in New Issue
Block a user