Skip to content

Commit

Permalink
Sorting for all sections
Browse files Browse the repository at this point in the history
  • Loading branch information
winton committed Oct 29, 2010
1 parent 0941d06 commit 4c89468
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions lib/a_b_front_end/controller/front.rb
Expand Up @@ -19,6 +19,14 @@
},
:token => current_user.single_access_token
)
@sites.sort! { |a, b| a["name"] <=> b["name"] }
@sites.each do |site|
site["categories"].sort! { |a, b| a["name"] <=> b["name"] }
site["envs"].sort! { |a, b| a["name"] <=> b["name"] }
site["categories"].each do |category|
category["tests"].reverse!
end
end
haml :dashboard
else
haml :front
Expand Down
2 changes: 1 addition & 1 deletion public/js/dashboard.js
Expand Up @@ -406,7 +406,7 @@ window.Dashboard = function(sites) {
form.serialize() + '&category=' + category.name,
function(response) {
category.tests = category.tests || [];
category.tests.push(response);
category.tests.unshift(response);
queue.dequeue();
$('#categories .selected').click().click();
dialog.trigger('close');
Expand Down

0 comments on commit 4c89468

Please sign in to comment.