Use css overflow on genres/artists/album select boxes instead

of truncating the text
This commit is contained in:
Anders Betnér 2006-04-22 21:06:34 +00:00
parent 15e6302fc0
commit 83e20a2824
2 changed files with 5 additions and 6 deletions

View File

@ -3,6 +3,7 @@
#genre_div select, #artist_div select, #album_div select {
font: icon;
width: 30ex;
overflow: hidden;
}
#source_div select {
font: icon;

View File

@ -5,7 +5,8 @@
Event.observe(window,'load',initPlaylist);
var SEARCH_DELAY = 500; // # ms without typing before the search box searches
var BROWSE_TEXT_LEN = 30; // Length to truncate genre/artist/album select boxes
var BROWSE_TEXT_LEN = 30; // genres/artists/albums select options longer than this will have
// a title attribute (to show a tool tip for items that doesn't fit the box
var g_myLiveGrid; // the live grid;
function initPlaylist() {
Ajax.Responders.register({ onCreate: Spinner.incRequestCount,
@ -423,13 +424,10 @@ var ResponseHandler = {
// with the selected state I want.
var o = document.createElement('option');
o.value = option;
var text = option.truncate(BROWSE_TEXT_LEN);
if (option.length != text.length) {
if (option.length >= BROWSE_TEXT_LEN) {
o.title = option;
o.appendChild(document.createTextNode(text));
} else {
o.appendChild(document.createTextNode(option));
}
o.appendChild(document.createTextNode(option));
if (selected[option]) {
o.selected = true;
nothingSelected = false;