Testing more UX
This commit is contained in:
@@ -128,6 +128,13 @@
|
||||
|
||||
$('.action-list-item').click(function() {
|
||||
$(this).addClass('action-list-item-disabled');
|
||||
|
||||
var groupId = $(this).attr['data-group'];
|
||||
if ($(".action-list-item:not(.action-list-item-disabled)[data-group='" + groupId + "']").length == 0) // no further actions in this group enabled
|
||||
{
|
||||
// mark the group as completed
|
||||
$(".group-status-icon[data-group='" + groupId + "']").fadeIn();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
@@ -161,6 +168,18 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.status-icon {
|
||||
border: 1px solid transparent;
|
||||
width: 26px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.group-status-icon {
|
||||
border: 1px solid transparent;
|
||||
width: 32px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.action-icon:hover {
|
||||
border: 1px solid #FFD580;
|
||||
background: #FFEDC8;
|
||||
|
||||
@@ -75,10 +75,11 @@ namespace Swarmops.Frontend.Pages.Ledgers
|
||||
|
||||
$('#TableEomItems').datagrid('appendRow', {
|
||||
itemGroupName: '<span class=""itemGroupHeader"">" + group.Header.Replace(" ", " ").Replace("'", "''") + @"</span>',
|
||||
action: ""<img src='/Images/Icons/iconshock-green-tick-128x96px.png' data-group='" + group.Id + @"' class='group-status-icon style='display:none' />""
|
||||
itemId: '" + group.Id + @"'
|
||||
});
|
||||
|
||||
rowCount = $('#TableEomItems').datagrid('getRows').length;
|
||||
rowCount = $('#TableEomItems').datagrid('getRows').length;
|
||||
|
||||
$('#TableEomItems').datagrid('mergeCells', {
|
||||
index: rowCount - 1,
|
||||
@@ -93,8 +94,8 @@ namespace Swarmops.Frontend.Pages.Ledgers
|
||||
{
|
||||
builder.Append(@"
|
||||
$('#TableEomItems').datagrid('appendRow', " + '{' + @"
|
||||
itemName: '<span class=""action-list-item"">" + item.Name + @"</span>',
|
||||
action: ""<img src='/Images/Icons/transparency-16px.png' class='action action-icon eomitem-" + item.Icon + @"' style='display:inline' />""
|
||||
itemName: ""<span class='action-list-item' data-group='" + group.Id + @"'>" + item.Name + @"</span>"",
|
||||
action: ""<img src='/Images/Icons/transparency-16px.png' data-group='" + group.Id + @"' class='action action-icon eomitem-" + item.Icon + @"' style='display:inline' />""
|
||||
});
|
||||
");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user