mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Merge branch 'master' of https://github.com/snipe/snipe-it
This commit is contained in:
commit
c9337a1947
|
@ -296,11 +296,11 @@ $(document).ready(function () {
|
|||
});
|
||||
|
||||
// makes sure we're not selecting the same thing twice for multiples
|
||||
var filteredResponse = response.items.filter(function(item) {
|
||||
var filteredResponse = response.results.filter(function(item) {
|
||||
return currentlySelected.indexOf(+item.id) < 0;
|
||||
});
|
||||
|
||||
var first = (currentlySelected.length > 0) ? filteredResponse[0] : response.items[0];
|
||||
var first = (currentlySelected.length > 0) ? filteredResponse[0] : response.results[0];
|
||||
|
||||
if(first && first.id) {
|
||||
first.selected = true;
|
||||
|
@ -558,4 +558,4 @@ $(document).ready(function () {
|
|||
});
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
})(jQuery);
|
||||
|
|
Loading…
Reference in a new issue