@@ -121,6 +121,10 | |||
|
121 | 121 | <%= yield %> |
|
122 | 122 | </div> |
|
123 | 123 | |
|
124 | <div id="ajax-indicator" style="display:none;"> | |
|
125 | <span><%= l(:label_loading) %></span> | |
|
126 | </div> | |
|
127 | ||
|
124 | 128 | <div id="footer"> |
|
125 | 129 | <p><a href="http://redmine.rubyforge.org/">redMine</a> <small><%= Redmine::VERSION %> © 2006-2007 Jean-Philippe Lang</small></p> |
|
126 | 130 | </div> |
@@ -3,9 +3,7 | |||
|
3 | 3 | <div style="float:right;margin-right:16px;z-index:500;"> |
|
4 | 4 | <%= link_to_remote "", { |
|
5 | 5 | :url => { :action => "remove_block", :block => block_name }, |
|
6 | :complete => "removeBlock('block_#{block_name}')", | |
|
7 | :loading => "Element.show('indicator')", | |
|
8 | :loaded => "Element.hide('indicator')" }, | |
|
6 | :complete => "removeBlock('block_#{block_name}')" }, | |
|
9 | 7 | :class => "close-icon" |
|
10 | 8 | %> |
|
11 | 9 | </div> |
@@ -5,9 +5,9 function recreateSortables() { | |||
|
5 | 5 | Sortable.destroy('list-left'); |
|
6 | 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, |
|
|
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, |
|
|
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, |
|
|
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, 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, parameters:Sortable.serialize("list-right")})}, only:'mypage-box', tag:'div'}) | |
|
11 | 11 | } |
|
12 | 12 | |
|
13 | 13 | function updateSelect() { |
@@ -35,7 +35,6 function removeBlock(block) { | |||
|
35 | 35 | </script> |
|
36 | 36 | |
|
37 | 37 | <div class="contextual"> |
|
38 | <span id="indicator" style="display:none"><%= image_tag "loading.gif", :align => "absmiddle" %></span> | |
|
39 | 38 | <% form_tag({:action => "add_block"}, :id => "block-form") do %> |
|
40 | 39 | <%= select_tag 'block', "<option></option>" + options_for_select(@block_options), :id => "block-select" %> |
|
41 | 40 | <%= link_to_remote l(:button_add), |
@@ -43,9 +42,7 function removeBlock(block) { | |||
|
43 | 42 | :with => "Form.serialize('block-form')", |
|
44 | 43 | :update => "list-top", |
|
45 | 44 | :position => :top, |
|
46 |
:complete => "afterAddBlock();" |
|
|
47 | :loading => "Element.show('indicator')", | |
|
48 | :loaded => "Element.hide('indicator')" | |
|
45 | :complete => "afterAddBlock();" | |
|
49 | 46 | }, :class => 'icon icon-add' |
|
50 | 47 | %> |
|
51 | 48 | <% end %> |
@@ -83,10 +80,7 function removeBlock(block) { | |||
|
83 | 80 | :dropOnEmpty => true, |
|
84 | 81 | :containment => ['list-top', 'list-left', 'list-right'], |
|
85 | 82 | :constraint => false, |
|
86 | :complete => visual_effect(:highlight, 'list-top'), | |
|
87 | :url => { :action => "order_blocks", :group => "top" }, | |
|
88 | :loading => "Element.show('indicator')", | |
|
89 | :loaded => "Element.hide('indicator')" | |
|
83 | :url => { :action => "order_blocks", :group => "top" } | |
|
90 | 84 | %> |
|
91 | 85 | |
|
92 | 86 | |
@@ -97,10 +91,8 function removeBlock(block) { | |||
|
97 | 91 | :dropOnEmpty => true, |
|
98 | 92 | :containment => ['list-top', 'list-left', 'list-right'], |
|
99 | 93 | :constraint => false, |
|
100 | :complete => visual_effect(:highlight, 'list-left'), | |
|
101 | :url => { :action => "order_blocks", :group => "left" }, | |
|
102 | :loading => "Element.show('indicator')", | |
|
103 | :loaded => "Element.hide('indicator')" %> | |
|
94 | :url => { :action => "order_blocks", :group => "left" } | |
|
95 | %> | |
|
104 | 96 | |
|
105 | 97 | <%= sortable_element 'list-right', |
|
106 | 98 | :tag => 'div', |
@@ -109,9 +101,7 function removeBlock(block) { | |||
|
109 | 101 | :dropOnEmpty => true, |
|
110 | 102 | :containment => ['list-top', 'list-left', 'list-right'], |
|
111 | 103 | :constraint => false, |
|
112 | :complete => visual_effect(:highlight, 'list-right'), | |
|
113 | :url => { :action => "order_blocks", :group => "right" }, | |
|
114 | :loading => "Element.show('indicator')", | |
|
115 | :loaded => "Element.hide('indicator')" %> | |
|
104 | :url => { :action => "order_blocks", :group => "right" } | |
|
105 | %> | |
|
116 | 106 | |
|
117 | 107 | <%= javascript_tag "updateSelect()" %> |
@@ -18,12 +18,8 | |||
|
18 | 18 | { :url => { :controller => 'wiki', :action => 'preview', :id => @project, :page => @page.title }, |
|
19 | 19 | :method => 'get', |
|
20 | 20 | :update => 'preview', |
|
21 |
:with => "Form.serialize('wiki_form')" |
|
|
22 | :loading => "Element.show('indicator')", | |
|
23 | :loaded => "Element.hide('indicator')" | |
|
24 | } %> | |
|
25 | <span id="indicator" style="display:none"><%= image_tag "loading.gif", :align => "absmiddle" %></span> | |
|
26 | </p> | |
|
21 | :with => "Form.serialize('wiki_form')" | |
|
22 | } %></p> | |
|
27 | 23 | |
|
28 | 24 | <% end %> |
|
29 | 25 |
@@ -362,6 +362,7 label_permissions_report: Permissions report | |||
|
362 | 362 | label_watched_issues: Watched issues |
|
363 | 363 | label_related_issues: Related issues |
|
364 | 364 | label_applied_status: Applied status |
|
365 | label_loading: Loading... | |
|
365 | 366 | |
|
366 | 367 | button_login: Einloggen |
|
367 | 368 | button_submit: OK |
@@ -362,6 +362,7 label_permissions_report: Permissions report | |||
|
362 | 362 | label_watched_issues: Watched issues |
|
363 | 363 | label_related_issues: Related issues |
|
364 | 364 | label_applied_status: Applied status |
|
365 | label_loading: Loading... | |
|
365 | 366 | |
|
366 | 367 | button_login: Login |
|
367 | 368 | button_submit: Submit |
@@ -362,6 +362,7 label_permissions_report: Permissions report | |||
|
362 | 362 | label_watched_issues: Watched issues |
|
363 | 363 | label_related_issues: Related issues |
|
364 | 364 | label_applied_status: Applied status |
|
365 | label_loading: Loading... | |
|
365 | 366 | |
|
366 | 367 | button_login: Conexión |
|
367 | 368 | button_submit: Someter |
@@ -362,6 +362,7 label_permissions_report: Synthèse des permissions | |||
|
362 | 362 | label_watched_issues: Demandes surveillées |
|
363 | 363 | label_related_issues: Demandes liées |
|
364 | 364 | label_applied_status: Statut appliqué |
|
365 | label_loading: Chargement... | |
|
365 | 366 | |
|
366 | 367 | button_login: Connexion |
|
367 | 368 | button_submit: Soumettre |
@@ -362,6 +362,7 label_permissions_report: Report permessi | |||
|
362 | 362 | label_watched_issues: Watched issues |
|
363 | 363 | label_related_issues: Related issues |
|
364 | 364 | label_applied_status: Applied status |
|
365 | label_loading: Loading... | |
|
365 | 366 | |
|
366 | 367 | button_login: Login |
|
367 | 368 | button_submit: Invia |
@@ -363,6 +363,7 label_permissions_report: 権限レポート | |||
|
363 | 363 | label_watched_issues: Watched issues |
|
364 | 364 | label_related_issues: Related issues |
|
365 | 365 | label_applied_status: Applied status |
|
366 | label_loading: Loading... | |
|
366 | 367 | |
|
367 | 368 | button_login: ログイン |
|
368 | 369 | button_submit: 変更 |
@@ -362,6 +362,7 label_permissions_report: Relatorio de permissoes | |||
|
362 | 362 | label_watched_issues: Watched issues |
|
363 | 363 | label_related_issues: Related issues |
|
364 | 364 | label_applied_status: Applied status |
|
365 | label_loading: Loading... | |
|
365 | 366 | |
|
366 | 367 | button_login: Login |
|
367 | 368 | button_submit: Enviar |
@@ -365,6 +365,7 label_permissions_report: Permissions report | |||
|
365 | 365 | label_watched_issues: Watched issues |
|
366 | 366 | label_related_issues: Related issues |
|
367 | 367 | label_applied_status: Applied status |
|
368 | label_loading: Loading... | |
|
368 | 369 | |
|
369 | 370 | button_login: 登录 |
|
370 | 371 | button_submit: 提交 |
@@ -31,3 +31,17 function showTab(name) { | |||
|
31 | 31 | Element.addClassName('tab-' + name, "selected"); |
|
32 | 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 | 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