From 6a2ca5e0342751b6d38a1a05ad25b5c0002d6e46 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 22 Jul 2012 13:29:26 +0000 Subject: JQuery in, Prototype/Scriptaculous out (#11445). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10068 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/my/page_layout.html.erb | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) (limited to 'app/views/my') diff --git a/app/views/my/page_layout.html.erb b/app/views/my/page_layout.html.erb index a4d1888ba..4a60d97e1 100644 --- a/app/views/my/page_layout.html.erb +++ b/app/views/my/page_layout.html.erb @@ -5,7 +5,7 @@ <%= select_tag 'block', content_tag('option') + options_for_select(@block_options), :id => "block-select" %> - <%= link_to l(:button_add), '#', :onclick => '$("block-form").submit()', :class => 'icon icon-add' %> + <%= link_to l(:button_add), '#', :onclick => '$("#block-form").submit()', :class => 'icon icon-add' %> <% end %> <% end %> <%= link_to l(:button_back), {:action => 'page'}, :class => 'icon icon-cancel' %> @@ -34,34 +34,8 @@ <% end if @blocks['right'] %> -<%= sortable_element 'list-top', - :tag => 'div', - :only => 'mypage-box', - :handle => "handle", - :dropOnEmpty => true, - :containment => ['list-top', 'list-left', 'list-right'], - :constraint => false, - :url => { :action => "order_blocks", :group => "top" } - %> - -<%= sortable_element 'list-left', - :tag => 'div', - :only => 'mypage-box', - :handle => "handle", - :dropOnEmpty => true, - :containment => ['list-top', 'list-left', 'list-right'], - :constraint => false, - :url => { :action => "order_blocks", :group => "left" } - %> - -<%= sortable_element 'list-right', - :tag => 'div', - :only => 'mypage-box', - :handle => "handle", - :dropOnEmpty => true, - :containment => ['list-top', 'list-left', 'list-right'], - :constraint => false, - :url => { :action => "order_blocks", :group => "right" } - %> +<%= javascript_tag "initMyPageSortable('top', '#{ escape_javascript url_for(:action => "order_blocks", :group => "top") }');" %> +<%= javascript_tag "initMyPageSortable('left', '#{ escape_javascript url_for(:action => "order_blocks", :group => "left") }');" %> +<%= javascript_tag "initMyPageSortable('right', '#{ escape_javascript url_for(:action => "order_blocks", :group => "right") }');" %> <% html_title(l(:label_my_page)) -%> -- cgit v1.2.3