Fixing dependent icons, too
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
// set action icons to their respective initial icons
|
||||
|
||||
$('img.eomitem-document').attr('src', '/Images/Icons/iconshock-balloon-invoice-128x96px.png');
|
||||
$('img.eomitem-upload').attr('src', '/Images/Icons/iconshock-upload-128x96px.png');
|
||||
|
||||
// pointer cursor over action icons
|
||||
|
||||
@@ -164,6 +165,7 @@
|
||||
|
||||
$('span.action-list-item[data-item="' + itemId + '"]').addClass('action-list-item-completed');
|
||||
$('span.action-list-item[data-item="' + dependentItemId + '"]').removeClass('action-list-item-disabled');
|
||||
$('img.action-icon[data-item="' + dependentItemId + '"]').removeClass('action-icon-disabled');
|
||||
});
|
||||
|
||||
});
|
||||
@@ -236,6 +238,10 @@
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.action-icon-disabled {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.datagrid-row-selected, .datagrid-row-over, .datagrid-row-checked {
|
||||
background:transparent !important;
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ namespace Swarmops.Frontend.Pages.Ledgers
|
||||
bankStatement.Name = string.Format(Resources.Pages.Ledgers.EndOfMonth_UploadBankStatementFor,
|
||||
assetAccount.Name, "PDF", new DateTime(monthIterator / 100, monthIterator % 100, 15).ToString("MMMM yyyy"));
|
||||
bankStatement.Completed = false; // TODO
|
||||
bankStatement.Icon = "upload";
|
||||
bankStatement.Skippable = skippable;
|
||||
|
||||
group1.Items.Add(bankStatement);
|
||||
@@ -178,10 +179,13 @@ namespace Swarmops.Frontend.Pages.Ledgers
|
||||
{
|
||||
string itemName = Server.HtmlEncode(item.Name);
|
||||
string itemDisabledClass = string.Empty;
|
||||
string iconDisabledClass = string.Empty;
|
||||
|
||||
if (item.DependsOn.Length > 0)
|
||||
{
|
||||
// add as disabled
|
||||
itemDisabledClass = " action-list-item-disabled";
|
||||
iconDisabledClass = " action-icon-disabled";
|
||||
}
|
||||
|
||||
if (item.Skippable)
|
||||
@@ -193,7 +197,7 @@ namespace Swarmops.Frontend.Pages.Ledgers
|
||||
builder.Append(@"
|
||||
$('#TableEomItems').datagrid('appendRow', {
|
||||
itemName: ""<span class='action-list-item" + itemDisabledClass + @"' data-item='" + item.Id + @"' data-dependson='" + item.DependsOn + @"' data-group='" + group.Id + @"'>" + itemName + @"</span>"",
|
||||
action: ""<img src='/Images/Icons/transparency-16px.png' data-item='" + item.Id + @"' data-group='" + group.Id + @"' class='action action-icon eomitem-" + item.Icon + @"' data-callback='" + item.Callback + @"' data-dependson='" + item.DependsOn + @"' style='display:inline' /><img src='/Images/Abstract/ajaxloader-48x36px.gif' data-group='" + group.Id + @"' class='status-icon status-icon-pleasewait' data-item='" + item.Id + @"' style='display:none' /><img src='/Images/Icons/iconshock-green-tick-128x96px.png' data-group='" + group.Id + @"' class='status-icon status-icon-completed' data-item='" + item.Id + @"' style='display:none' />""
|
||||
action: ""<img src='/Images/Icons/transparency-16px.png' data-item='" + item.Id + @"' data-group='" + group.Id + @"' class='action action-icon eomitem-" + item.Icon + iconDisabledClass + @"' data-callback='" + item.Callback + @"' data-dependson='" + item.DependsOn + @"' /><img src='/Images/Abstract/ajaxloader-48x36px.gif' data-group='" + group.Id + @"' class='status-icon status-icon-pleasewait' data-item='" + item.Id + @"' style='display:none' /><img src='/Images/Icons/iconshock-green-tick-128x96px.png' data-group='" + group.Id + @"' class='status-icon status-icon-completed' data-item='" + item.Id + @"' style='display:none' />""
|
||||
});
|
||||
");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user