mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Adding infinite scrolling for Recent tab
--HG-- branch : 1.x
This commit is contained in:
@@ -174,8 +174,10 @@
|
|||||||
|
|
||||||
self.pendingRequest(true);
|
self.pendingRequest(true);
|
||||||
|
|
||||||
var url = '@HttpUtility.JavaScriptStringEncode(Url.Action("MediaItems", "Admin"))/' + id + '?skip=' + self.results().length + '&count=' + max + '&order=' + self.orderMedia() + '&mediaType=' + self.mediaType();
|
var url = id
|
||||||
|
? '@HttpUtility.JavaScriptStringEncode(Url.Action("MediaItems", "Admin"))/' + id + '?skip=' + self.results().length + '&count=' + max + '&order=' + self.orderMedia() + '&mediaType=' + self.mediaType()
|
||||||
|
: '@HttpUtility.JavaScriptStringEncode(Url.Action("RecentMediaItems", "Admin"))?skip=' + self.results().length + '&count=' + max + '&order=' + self.orderMedia() + '&mediaType=' + self.mediaType();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: url,
|
url: url,
|
||||||
@@ -326,7 +328,7 @@
|
|||||||
self.getMediaItems(self.displayed(), 20);
|
self.getMediaItems(self.displayed(), 20);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// todo, infinite scrolling for 'recent'
|
self.getMediaItems(null, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user