Swapping out the widget movement arrows to something closer to what will be in the final UI

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2011-03-17 14:46:12 -07:00
parent 8972dcf45b
commit f12e91ba03
4 changed files with 51 additions and 8 deletions

View File

@@ -79,6 +79,7 @@
<Content Include="Content\Admin\images\moveup.gif" />
<Content Include="Content\Admin\images\movedown.gif" />
<Content Include="Module.txt" />
<Content Include="Styles\images\arrows.png" />
<Content Include="Styles\images\menu.widgets.png" />
<Content Include="Styles\menu.widgets-admin.css" />
<Content Include="Styles\orchard-widgets-admin.css" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

View File

@@ -66,9 +66,53 @@ vertical-align:-2px;
}
#widgets-zones .widgets-actions {
position:absolute;
top:5px;
right:10px;
top:5px;
}
#widgets-zones .widgets-zone-widgets li {
position:relative;
}
#widgets-zones .widgets-zone-widgets .widgets-move-somewhere {
left:3px;
overflow:hidden;
position:absolute;
top:1px;
width:20px;
}
#widgets-zones .widgets-move {
background:url(images/arrows.png) 7px -31px no-repeat;
border:0;
webkit-border-radius:0;
-moz-border-radius:0;
border-radius:0;
-webkit-box-shadow:none;
-moz-box-shadow:none;
box-shadow:none;
height:15px;
filter:none;
float:left;
padding:0;
text-indent:-9999em;
width:20px;
}
#widgets-zones .widgets-move-down {
background-position:7px -58px;
margin-top:1px;
}
#widgets-zones .widgets-move-up:hover {
background-position:7px -71px;
}
#widgets-zones .widgets-move-down:hover {
background-position:7px -98px;
}
#widgets-zones .widgets-move-up[disabled] {
background-position:7px 9px;
cursor:default;
}
#widgets-zones .widgets-move-down[disabled] {
background-position:7px -18px;
cursor:default;
}
#widgets-available li {
border:0;

View File

@@ -49,13 +49,11 @@
int i = 0;
foreach (WidgetPart widget in widgets.Where(w => w.Zone == zone).OrderBy(w => w.Position, new Orchard.UI.FlatPositionComparer())) {
<li>
@if (i > 0) {
<input class="widgets-mover" type="image" name="moveUp" src="@Url.Content("~/modules/orchard.widgets/Content/Admin/images/moveup.gif")" alt="Move up" value="@widget.Id" />
}
@if (++i < count) {
<input class="widgets-mover" type="image" name="moveDown" src="@Url.Content("~/modules/orchard.widgets/Content/Admin/images/movedown.gif")" alt="Move down" value="@widget.Id" />
}
@Html.ActionLink(HasText(widget.Title) ? widget.Title : widget.TypeDefinition.DisplayName, "EditWidget", new { @widget.Id })
<h3>@Html.ActionLink(HasText(widget.Title) ? widget.Title : widget.TypeDefinition.DisplayName, "EditWidget", new { @widget.Id })</h3>
<div class="widgets-move-somewhere">
<button name="moveUp" value="@widget.Id" @(i == 0 ? "disabled='disabled'" : "") class="widgets-move widgets-move-up" type="submit" title="@T("Move up")">@T("Move up")</button>
<button name="moveDown" value="@widget.Id" @(++i == count ? "disabled='disabled'" : "") class="widgets-move widgets-move-down" type="submit" title="@T("Move down")">@T("Move down")</button>
</div>
</li>
}
}