Commit 8d8d3c64 authored by Fabian Rodriguez's avatar Fabian Rodriguez Committed by Florian Staudacher

remove aspect sorting logic

parent d3921f1f
/* Copyright (c) 2010-2011, Diaspora Inc. This file is
* licensed under the Affero General Public License version 3 or later. See
* the COPYRIGHT file.
*/
$(document).ready(function() {
$('#aspect_nav.left_nav .all_aspects .sub_nav').sortable({
items: "li[data-aspect_id]",
update: function(event, ui) {
var order = $(this).sortable("toArray", {attribute: "data-aspect_id"}),
obj = { 'reorder_aspects': order, '_method': 'put' };
$.ajax('/user', { type: 'post', dataType: 'script', data: obj });
},
revert: true,
helper: 'clone'
});
});
......@@ -35,7 +35,6 @@
//= require aspects-dropdown
//= require contact-edit
//= require contact-list
//= require aspect-sorting
//= require mentions
//= require bootstrap-tooltip
//= require bootstrap-popover
......
......@@ -71,8 +71,6 @@ class UsersController < ApplicationController
flash[:error] = I18n.t 'users.update.follow_settings_not_changed'
end
end
elsif aspect_order = params[:reorder_aspects]
@user.reorder_aspects(aspect_order)
end
respond_to do |format|
......
......@@ -422,14 +422,6 @@ class User < ActiveRecord::Base
end
end
def reorder_aspects(aspect_order)
i = 0
aspect_order.each do |id|
self.aspects.find(id).update_attributes({ :order_id => i })
i += 1
end
end
# Generate public/private keys for User and associated Person
def generate_keys
key_size = (Rails.env == 'test' ? 512 : 4096)
......
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 to comment