mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 01:29:26 +08:00
update
This commit is contained in:
@@ -1120,15 +1120,20 @@ function listOrder(skey,type,obj){
|
||||
if(or){
|
||||
if(or.split(' ')[1] == 'desc'){
|
||||
orderType = 'asc';
|
||||
} else if(or.split(' ')[1] == 'asc'){
|
||||
orderType = 'none';
|
||||
}
|
||||
}
|
||||
setCookie('order',skey + ' ' + orderType);
|
||||
getWeb(1);
|
||||
$(obj).find(".glyphicon-triangle-bottom").remove();
|
||||
$(obj).find(".glyphicon-triangle-top").remove();
|
||||
if(orderType == 'asc'){
|
||||
$(obj).parents().find(".glyphicon-stop").remove();
|
||||
if(orderType == 'none'){
|
||||
$(obj).append("<span class='glyphicon glyphicon glyphicon-stop' style='margin-left:5px;color:#bbb'></span>");
|
||||
} else if(orderType == 'asc') {
|
||||
$(obj).append("<span class='glyphicon glyphicon-triangle-bottom' style='margin-left:5px;color:#bbb'></span>");
|
||||
}else{
|
||||
} else {
|
||||
$(obj).append("<span class='glyphicon glyphicon-triangle-top' style='margin-left:5px;color:#bbb'></span>");
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -96,7 +96,10 @@ def getSitesList(
|
||||
start = (int(page) - 1) * (int(size))
|
||||
limit = str(start) + ',' +str(size)
|
||||
|
||||
if order is not None:
|
||||
print("order:",order)
|
||||
if order.find("none") > -1:
|
||||
site_list = dbM.limit(limit).order('').select()
|
||||
elif order is not None:
|
||||
site_list = dbM.limit(limit).order(order).select()
|
||||
else:
|
||||
site_list = dbM.limit(limit).order('id desc').select()
|
||||
|
||||
Reference in New Issue
Block a user