New: AddSeries autocomplete for series restyled.
This commit is contained in:
parent
4b903f2291
commit
8f3d4e3128
|
@ -53,12 +53,19 @@ function bindSeriesAutoComplete(selector) {
|
||||||
$(this).val(ui.item.Title);
|
$(this).val(ui.item.Title);
|
||||||
$(this).siblings('.seriesId').val(ui.item.Id);
|
$(this).siblings('.seriesId').val(ui.item.Id);
|
||||||
return false;
|
return false;
|
||||||
|
},
|
||||||
|
open: function (event, ui) {
|
||||||
|
$('.ui-autocomplete').addClass('seriesLookupResults');
|
||||||
|
},
|
||||||
|
close: function (event, ui) {
|
||||||
|
$('.ui-autocomplete').removeClass('seriesLookupResults');
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
.data("autocomplete")._renderItem = function (ul, item) {
|
.data("autocomplete")._renderItem = function (ul, item) {
|
||||||
return $("<li></li>")
|
return $("<li></li>")
|
||||||
.data("item.autocomplete", item)
|
.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);
|
.appendTo(ul);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -30,10 +30,26 @@
|
||||||
position: relative;
|
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: white url('../../Content/Images/ajax-loader.gif') 99% center no-repeat;
|
||||||
background-size: 18px 18px
|
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>
|
</style>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue