summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-27 19:32:57 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-27 19:32:57 +0000
commit5db3396c07b26892a2e3cd26dc369113379553b1 (patch)
treee8c2462169f809f08572c62686d98a8d83620a2b /app/views
parentc1a18a28898fcac9fa6038bf42b67df43c2e728d (diff)
downloadredmine-5db3396c07b26892a2e3cd26dc369113379553b1.tar.gz
redmine-5db3396c07b26892a2e3cd26dc369113379553b1.zip
Added an ajax indicator for all ajax calls. Also removed highlight effects on my page layout edition.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@485 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/layouts/base.rhtml6
-rw-r--r--app/views/my/_block.rhtml4
-rw-r--r--app/views/my/page_layout.rhtml30
-rw-r--r--app/views/wiki/edit.rhtml8
4 files changed, 18 insertions, 30 deletions
diff --git a/app/views/layouts/base.rhtml b/app/views/layouts/base.rhtml
index 1929e386a..3d6390b95 100644
--- a/app/views/layouts/base.rhtml
+++ b/app/views/layouts/base.rhtml
@@ -115,12 +115,16 @@
</ul>
<% end %>
</div>
-
+
<div id="content">
<% if flash[:notice] %><p style="color: green"><%= flash[:notice] %></p><% end %>
<%= yield %>
</div>
+ <div id="ajax-indicator" style="display:none;">
+ <span><%= l(:label_loading) %></span>
+ </div>
+
<div id="footer">
<p><a href="http://redmine.rubyforge.org/">redMine</a> <small><%= Redmine::VERSION %> &copy 2006-2007 Jean-Philippe Lang</small></p>
</div>
diff --git a/app/views/my/_block.rhtml b/app/views/my/_block.rhtml
index 39e6c3bd7..bb5dd1f9f 100644
--- a/app/views/my/_block.rhtml
+++ b/app/views/my/_block.rhtml
@@ -3,9 +3,7 @@
<div style="float:right;margin-right:16px;z-index:500;">
<%= link_to_remote "", {
:url => { :action => "remove_block", :block => block_name },
- :complete => "removeBlock('block_#{block_name}')",
- :loading => "Element.show('indicator')",
- :loaded => "Element.hide('indicator')" },
+ :complete => "removeBlock('block_#{block_name}')" },
:class => "close-icon"
%>
</div>
diff --git a/app/views/my/page_layout.rhtml b/app/views/my/page_layout.rhtml
index 8cb09a554..28d2dbab8 100644
--- a/app/views/my/page_layout.rhtml
+++ b/app/views/my/page_layout.rhtml
@@ -5,9 +5,9 @@ function recreateSortables() {
Sortable.destroy('list-left');
Sortable.destroy('list-right');
- Sortable.create("list-top", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=top', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Highlight("list-top",{});}, onLoaded:function(request){Element.hide('indicator')}, onLoading:function(request){Element.show('indicator')}, parameters:Sortable.serialize("list-top")})}, only:'mypage-box', tag:'div'})
- Sortable.create("list-left", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=left', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Highlight("list-left",{});}, onLoaded:function(request){Element.hide('indicator')}, onLoading:function(request){Element.show('indicator')}, parameters:Sortable.serialize("list-left")})}, only:'mypage-box', tag:'div'})
- Sortable.create("list-right", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=right', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Highlight("list-right",{});}, onLoaded:function(request){Element.hide('indicator')}, onLoading:function(request){Element.show('indicator')}, parameters:Sortable.serialize("list-right")})}, only:'mypage-box', tag:'div'})
+ Sortable.create("list-top", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=top', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-top")})}, only:'mypage-box', tag:'div'})
+ Sortable.create("list-left", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=left', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-left")})}, only:'mypage-box', tag:'div'})
+ Sortable.create("list-right", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=right', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-right")})}, only:'mypage-box', tag:'div'})
}
function updateSelect() {
@@ -35,7 +35,6 @@ function removeBlock(block) {
</script>
<div class="contextual">
-<span id="indicator" style="display:none"><%= image_tag "loading.gif", :align => "absmiddle" %></span>
<% form_tag({:action => "add_block"}, :id => "block-form") do %>
<%= select_tag 'block', "<option></option>" + options_for_select(@block_options), :id => "block-select" %>
<%= link_to_remote l(:button_add),
@@ -43,9 +42,7 @@ function removeBlock(block) {
:with => "Form.serialize('block-form')",
:update => "list-top",
:position => :top,
- :complete => "afterAddBlock();",
- :loading => "Element.show('indicator')",
- :loaded => "Element.hide('indicator')"
+ :complete => "afterAddBlock();"
}, :class => 'icon icon-add'
%>
<% end %>
@@ -83,10 +80,7 @@ function removeBlock(block) {
:dropOnEmpty => true,
:containment => ['list-top', 'list-left', 'list-right'],
:constraint => false,
- :complete => visual_effect(:highlight, 'list-top'),
- :url => { :action => "order_blocks", :group => "top" },
- :loading => "Element.show('indicator')",
- :loaded => "Element.hide('indicator')"
+ :url => { :action => "order_blocks", :group => "top" }
%>
@@ -97,10 +91,8 @@ function removeBlock(block) {
:dropOnEmpty => true,
:containment => ['list-top', 'list-left', 'list-right'],
:constraint => false,
- :complete => visual_effect(:highlight, 'list-left'),
- :url => { :action => "order_blocks", :group => "left" },
- :loading => "Element.show('indicator')",
- :loaded => "Element.hide('indicator')" %>
+ :url => { :action => "order_blocks", :group => "left" }
+ %>
<%= sortable_element 'list-right',
:tag => 'div',
@@ -109,9 +101,7 @@ function removeBlock(block) {
:dropOnEmpty => true,
:containment => ['list-top', 'list-left', 'list-right'],
:constraint => false,
- :complete => visual_effect(:highlight, 'list-right'),
- :url => { :action => "order_blocks", :group => "right" },
- :loading => "Element.show('indicator')",
- :loaded => "Element.hide('indicator')" %>
+ :url => { :action => "order_blocks", :group => "right" }
+ %>
-<%= javascript_tag "updateSelect()" %> \ No newline at end of file
+<%= javascript_tag "updateSelect()" %>
diff --git a/app/views/wiki/edit.rhtml b/app/views/wiki/edit.rhtml
index af0b24df0..1c0139e73 100644
--- a/app/views/wiki/edit.rhtml
+++ b/app/views/wiki/edit.rhtml
@@ -18,12 +18,8 @@
{ :url => { :controller => 'wiki', :action => 'preview', :id => @project, :page => @page.title },
:method => 'get',
:update => 'preview',
- :with => "Form.serialize('wiki_form')",
- :loading => "Element.show('indicator')",
- :loaded => "Element.hide('indicator')"
- } %>
- <span id="indicator" style="display:none"><%= image_tag "loading.gif", :align => "absmiddle" %></span>
-</p>
+ :with => "Form.serialize('wiki_form')"
+ } %></p>
<% end %>