@@ -121,6 +121,10 | |||||
121 | <%= yield %> |
|
121 | <%= yield %> | |
122 | </div> |
|
122 | </div> | |
123 |
|
123 | |||
|
124 | <div id="ajax-indicator" style="display:none;"> | |||
|
125 | <span><%= l(:label_loading) %></span> | |||
|
126 | </div> | |||
|
127 | ||||
124 | <div id="footer"> |
|
128 | <div id="footer"> | |
125 | <p><a href="http://redmine.rubyforge.org/">redMine</a> <small><%= Redmine::VERSION %> © 2006-2007 Jean-Philippe Lang</small></p> |
|
129 | <p><a href="http://redmine.rubyforge.org/">redMine</a> <small><%= Redmine::VERSION %> © 2006-2007 Jean-Philippe Lang</small></p> | |
126 | </div> |
|
130 | </div> |
@@ -3,9 +3,7 | |||||
3 | <div style="float:right;margin-right:16px;z-index:500;"> |
|
3 | <div style="float:right;margin-right:16px;z-index:500;"> | |
4 | <%= link_to_remote "", { |
|
4 | <%= link_to_remote "", { | |
5 | :url => { :action => "remove_block", :block => block_name }, |
|
5 | :url => { :action => "remove_block", :block => block_name }, | |
6 | :complete => "removeBlock('block_#{block_name}')", |
|
6 | :complete => "removeBlock('block_#{block_name}')" }, | |
7 | :loading => "Element.show('indicator')", |
|
|||
8 | :loaded => "Element.hide('indicator')" }, |
|
|||
9 | :class => "close-icon" |
|
7 | :class => "close-icon" | |
10 | %> |
|
8 | %> | |
11 | </div> |
|
9 | </div> |
@@ -5,9 +5,9 function recreateSortables() { | |||||
5 | Sortable.destroy('list-left'); |
|
5 | Sortable.destroy('list-left'); | |
6 | Sortable.destroy('list-right'); |
|
6 | Sortable.destroy('list-right'); | |
7 |
|
7 | |||
8 |
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, |
|
8 | 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'}) | |
9 |
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, |
|
9 | 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'}) | |
10 |
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, |
|
10 | 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'}) | |
11 | } |
|
11 | } | |
12 |
|
12 | |||
13 | function updateSelect() { |
|
13 | function updateSelect() { | |
@@ -35,7 +35,6 function removeBlock(block) { | |||||
35 | </script> |
|
35 | </script> | |
36 |
|
36 | |||
37 | <div class="contextual"> |
|
37 | <div class="contextual"> | |
38 | <span id="indicator" style="display:none"><%= image_tag "loading.gif", :align => "absmiddle" %></span> |
|
|||
39 | <% form_tag({:action => "add_block"}, :id => "block-form") do %> |
|
38 | <% form_tag({:action => "add_block"}, :id => "block-form") do %> | |
40 | <%= select_tag 'block', "<option></option>" + options_for_select(@block_options), :id => "block-select" %> |
|
39 | <%= select_tag 'block', "<option></option>" + options_for_select(@block_options), :id => "block-select" %> | |
41 | <%= link_to_remote l(:button_add), |
|
40 | <%= link_to_remote l(:button_add), | |
@@ -43,9 +42,7 function removeBlock(block) { | |||||
43 | :with => "Form.serialize('block-form')", |
|
42 | :with => "Form.serialize('block-form')", | |
44 | :update => "list-top", |
|
43 | :update => "list-top", | |
45 | :position => :top, |
|
44 | :position => :top, | |
46 |
:complete => "afterAddBlock();" |
|
45 | :complete => "afterAddBlock();" | |
47 | :loading => "Element.show('indicator')", |
|
|||
48 | :loaded => "Element.hide('indicator')" |
|
|||
49 | }, :class => 'icon icon-add' |
|
46 | }, :class => 'icon icon-add' | |
50 | %> |
|
47 | %> | |
51 | <% end %> |
|
48 | <% end %> | |
@@ -83,10 +80,7 function removeBlock(block) { | |||||
83 | :dropOnEmpty => true, |
|
80 | :dropOnEmpty => true, | |
84 | :containment => ['list-top', 'list-left', 'list-right'], |
|
81 | :containment => ['list-top', 'list-left', 'list-right'], | |
85 | :constraint => false, |
|
82 | :constraint => false, | |
86 | :complete => visual_effect(:highlight, 'list-top'), |
|
83 | :url => { :action => "order_blocks", :group => "top" } | |
87 | :url => { :action => "order_blocks", :group => "top" }, |
|
|||
88 | :loading => "Element.show('indicator')", |
|
|||
89 | :loaded => "Element.hide('indicator')" |
|
|||
90 | %> |
|
84 | %> | |
91 |
|
85 | |||
92 |
|
86 | |||
@@ -97,10 +91,8 function removeBlock(block) { | |||||
97 | :dropOnEmpty => true, |
|
91 | :dropOnEmpty => true, | |
98 | :containment => ['list-top', 'list-left', 'list-right'], |
|
92 | :containment => ['list-top', 'list-left', 'list-right'], | |
99 | :constraint => false, |
|
93 | :constraint => false, | |
100 | :complete => visual_effect(:highlight, 'list-left'), |
|
94 | :url => { :action => "order_blocks", :group => "left" } | |
101 | :url => { :action => "order_blocks", :group => "left" }, |
|
95 | %> | |
102 | :loading => "Element.show('indicator')", |
|
|||
103 | :loaded => "Element.hide('indicator')" %> |
|
|||
104 |
|
96 | |||
105 | <%= sortable_element 'list-right', |
|
97 | <%= sortable_element 'list-right', | |
106 | :tag => 'div', |
|
98 | :tag => 'div', | |
@@ -109,9 +101,7 function removeBlock(block) { | |||||
109 | :dropOnEmpty => true, |
|
101 | :dropOnEmpty => true, | |
110 | :containment => ['list-top', 'list-left', 'list-right'], |
|
102 | :containment => ['list-top', 'list-left', 'list-right'], | |
111 | :constraint => false, |
|
103 | :constraint => false, | |
112 | :complete => visual_effect(:highlight, 'list-right'), |
|
104 | :url => { :action => "order_blocks", :group => "right" } | |
113 | :url => { :action => "order_blocks", :group => "right" }, |
|
105 | %> | |
114 | :loading => "Element.show('indicator')", |
|
|||
115 | :loaded => "Element.hide('indicator')" %> |
|
|||
116 |
|
106 | |||
117 | <%= javascript_tag "updateSelect()" %> |
|
107 | <%= javascript_tag "updateSelect()" %> |
@@ -18,12 +18,8 | |||||
18 | { :url => { :controller => 'wiki', :action => 'preview', :id => @project, :page => @page.title }, |
|
18 | { :url => { :controller => 'wiki', :action => 'preview', :id => @project, :page => @page.title }, | |
19 | :method => 'get', |
|
19 | :method => 'get', | |
20 | :update => 'preview', |
|
20 | :update => 'preview', | |
21 |
:with => "Form.serialize('wiki_form')" |
|
21 | :with => "Form.serialize('wiki_form')" | |
22 | :loading => "Element.show('indicator')", |
|
22 | } %></p> | |
23 | :loaded => "Element.hide('indicator')" |
|
|||
24 | } %> |
|
|||
25 | <span id="indicator" style="display:none"><%= image_tag "loading.gif", :align => "absmiddle" %></span> |
|
|||
26 | </p> |
|
|||
27 |
|
23 | |||
28 | <% end %> |
|
24 | <% end %> | |
29 |
|
25 |
@@ -362,6 +362,7 label_permissions_report: Permissions report | |||||
362 | label_watched_issues: Watched issues |
|
362 | label_watched_issues: Watched issues | |
363 | label_related_issues: Related issues |
|
363 | label_related_issues: Related issues | |
364 | label_applied_status: Applied status |
|
364 | label_applied_status: Applied status | |
|
365 | label_loading: Loading... | |||
365 |
|
366 | |||
366 | button_login: Einloggen |
|
367 | button_login: Einloggen | |
367 | button_submit: OK |
|
368 | button_submit: OK |
@@ -362,6 +362,7 label_permissions_report: Permissions report | |||||
362 | label_watched_issues: Watched issues |
|
362 | label_watched_issues: Watched issues | |
363 | label_related_issues: Related issues |
|
363 | label_related_issues: Related issues | |
364 | label_applied_status: Applied status |
|
364 | label_applied_status: Applied status | |
|
365 | label_loading: Loading... | |||
365 |
|
366 | |||
366 | button_login: Login |
|
367 | button_login: Login | |
367 | button_submit: Submit |
|
368 | button_submit: Submit |
@@ -362,6 +362,7 label_permissions_report: Permissions report | |||||
362 | label_watched_issues: Watched issues |
|
362 | label_watched_issues: Watched issues | |
363 | label_related_issues: Related issues |
|
363 | label_related_issues: Related issues | |
364 | label_applied_status: Applied status |
|
364 | label_applied_status: Applied status | |
|
365 | label_loading: Loading... | |||
365 |
|
366 | |||
366 | button_login: Conexión |
|
367 | button_login: Conexión | |
367 | button_submit: Someter |
|
368 | button_submit: Someter |
@@ -362,6 +362,7 label_permissions_report: Synthèse des permissions | |||||
362 | label_watched_issues: Demandes surveillées |
|
362 | label_watched_issues: Demandes surveillées | |
363 | label_related_issues: Demandes liées |
|
363 | label_related_issues: Demandes liées | |
364 | label_applied_status: Statut appliqué |
|
364 | label_applied_status: Statut appliqué | |
|
365 | label_loading: Chargement... | |||
365 |
|
366 | |||
366 | button_login: Connexion |
|
367 | button_login: Connexion | |
367 | button_submit: Soumettre |
|
368 | button_submit: Soumettre |
@@ -362,6 +362,7 label_permissions_report: Report permessi | |||||
362 | label_watched_issues: Watched issues |
|
362 | label_watched_issues: Watched issues | |
363 | label_related_issues: Related issues |
|
363 | label_related_issues: Related issues | |
364 | label_applied_status: Applied status |
|
364 | label_applied_status: Applied status | |
|
365 | label_loading: Loading... | |||
365 |
|
366 | |||
366 | button_login: Login |
|
367 | button_login: Login | |
367 | button_submit: Invia |
|
368 | button_submit: Invia |
@@ -363,6 +363,7 label_permissions_report: 権限レポート | |||||
363 | label_watched_issues: Watched issues |
|
363 | label_watched_issues: Watched issues | |
364 | label_related_issues: Related issues |
|
364 | label_related_issues: Related issues | |
365 | label_applied_status: Applied status |
|
365 | label_applied_status: Applied status | |
|
366 | label_loading: Loading... | |||
366 |
|
367 | |||
367 | button_login: ログイン |
|
368 | button_login: ログイン | |
368 | button_submit: 変更 |
|
369 | button_submit: 変更 |
@@ -362,6 +362,7 label_permissions_report: Relatorio de permissoes | |||||
362 | label_watched_issues: Watched issues |
|
362 | label_watched_issues: Watched issues | |
363 | label_related_issues: Related issues |
|
363 | label_related_issues: Related issues | |
364 | label_applied_status: Applied status |
|
364 | label_applied_status: Applied status | |
|
365 | label_loading: Loading... | |||
365 |
|
366 | |||
366 | button_login: Login |
|
367 | button_login: Login | |
367 | button_submit: Enviar |
|
368 | button_submit: Enviar |
@@ -365,6 +365,7 label_permissions_report: Permissions report | |||||
365 | label_watched_issues: Watched issues |
|
365 | label_watched_issues: Watched issues | |
366 | label_related_issues: Related issues |
|
366 | label_related_issues: Related issues | |
367 | label_applied_status: Applied status |
|
367 | label_applied_status: Applied status | |
|
368 | label_loading: Loading... | |||
368 |
|
369 | |||
369 | button_login: 登录 |
|
370 | button_login: 登录 | |
370 | button_submit: 提交 |
|
371 | button_submit: 提交 |
@@ -31,3 +31,17 function showTab(name) { | |||||
31 | Element.addClassName('tab-' + name, "selected"); |
|
31 | Element.addClassName('tab-' + name, "selected"); | |
32 | return false; |
|
32 | return false; | |
33 | } |
|
33 | } | |
|
34 | ||||
|
35 | /* shows and hides ajax indicator */ | |||
|
36 | Ajax.Responders.register({ | |||
|
37 | onCreate: function(){ | |||
|
38 | if ($('ajax-indicator') && Ajax.activeRequestCount > 0) { | |||
|
39 | Element.show('ajax-indicator'); | |||
|
40 | } | |||
|
41 | }, | |||
|
42 | onComplete: function(){ | |||
|
43 | if ($('ajax-indicator') && Ajax.activeRequestCount == 0) { | |||
|
44 | Element.hide('ajax-indicator'); | |||
|
45 | } | |||
|
46 | } | |||
|
47 | }); |
@@ -636,3 +636,30 div.wiki code { | |||||
636 | } |
|
636 | } | |
637 |
|
637 | |||
638 | #preview .preview { background: #fafbfc url(../images/draft.png); } |
|
638 | #preview .preview { background: #fafbfc url(../images/draft.png); } | |
|
639 | ||||
|
640 | #ajax-indicator { | |||
|
641 | position: absolute; /* fixed not supported by IE */ | |||
|
642 | background-color:#eee; | |||
|
643 | border: 1px solid #bbb; | |||
|
644 | top:35%; | |||
|
645 | left:40%; | |||
|
646 | width:20%; | |||
|
647 | font-weight:bold; | |||
|
648 | text-align:center; | |||
|
649 | padding:0.6em; | |||
|
650 | z-index:100; | |||
|
651 | filter:alpha(opacity=50); | |||
|
652 | -moz-opacity:0.5; | |||
|
653 | opacity: 0.5; | |||
|
654 | -khtml-opacity: 0.5; | |||
|
655 | } | |||
|
656 | ||||
|
657 | html>body #ajax-indicator { position: fixed; } | |||
|
658 | ||||
|
659 | #ajax-indicator span { | |||
|
660 | background-position: 0% 40%; | |||
|
661 | background-repeat: no-repeat; | |||
|
662 | background-image: url(../images/loading.gif); | |||
|
663 | padding-left: 26px; | |||
|
664 | vertical-align: bottom; | |||
|
665 | } |
General Comments 0
You need to be logged in to leave comments.
Login now