mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Adding a hover state on widgets to reveal which layer it's in and which widgets are in the same layer.
--HG-- branch : 1.x
This commit is contained in:
@@ -107,7 +107,7 @@ background-color:#e6f1c9;
|
||||
/*#widgets-layer-visibility li.widgets-this-layer:hover {
|
||||
border-color:#487328;
|
||||
}*/
|
||||
.widgets-listed li li.widgets-this-layer:hover, #widgets-layer-visibility li:hover {
|
||||
.widgets-listed li li.widgets-this-layer:hover, #widgets-layer-visibility li:hover, #widgets-layer-visibility li.on {
|
||||
/*border-color:#bfd3a7;*/
|
||||
border-color:#487328;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
if (layersWidgets.length > 0) {
|
||||
layer = $("<li class=\"widgets-" + ((layers[i].id == currentLayerId && "this") || "other") + "-layer\">" + layers[i].name + "</li>");
|
||||
layer.data("widgets", layersWidgets);
|
||||
layersWidgets.each(function(){
|
||||
$(this).data("widgets-vis-control", layer);
|
||||
});
|
||||
}
|
||||
else {
|
||||
layer = $("<li class=\"widgets-empty-layer" + ((layers[i].id == currentLayerId && " widgets-this-layer") || "") + "\">" + layers[i].name + " <span>[empty]</span></li>");
|
||||
@@ -51,6 +54,11 @@
|
||||
$("#widgets-layer-visibility .widgets-other-layer").live("hover", function() {
|
||||
$(this).data("widgets").toggleClass("on");
|
||||
});
|
||||
$("#widgets-zones .widgets-other-layer").live("hover", function() {
|
||||
var layer = $(this).data("widgets-vis-control");
|
||||
layer.toggleClass("on");
|
||||
layer.data("widgets").toggleClass("on");
|
||||
});
|
||||
|
||||
visWrapper.append(visContainer);
|
||||
})(jQuery);
|
||||
|
||||
Reference in New Issue
Block a user