New: AddSeries autocomplete for series restyled.

pull/19/head
Mark McDowall 13 years ago
parent 4b903f2291
commit 8f3d4e3128

@ -53,12 +53,19 @@ function bindSeriesAutoComplete(selector) {
$(this).val(ui.item.Title);
$(this).siblings('.seriesId').val(ui.item.Id);
return false;
},
open: function (event, ui) {
$('.ui-autocomplete').addClass('seriesLookupResults');
},
close: function (event, ui) {
$('.ui-autocomplete').removeClass('seriesLookupResults');
}
})
.data("autocomplete")._renderItem = function (ul, item) {
return $("<li></li>")
.data("item.autocomplete", item)
.append("<a><strong>" + item.Title + "</strong><br>" + item.FirstAired + "</a>")
.append("<a><div class=seriesLookupTitle>" + item.Title + "</div><div class=seriesLookupFirstAired>" + item.FirstAired + "</div></a>")
.appendTo(ul);
};
});

@ -30,10 +30,26 @@
position: relative;
}
#newSeriesLookup.ui-autocomplete-loading {
.ui-autocomplete.seriesLookupResults {
max-height: 180px;
overflow-y: auto;
/* prevent horizontal scrollbar */
overflow-x: hidden;
}
.seriesLookup.ui-autocomplete-loading {
background: white url('../../Content/Images/ajax-loader.gif') 99% center no-repeat;
background-size: 18px 18px
}
.ui-autocomplete .seriesLookupTitle {
font-size: 110%;
font-family: "Segoe UI Light", "Open Sans", "Segoe UI", sans-serif;
color: lightgrey;
}
.ui-autocomplete .seriesLookupFirstAired {
font-family: "Segoe UI Light", "Open Sans", "Segoe UI", sans-serif;
}
</style>
}

Loading…
Cancel
Save