remove aspect sorting logic
This commit is contained in:
parent
d3921f1f2b
commit
8d8d3c649a
4 changed files with 0 additions and 29 deletions
|
|
@ -1,18 +0,0 @@
|
|||
/* 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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue