@@ -4,7 +4,7 function recreateSortables() { | |||
|
4 | 4 | Sortable.destroy('list-top'); |
|
5 | 5 | Sortable.destroy('list-left'); |
|
6 | 6 | Sortable.destroy('list-right'); |
|
7 | ||
|
7 | ||
|
8 | 8 | Sortable.create("list-top", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('<%= url_for(:controller => 'my', :action => 'order_blocks', :group => 'top') %>', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-top")})}, only:'mypage-box', tag:'div'}) |
|
9 | 9 | Sortable.create("list-left", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('<%= url_for(:controller => 'my', :action => 'order_blocks', :group => 'left') %>', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-left")})}, only:'mypage-box', tag:'div'}) |
|
10 | 10 | Sortable.create("list-right", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('<%= url_for(:controller => 'my', :action => 'order_blocks', :group => 'right') %>', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-right")})}, only:'mypage-box', tag:'div'}) |
@@ -53,21 +53,21 function removeBlock(block) { | |||
|
53 | 53 | <h2><%=l(:label_my_page)%></h2> |
|
54 | 54 | |
|
55 | 55 | <div id="list-top" class="block-receiver"> |
|
56 |
<% @blocks['top'].each do |b| |
|
|
56 | <% @blocks['top'].each do |b| | |
|
57 | 57 | next unless MyController::BLOCKS.keys.include? b %> |
|
58 | 58 | <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %> |
|
59 | 59 | <% end if @blocks['top'] %> |
|
60 | 60 | </div> |
|
61 | 61 | |
|
62 | 62 | <div id="list-left" class="splitcontentleft block-receiver"> |
|
63 |
<% @blocks['left'].each do |b| |
|
|
63 | <% @blocks['left'].each do |b| | |
|
64 | 64 | next unless MyController::BLOCKS.keys.include? b %> |
|
65 | 65 | <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %> |
|
66 | 66 | <% end if @blocks['left'] %> |
|
67 | 67 | </div> |
|
68 | 68 | |
|
69 | 69 | <div id="list-right" class="splitcontentright block-receiver"> |
|
70 |
<% @blocks['right'].each do |b| |
|
|
70 | <% @blocks['right'].each do |b| | |
|
71 | 71 | next unless MyController::BLOCKS.keys.include? b %> |
|
72 | 72 | <%= render :partial => 'block', :locals => {:user => @user, :block_name => b} %> |
|
73 | 73 | <% end if @blocks['right'] %> |
@@ -82,9 +82,8 function removeBlock(block) { | |||
|
82 | 82 | :constraint => false, |
|
83 | 83 | :url => { :action => "order_blocks", :group => "top" } |
|
84 | 84 | %> |
|
85 | ||
|
86 | ||
|
87 | <%= sortable_element 'list-left', | |
|
85 | ||
|
86 | <%= sortable_element 'list-left', | |
|
88 | 87 | :tag => 'div', |
|
89 | 88 | :only => 'mypage-box', |
|
90 | 89 | :handle => "handle", |
@@ -93,8 +92,8 function removeBlock(block) { | |||
|
93 | 92 | :constraint => false, |
|
94 | 93 | :url => { :action => "order_blocks", :group => "left" } |
|
95 | 94 | %> |
|
96 | ||
|
97 |
<%= sortable_element 'list-right', |
|
|
95 | ||
|
96 | <%= sortable_element 'list-right', | |
|
98 | 97 | :tag => 'div', |
|
99 | 98 | :only => 'mypage-box', |
|
100 | 99 | :handle => "handle", |
@@ -103,6 +102,6 function removeBlock(block) { | |||
|
103 | 102 | :constraint => false, |
|
104 | 103 | :url => { :action => "order_blocks", :group => "right" } |
|
105 | 104 | %> |
|
106 | ||
|
105 | ||
|
107 | 106 | <%= javascript_tag "updateSelect()" %> |
|
108 | 107 | <% html_title(l(:label_my_page)) -%> |
General Comments 0
You need to be logged in to leave comments.
Login now