diff --git a/app/views/features/manage_fields.html.erb b/app/views/features/manage_fields.html.erb
index f57e9ad..8ca86db 100644
--- a/app/views/features/manage_fields.html.erb
+++ b/app/views/features/manage_fields.html.erb
@@ -1,5 +1,7 @@
<%= _('Manage fields displayed for profiles') %>
+<%= javascript_include_tag "manage-fields.js" %>
+
<% tabs = [] %>
<% tabs << {:title => _("Person's fields"), :id => 'person-fields',
:content => (render :partial => 'manage_person_fields')} %>
@@ -11,5 +13,3 @@
<% end %>
<%= render_tabs(tabs) %>
-
-<%= javascript_include_tag "manage-fields.js" %>
diff --git a/public/javascripts/manage-fields.js b/public/javascripts/manage-fields.js
index 95e254b..9c0b678 100644
--- a/public/javascripts/manage-fields.js
+++ b/public/javascripts/manage-fields.js
@@ -57,7 +57,7 @@ jQuery(document).ready(function(){
}
var checkbox = jQuery(checkboxes[i+3]).attr("id").split("_")
- jQuery("#" + checkbox.first() + "_" + checkbox.last()).attr("checked", allchecked)
+ jQuery("#" + checkbox[0] + "_" + checkbox[checkbox.length-1]).attr("checked", allchecked)
}
}
@@ -74,10 +74,10 @@ jQuery(document).ready(function(){
jQuery("input[type='checkbox']").click(function (){
var checkbox = jQuery(this).attr("id").split("_")
- verify_checked(checkbox.first())
+ verify_checked(checkbox[0])
if(this.checked == false) {
- jQuery("#" + checkbox.first() + "_" + checkbox.last()).attr("checked", false)
+ jQuery("#" + checkbox[0] + "_" + checkbox[checkbox.length-1]).attr("checked", false)
}
})
})
--
libgit2 0.21.2