Testing more UX

This commit is contained in:
Rick Falkvinge
2018-12-04 12:28:37 +01:00
parent 0cae3226f5
commit 066b09ed71
2 changed files with 23 additions and 3 deletions
+19
View File
@@ -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;
+4 -3
View File
@@ -75,10 +75,11 @@ namespace Swarmops.Frontend.Pages.Ledgers
$('#TableEomItems').datagrid('appendRow', {
itemGroupName: '<span class=""itemGroupHeader"">" + group.Header.Replace(" ", "&nbsp;").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' />""
});
");
}