Testing a simple CSS trick

This commit is contained in:
Rick Falkvinge
2018-12-04 09:24:13 +01:00
parent cf64601442
commit f43b68c5c3
2 changed files with 35 additions and 1 deletions
+34
View File
@@ -12,8 +12,22 @@
<%=this.JavascriptDocReady%>
// set action icons to their respective initial icons
$('img.eomitem-document').attr('src', '/Images/Icons/iconshock-balloon-invoice-128x96px.png');
// add hover mechanisms
$('img.action').hover(function() {
}, function() {
});
// pointer cursor over action icons
$('img.action').attr('cursor', 'hand');
$('#TableEomItems').datagrid('appendRow', {
itemGroupName: '<span class="itemGroupHeader">Upload&nbsp;external&nbsp;data&nbsp;and&nbsp;match&nbsp;accounts</span>',
itemId: 'GroupExternal'
@@ -143,6 +157,26 @@
font-weight: 500;
}
.action-icon {
-webkit-transition: all 0.50s;
transition: all 0.50s;
border: 1px solid transparent;
width: 26px;
height: 20px;
cursor: hand;
&:hover {
border: 1px solid #ddd;
filter: brightness(120%), contrast(120%);
-webkit-filter: brightness(120%), contrast(120%);
-moz-filter: brightness(120%), contrast(120%);
-o-filter: brightness(120%), contrast(120%);
-ms-filter: brightness(120%), contrast(120%);
-webkit-transition: all 0.50s;
transition: all 0.50s;
}
}
.datagrid-row-selected,.datagrid-row-over{
background:transparent;
}
+1 -1
View File
@@ -94,7 +94,7 @@ namespace Swarmops.Frontend.Pages.Ledgers
builder.Append(@"
$('#TableEomItems').datagrid('appendRow', " + '{' + @"
itemName: '" + item.Name + @"',
action: ""<img src='/Images/Icons/transparency-16px.png' class='eomitem-" + item.Icon + @"' style='display:inline' height='20px' width='26px' />""
action: ""<img src='/Images/Icons/transparency-16px.png' class='action action-icon eomitem-" + item.Icon + @"' style='display:inline' />""
});
");
}