[refs #194] fix managing issue executor

This commit is contained in:
Alexander Machehin 2012-03-07 16:44:42 +06:00
parent 4b9d0616d6
commit 4b173932e5
2 changed files with 4 additions and 3 deletions

View File

@ -171,7 +171,7 @@ $(document).ready(function() {
var clone = $(this).clone(); var clone = $(this).clone();
form_new.find('#flag-span').fadeOut(0); form_new.find('#flag-span').fadeOut(0);
form_new.find('#issue_labels').append(clone); form_new.find('#issue_labels').append(clone);
var labels = $('#active_labels'); var labels = $('.current_labels');
labels.find('#'+$(this).attr('id')).remove(); labels.find('#'+$(this).attr('id')).remove();
labels.append(clone); labels.append(clone);
}); });
@ -243,7 +243,7 @@ $(document).ready(function() {
$('.button.manage_executor').live('click', function() { $('.button.manage_executor').live('click', function() {
$('form#search_user, .button.update_executor').fadeIn(0); $('form#search_user, .button.update_executor').fadeIn(0);
$('.current_executor .people').addClass('remove_executor selected'); $('.current_executor .people').addClass('remove_executor selected').removeClass('nopointer');
$(this).fadeOut(0); $(this).fadeOut(0);
}); });
@ -259,6 +259,7 @@ $(document).ready(function() {
url: form.attr("action"), url: form.attr("action"),
data: form.serialize(), data: form.serialize(),
success: function(data){ success: function(data){
$('.current_executor .people').removeClass('remove_executor selected').addClass('nopointer');
$('form#search_user, .button.update_executor').fadeOut(0); $('form#search_user, .button.update_executor').fadeOut(0);
$('.button.manage_executor').fadeIn(0); $('.button.manage_executor').fadeIn(0);
$('#manage_issue_users_list').html(''); $('#manage_issue_users_list').html('');

View File

@ -16,7 +16,7 @@
=form_for :issue, :url => [@project, @issue], :method => :put, :html => { :class => 'edit_executor issue'} do |f| =form_for :issue, :url => [@project, @issue], :method => :put, :html => { :class => 'edit_executor issue'} do |f|
.current_executor .current_executor
- if @issue.user - if @issue.user
#user-0.people #user-0.people.nopointer
.avatar=image_tag avatar_url(@issue.user), :alt => 'avatar' .avatar=image_tag avatar_url(@issue.user), :alt => 'avatar'
.name="#{@issue.user.uname} (#{@issue.user.name})" .name="#{@issue.user.uname} (#{@issue.user.name})"
=hidden_field_tag "user-0", @issue.user.id, :name => 'issue[user_id]' =hidden_field_tag "user-0", @issue.user.id, :name => 'issue[user_id]'