ref: refs/heads/master
commit e33f8f9170442cb50f9639492186e50e7362706b
Author: Josef Reidinger
Date: Thu Jul 16 15:58:38 2009 +0200
fix last changes that breaks AJAX stuff, improve indenting
---
.../views/patch_updates/_patch_summary.html.erb | 2 +-
webclient/app/views/controlpanel/index.rhtml | 44 ++++++++++++--------
webclient/public/stylesheets/yast.css | 7 +---
3 files changed, 29 insertions(+), 24 deletions(-)
diff --git a/plugins/patch_updates/app/views/patch_updates/_patch_summary.html.erb b/plugins/patch_updates/app/views/patch_updates/_patch_summary.html.erb
index 571ca7d..58c9aa1 100644
--- a/plugins/patch_updates/app/views/patch_updates/_patch_summary.html.erb
+++ b/plugins/patch_updates/app/views/patch_updates/_patch_summary.html.erb
@@ -1,4 +1,4 @@
-<div>
+<div class="status_patches">
<% unless patch %>
<img src="/images/button_warning.png" alt="warning icon" />
<%= _("Error occur during loading patch information.") %>
diff --git a/webclient/app/views/controlpanel/index.rhtml b/webclient/app/views/controlpanel/index.rhtml
index 6168c16..2012ba1 100644
--- a/webclient/app/views/controlpanel/index.rhtml
+++ b/webclient/app/views/controlpanel/index.rhtml
@@ -1,11 +1,21 @@
+<%= javascript_include_tag :defaults %>
+<% if ActionController::Routing.possible_controllers.include?("patch_updates") %>
+ <% javascript_tag do -%>
+ $(document).ready( function() {
+ <%= remote_function(:update => "status_patches",
+ :url => { :controller => :patch_updates, :action => :show_summary }) %>
+ });
+ <% end -%>
+<% end %>
<h3><img src="/images/monitoring.png" height="23" width="23" border="0" /> <%= _("Status") %></h3>
-<div id="status_patches_icon">
- height="32" width="32" border="0" />
-</div>
-<div id="status_patches_msg">
- <a href="patch_updates"><%=@update_label%></a>
+<div id="status_patches">
+ <% if ActionController::Routing.possible_controllers.include?("patch_updates") %>
+ <img src="/images/working.gif" height="32" width="32" border="0" /> Loading informations about patches
+ <% else %>
+ Patch plugin is not installed.
+ <% end %>
</div>
<br />
<div id="status_health_icon">
@@ -16,20 +26,20 @@
</div>
<div id="favorites">
-<h3><img src="/images/yast-config.png" height="23" width="23" border="0" /> <%= _("Configuration") %></h3>
+ <h3><img src="/images/yast-config.png" height="23" width="23" border="0" /> <%= _("Configuration") %></h3>
+
+ <% line_counter = 0 %>
+ <% shortcuts_counter = 0 %>
+ <div class="list-row overview">
-<% line_counter = 0 %>
-<% shortcuts_counter = 0 %>
-<div class="list-row overview">
-
<% @shortcuts.each do |name, data| %>
<% logger.debug data.inspect %>
- <% if line_counter*5 == shortcuts_counter %>
+ <% if line_counter*5 == shortcuts_counter %>
<% if line_counter > 0 %>
</div>
- <% end %>
- <% line_counter +=1 %>
- <div class="highlight-bg">
+ <% end %>
+ <% line_counter +=1 %>
+ <div class="highlight-bg">
<% end %>
<% link_to (data['url']) do %>
<img src="<%= data['icon'] %>"/>
@@ -39,9 +49,9 @@
<% end %>
<% shortcuts_counter +=1 %>
<% end %>
- <% if line_counter*5 != shortcuts_counter-1 %>
- </div>
- <% end %>
+ <% if line_counter*5 != shortcuts_counter-1 %>
+ </div>
+ <% end %>
</div>
diff --git a/webclient/public/stylesheets/yast.css b/webclient/public/stylesheets/yast.css
index 58091c7..59f90e4 100644
--- a/webclient/public/stylesheets/yast.css
+++ b/webclient/public/stylesheets/yast.css
@@ -37,15 +37,10 @@
color: red;
}
-#status_patches_icon {
+#status_patches {
margin-left: 2em;
}
-#status_patches_msg {
- margin-left: 5em;
- margin-top: -1.5em;
-}
-
#status_health_icon {
margin-left: 2em;
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org