Commit 2d9bc07b by Oláh István Gergely

dashboard: set id on group searching box, fix js

parent 9865a867
...@@ -289,7 +289,7 @@ function generateVmHTML(pk, name, host, icon, _status, fav) { ...@@ -289,7 +289,7 @@ function generateVmHTML(pk, name, host, icon, _status, fav) {
'</a>'; '</a>';
} }
function generateuGroupHTML( name, url, icon, _status, fav) { function generateGroupHTML(url, name) {
return name+url + return name+url +
''; '';
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div href="#" class="list-group-item list-group-footer text-right"> <div href="#" class="list-group-item list-group-footer text-right">
<div class="row"> <div class="row">
<div class="col-sm-6 col-xs-6 input-group input-group-sm"> <div class="col-sm-6 col-xs-6 input-group input-group-sm">
<input type="text" class="form-control" placeholder="{% trans "Search..." %}" /> <input id="dashboard-group-search-input" type="text" class="form-control" placeholder="{% trans "Search..." %}" />
<div class="input-group-btn"> <div class="input-group-btn">
<button type="submit" class="form-control btn btn-primary" title="search"><i class="icon-search"></i></button> <button type="submit" class="form-control btn btn-primary" title="search"><i class="icon-search"></i></button>
</div> </div>
......
...@@ -994,7 +994,7 @@ class GroupList(LoginRequiredMixin, SuperuserRequiredMixin, SingleTableView): ...@@ -994,7 +994,7 @@ class GroupList(LoginRequiredMixin, SuperuserRequiredMixin, SingleTableView):
'operator', user).values_list('pk')] 'operator', user).values_list('pk')]
groups = Group.objects.filter(groupprofile__in=pks) groups = Group.objects.filter(groupprofile__in=pks)
groups = [{ groups = [{
'url': i.get_absolute_url(), 'url': '',
'name': i.name} for i in groups] 'name': i.name} for i in groups]
return HttpResponse( return HttpResponse(
json.dumps(list(groups)), json.dumps(list(groups)),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment