Pulling the FlatPositionComparer* out of Orchard.Core's CoreShapes and changing the widget managemen index to use that

* need to reconcile this and the Orchard.UI.Navigation.PositionComparer and make the comparer work with negative numbers w/ null/""/0 as the default

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-10-12 15:57:22 -07:00
parent 7540e437b8
commit 789b00a0f3
4 changed files with 59 additions and 55 deletions

View File

@@ -48,7 +48,7 @@
<li>
<div class="widgets-zone">@zone</div>
<ul>
@foreach (WidgetPart widget in Model.CurrentLayerWidgets.Where(widgetPart => widgetPart.Zone == zone).OrderBy(widgetPart => widgetPart.Position)) {
@foreach (WidgetPart widget in Model.CurrentLayerWidgets.Where(widgetPart => widgetPart.Zone == zone).OrderBy(widgetPart => widgetPart.Position, new Orchard.UI.FlatPositionComparer())) {
<li class="widgets-zoneWidget">
@if (widget.Position != "1") {
<input type="image" name="submit.MoveUp.@widget.Id" src="@Url.Content("~/modules/orchard.widgets/Content/Admin/images/moveup.gif")" alt="Move up" value="@widget.Id" />