descartes
descartes copied to clipboard
Images for dashboard cards
I think it might be an interesting UX exercise to allow users to apply their own images to the dashboard cards. This is easy enough to implement, just need to provide a field for the URL and then add a Dashboard method to add the image_url
to the @dashboard.configuration
.
Sample code for applying the background images on hover:
$('span#116e337c5887cf9ad5e4b84e7c6c688f').hover(function() { $(this).css('background-image', 'none'); }, function() { $(this).css('background-image', 'url("http://4.bp.blogspot.com/-KyIJeVwnUN4/UV2Q7Nekz7I/AAAAAAAAAZU/gfI0LKMLCiY/s1600/silly-animals%5B1%5D.jpg")').css('background-size', '100%') } )
$('span#88765b826fee465f8e35ea8e51096cbc').hover(function() { $(this).css('background-image', 'none'); }, function() { $(this).css('background-image', 'url("http://files.sharenator.com/silly_funny_cat_5-s800x721-15630.jpg")').css('background-size', '100%') } )
$('span#c1c1de285dfbcf9c8b7900748c4650a4').hover(function() { $(this).css('background-image', 'none'); }, function() { $(this).css('background-image', 'url("http://cdn01.cdn.socialitelife.com/wp-content/uploads/2012/06/19/nic-cage-cats-06192012-05-600x450.png")').css('background-size', '100%') } )
Not sure yet where the configuration should be exposed in the UI. I hesitate to add a toolbar to the dashboard list view. Will need to think about some more.
Just give me cat mode.