ref: refs/heads/master
commit cabddb14ffdd2e72bcbdf3045351b52a048c4f89
Author: Ladislav Slezak
Date: Tue Nov 3 20:19:29 2009 +0100
Use jQuery code for displaying #progress element
Prototype library is not loaded by default, use jQuery instead:
Element.show('progress') -> $('#progress').show()
---
.../app/views/administrator/index.html.erb | 2 +-
.../app/views/mail_settings/index.html.erb | 2 +-
plugins/network/app/views/network/index.html.erb | 2 +-
.../app/views/patch_updates/_patches.html.erb | 2 +-
.../app/views/patch_updates/index.html.erb | 2 +-
.../permissions/app/views/permissions/index.rhtml | 2 +-
.../app/views/registration/index.rhtml | 2 +-
.../app/views/samba_server/edit.html.erb | 2 +-
.../app/views/samba_server/new.html.erb | 2 +-
plugins/security/app/views/security/create.erb | 2 +-
plugins/security/app/views/security/update.erb | 2 +-
.../systemtime/app/views/systemtime/index.rhtml | 2 +-
plugins/users/app/views/users/edit.html.erb | 2 +-
plugins/users/app/views/users/index.html.erb | 4 ++--
plugins/users/app/views/users/new.html.erb | 2 +-
webclient/app/helpers/view_helpers/html_helper.rb | 2 +-
16 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/plugins/administrator/app/views/administrator/index.html.erb b/plugins/administrator/app/views/administrator/index.html.erb
index c0129cd..df8f886 100644
--- a/plugins/administrator/app/views/administrator/index.html.erb
+++ b/plugins/administrator/app/views/administrator/index.html.erb
@@ -49,7 +49,7 @@
<% disabled = ! @permissions[:write] %>
- <% form_for(:administrator, @administrator, :url => { :action => "update" }, :html => { :method => :put, :id => "adminForm" } ) do |f| %>
+ <% form_for(:administrator, @administrator, :url => { :action => "update" }, :html => { :method => :put, :id => "adminForm", :onsubmit => "$('#progress').show()" } ) do |f| %>
<%= f.error_messages %>
<fieldset id="password">
<p><label><%=_("Password")%></label>
diff --git a/plugins/mail_settings/app/views/mail_settings/index.html.erb b/plugins/mail_settings/app/views/mail_settings/index.html.erb
index 019b75e..faecaf8 100644
--- a/plugins/mail_settings/app/views/mail_settings/index.html.erb
+++ b/plugins/mail_settings/app/views/mail_settings/index.html.erb
@@ -56,7 +56,7 @@
</p>
</fieldset>
<p>
- <%= form_send_buttons :onclick=>"Element.show('progress')" %>
+ <%= form_send_buttons :onclick=>"$('#progress').show()" %>
</p>
<% end %>
</div>
diff --git a/plugins/network/app/views/network/index.html.erb b/plugins/network/app/views/network/index.html.erb
index 3e48c16..db0da6a 100644
--- a/plugins/network/app/views/network/index.html.erb
+++ b/plugins/network/app/views/network/index.html.erb
@@ -53,7 +53,7 @@
return false;
}
}
- Element.show('progress');
+ $('#progress').show();
return true;
};
<% end %>
diff --git a/plugins/patch_updates/app/views/patch_updates/_patches.html.erb b/plugins/patch_updates/app/views/patch_updates/_patches.html.erb
index 41f31b2..fe1f196 100644
--- a/plugins/patch_updates/app/views/patch_updates/_patches.html.erb
+++ b/plugins/patch_updates/app/views/patch_updates/_patches.html.erb
@@ -44,7 +44,7 @@
<td><%= link_to image_tag("/icons/system-software-install.png"\
, :alt => "install", :class=>"icon", :border => "0"),\
:controller => 'patch_updates', :id => patch_update.resolvable_id,\
- :onclick=>"Element.show('progress')", :method => :post, :action => "install" %></td>
+ :onclick=>"$('#progress').show()", :method => :post, :action => "install" %></td>
<% end %>
</tr>
<% end %>
diff --git a/plugins/patch_updates/app/views/patch_updates/index.html.erb b/plugins/patch_updates/app/views/patch_updates/index.html.erb
index bbc21b0..3c6d67d 100644
--- a/plugins/patch_updates/app/views/patch_updates/index.html.erb
+++ b/plugins/patch_updates/app/views/patch_updates/index.html.erb
@@ -29,7 +29,7 @@
<div id="patchesd"><%= render :partial => "patches"%></div>
- <%= submit_tag _("Update"), :onclick=>"Element.show('progress')", :action => 'install', :class => 'button' -%>
+ <%= submit_tag _("Update"), :onclick=>"$('#progress').show()", :action => 'install', :class => 'button' -%>
<%= link_to _("Back"), '/', :class=>"button" %>
<% end %>
<% end %>
diff --git a/plugins/permissions/app/views/permissions/index.rhtml b/plugins/permissions/app/views/permissions/index.rhtml
index 5715f7b..6ea24c1 100644
--- a/plugins/permissions/app/views/permissions/index.rhtml
+++ b/plugins/permissions/app/views/permissions/index.rhtml
@@ -52,7 +52,7 @@
<% form_tag '/permissions/search' do %>
<p><label for="user"><%=_("User")%></label>
>
- <%= submit_tag _("Search"), :disabled=> !@right_get_permissions, :onclick=>"Element.show('progress')", :class => 'button'%>
+ <%= submit_tag _("Search"), :disabled=> !@right_get_permissions, :onclick=>"$('#progress').show()", :class => 'button'%>
<% if @current_user.blank? %>
<a href="/" class="button"><%=_("Back")%></a>
<% end %>
diff --git a/plugins/registration/app/views/registration/index.rhtml b/plugins/registration/app/views/registration/index.rhtml
index 4fa518c..1dc515a 100644
--- a/plugins/registration/app/views/registration/index.rhtml
+++ b/plugins/registration/app/views/registration/index.rhtml
@@ -54,7 +54,7 @@
<tr><td height=10></td></tr>
<tr>
<td></td>
- <td align="right"><%= link_to _('Detail'), {:controller => :registration, :action =>:detail}, :onclick=>"Element.show('progress')", :class => "button"%></p></td>
+ <td align="right"><%= link_to _('Detail'), {:controller => :registration, :action =>:detail}, :onclick=>"$('#progress').show()", :class => "button"%></p></td>
</tr>
<% end %>
</table>
diff --git a/plugins/samba_server/app/views/samba_server/edit.html.erb b/plugins/samba_server/app/views/samba_server/edit.html.erb
index 29f9e84..d74efdc 100644
--- a/plugins/samba_server/app/views/samba_server/edit.html.erb
+++ b/plugins/samba_server/app/views/samba_server/edit.html.erb
@@ -25,6 +25,6 @@
</table>
<p><%= f.submit _("Update"), :disabled => disabled %>
- <%= link_to _('Back'), {:controller => :samba_server}, :onclick=>"Element.show('progress')", :class => "button"%></p>
+ <%= link_to _('Back'), {:controller => :samba_server}, :onclick=>"$('#progress').show()", :class => "button"%></p>
</div>
<% end %>
diff --git a/plugins/samba_server/app/views/samba_server/new.html.erb b/plugins/samba_server/app/views/samba_server/new.html.erb
index 82cb155..abbeff9 100644
--- a/plugins/samba_server/app/views/samba_server/new.html.erb
+++ b/plugins/samba_server/app/views/samba_server/new.html.erb
@@ -21,6 +21,6 @@
<% end %>
</table>
- <p><%= f.submit _("Create"), :onclick=>"Element.show('progress')" %><%= link_to _('Back'), 'samba_server', :onclick=>"Element.show('progress')", :class => "button" %></p>
+ <p><%= f.submit _("Create"), :onclick=>"$('#progress').show()" %><%= link_to _('Back'), 'samba_server', :onclick=>"$('#progress').show()", :class => "button" %></p>
</div>
<% end %>
diff --git a/plugins/security/app/views/security/create.erb b/plugins/security/app/views/security/create.erb
index a4f9736..da38b2d 100644
--- a/plugins/security/app/views/security/create.erb
+++ b/plugins/security/app/views/security/create.erb
@@ -24,7 +24,7 @@
<span>
<hbox>
- <%= submit_tag _("Save"), :onclick=>"Element.show('progress')",
+ <%= submit_tag _("Save"), :onclick=>"$('#progress').show()",
:disabled => !@client.permissions[:write], :class => 'button' -%>
<a href="/" class="button"><%=_("Back")%></a>
</hbox>
diff --git a/plugins/security/app/views/security/update.erb b/plugins/security/app/views/security/update.erb
index 3ee7d24..8e24273 100644
--- a/plugins/security/app/views/security/update.erb
+++ b/plugins/security/app/views/security/update.erb
@@ -23,7 +23,7 @@
<span>
<hbox>
- <%= submit_tag _("Save"), :onclick=>"Element.show('progress')",
+ <%= submit_tag _("Save"), :onclick=>"$('#progress').show()",
:disabled => !@client.permissions[:write], :class => 'button' -%>
<a href="/" class="button"><%=_("Back")%></a>
</hbox>
diff --git a/plugins/systemtime/app/views/systemtime/index.rhtml b/plugins/systemtime/app/views/systemtime/index.rhtml
index a45ba0c..9b147d5 100644
--- a/plugins/systemtime/app/views/systemtime/index.rhtml
+++ b/plugins/systemtime/app/views/systemtime/index.rhtml
@@ -25,7 +25,7 @@
alert ("<%= _("Invalid time format. Correct one is hh:mm:ss") %>");
return false;
}
- Element.show('progress');
+ $('#progress').show();
return true;
};
<% end -%>
diff --git a/plugins/users/app/views/users/edit.html.erb b/plugins/users/app/views/users/edit.html.erb
index 4a99bac..6cbd33c 100644
--- a/plugins/users/app/views/users/edit.html.erb
+++ b/plugins/users/app/views/users/edit.html.erb
@@ -44,6 +44,6 @@
<td class="last"><%= f.password_field :user_password, :disabled => disabled %></td>
</tr>
</table>
- <p><%= f.submit _("Update"), :disabled => disabled %><%= link_to _('Back'), {:action => :index}, :onclick=>"Element.show('progress')", :class => "button"%></p>
+ <p><%= f.submit _("Update"), :disabled => disabled %><%= link_to _('Back'), {:action => :index}, :onclick=>"$('#progress').show()", :class => "button"%></p>
</div>
<% end %>
diff --git a/plugins/users/app/views/users/index.html.erb b/plugins/users/app/views/users/index.html.erb
index 6f4fe8e..89c5825 100644
--- a/plugins/users/app/views/users/index.html.erb
+++ b/plugins/users/app/views/users/index.html.erb
@@ -15,7 +15,7 @@
<tr>
<td><strong><%=h user.uid %></strong></td>
<td><%=h user.cn %></td>
- <td><%= link_to image_tag("/images/edit-icon.gif", :alt => :edit), {:action => :edit, :id => user.id}, :onclick=>"Element.show('progress')" %></td>
+ <td><%= link_to image_tag("/images/edit-icon.gif", :alt => :edit), {:action => :edit, :id => user.id}, :onclick=>"$('#progress').show()" %></td>
<% if @permissions[:userdelete] %>
<td class="last"><%= html_delete_link(user.uid, :destroy) %></td>
<% end %>
@@ -25,7 +25,7 @@
<% if @permissions[:useradd] %>
<div class="select">
- <%= link_to _("<strong>[New User]</strong>"), {:action => :new}, :onclick=>"Element.show('progress')" -%><p/>
+ <%= link_to _("<strong>[New User]</strong>"), {:action => :new}, :onclick=>"$('#progress').show()" -%><p/>
</div>
<% end %>
diff --git a/plugins/users/app/views/users/new.html.erb b/plugins/users/app/views/users/new.html.erb
index 9b81d49..945e6aa 100644
--- a/plugins/users/app/views/users/new.html.erb
+++ b/plugins/users/app/views/users/new.html.erb
@@ -42,6 +42,6 @@
<td class="last"><%= f.password_field :user_password %></td>
</tr>
</table>
- <p><%= f.submit _("Create"), :onclick=>"Element.show('progress')" %><%= link_to _('Back'), {:action => :index }, :onclick=>"Element.show('progress')", :class => "button" %></p>
+ <p><%= f.submit _("Create"), :onclick=>".show()" %><%= link_to _('Back'), {:action => :index }, :onclick=>"$('#progress').show()", :class => "button" %></p>
</div>
<% end %>
diff --git a/webclient/app/helpers/view_helpers/html_helper.rb b/webclient/app/helpers/view_helpers/html_helper.rb
index 1564dc8..b0492f0 100644
--- a/webclient/app/helpers/view_helpers/html_helper.rb
+++ b/webclient/app/helpers/view_helpers/html_helper.rb
@@ -2,7 +2,7 @@
module ViewHelpers::HtmlHelper
def html_edit_link(id, action = :edit)
- return link_to image_tag("/images/edit-icon.gif", :alt => :edit), {:action => action, :id => id}, :onclick=>"Element.show('progress')"
+ return link_to image_tag("/images/edit-icon.gif", :alt => :edit), {:action => action, :id => id}, :onclick=>"$('#progress').show()"
end
def html_delete_link(id, action = :delete)
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org