diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-03-13 20:02:34 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-03-13 20:02:34 +0000 |
commit | 28e34e101cc3222c2eefb93201cf3cd957f81f7b (patch) | |
tree | 976a4bc0f94d0dbb544c49839db81a843fd11691 /app/helpers/my_helper.rb | |
parent | 327a6e54da602670d33b33b8054a9aa421e2f09d (diff) | |
download | redmine-28e34e101cc3222c2eefb93201cf3cd957f81f7b.tar.gz redmine-28e34e101cc3222c2eefb93201cf3cd957f81f7b.zip |
Don't reload the page when adding/removing a block.
git-svn-id: http://svn.redmine.org/redmine/trunk@16394 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/my_helper.rb')
-rw-r--r-- | app/helpers/my_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/my_helper.rb b/app/helpers/my_helper.rb index 3c0313f90..042209cac 100644 --- a/app/helpers/my_helper.rb +++ b/app/helpers/my_helper.rb @@ -35,7 +35,7 @@ module MyHelper content = render_block_content(block, user) if content.present? handle = content_tag('span', '', :class => 'sort-handle') - close = link_to(l(:button_delete), {:action => "remove_block", :block => block}, :method => 'post', :class => "icon-only icon-close") + close = link_to(l(:button_delete), {:action => "remove_block", :block => block}, :remote => true, :method => 'post', :class => "icon-only icon-close") content = content_tag('div', handle + close, :class => 'contextual') + content content_tag('div', content, :class => "mypage-box", :id => "block-#{block}") @@ -64,7 +64,7 @@ module MyHelper Redmine::MyPage.block_options.each do |label, block| options << content_tag('option', label, :value => block, :disabled => disabled.include?(block)) end - select_tag('block', options, :id => "block-select", :onchange => "this.form.submit();") + select_tag('block', options, :id => "block-select", :onchange => "$('#block-form').submit();") end def calendar_items(startdt, enddt) |