UI tweaks

This commit is contained in:
Adrian Sampson 2011-08-07 00:42:24 -07:00
parent 586371a4e2
commit e06f3247fd
3 changed files with 25 additions and 1 deletions

View file

@ -11,6 +11,8 @@ body {
color: white;
cursor: default;
/* shadowy border */
box-shadow: 0 0 20px #999;
-webkit-box-shadow: 0 0 20px #999;
@ -71,6 +73,7 @@ body {
list-style: none;
padding: 4px 8px;
margin: 0;
cursor: default;
}
#entities ul li.selected {
background: #7abcff;
@ -93,3 +96,6 @@ body {
font-size: 1.3em;
font-weight: bold;
}
#detail .albumtitle {
font-style: italic;
}

View file

@ -1,3 +1,14 @@
// Simple selection disable for jQuery.
// Cut-and-paste from:
// http://stackoverflow.com/questions/2700000
$.fn.disableSelection = function() {
$(this).attr('unselectable', 'on')
.css('-moz-user-select', 'none')
.each(function() {
this.onselectstart = function() { return false; };
});
};
$(function() {
// Routes.
@ -86,4 +97,8 @@ var app = new AppView();
// App setup.
Backbone.history.start({pushState: false});
// Disable selection on UI elements.
$('#entities ul').disableSelection();
$('#header').disableSelection();
});

View file

@ -34,7 +34,10 @@
</script>
<script type="text/template" id="item-detail-template">
<span class="artist"><%= artist %></span>
<span class="album"><%= album %></span>
<span class="album">
<span class="albumtitle"><%= album %></span>
<span class="year">(<%= year %>)</span>
</span>
<span class="title"><%= title %></span>
<a class="download" href="/item/<%= id %>/file">download</a>