diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-11-02 14:09:08 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-11-02 14:09:08 +0000 |
commit | 07b49fe10430ced58675c876a4dea2f03e7dc0a8 (patch) | |
tree | 7f7393f1a3c7060632b92d7773b5001e49366723 /sonar-server | |
parent | 881fab03f390598ed76fff0e660562d619b687d4 (diff) | |
download | sonarqube-07b49fe10430ced58675c876a4dea2f03e7dc0a8.tar.gz sonarqube-07b49fe10430ced58675c876a4dea2f03e7dc0a8.zip |
fix update center for Google Chrome
Diffstat (limited to 'sonar-server')
3 files changed, 12 insertions, 9 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/available.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/available.html.erb index 4578dc6a0db..0e82b72feef 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/available.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/available.html.erb @@ -6,10 +6,12 @@ function installPlugin(key) { alert('Please accept the Terms and Conditions'); return false; } + $('install-form-' + key).submit(); + var button=$('submit-' + key); button.disable(); button.writeAttribute('value', 'Installing'); - return true; + return false; } </script> <%= render :partial => 'updatecenter/tabs', :locals => {:tab => 'available'} -%> @@ -71,8 +73,8 @@ function installPlugin(key) { <% if plugin.getTermsConditionsUrl() %> <input type="checkbox" id="tc-<%= plugin.getKey() -%>"></input> I accept the <%= link_to 'Terms and Conditions', plugin.getTermsConditionsUrl(), :class => 'external' %> <% end %> - <form method="post" action="<%= ApplicationController.root_context -%>/updatecenter/install?from=available&key=<%= plugin.getKey() -%>&version=<%= update.getRelease().getVersion() -%>" style="display: inline-block" id="install-<%= plugin.getKey() -%>"> - <input type="submit" value="Install" onClick="return installPlugin('<%= plugin.getKey() -%>')" id="submit-<%= plugin.getKey() -%>"></input> + <form method="post" action="<%= ApplicationController.root_context -%>/updatecenter/install?from=available&key=<%= plugin.getKey() -%>&version=<%= update.getRelease().getVersion() -%>" style="display: inline-block" id="install-form-<%= plugin.getKey() -%>"> + <input type="submit" value="Install" onClick="installPlugin('<%= plugin.getKey() -%>');return false;" id="submit-<%= plugin.getKey() -%>"></input> </form> </td> </tr> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb index b617f0e2f5f..d82ea22a0c1 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb @@ -27,7 +27,7 @@ <div id="detail-<%= plugin.plugin_key -%>" style="display:none"> <table class="spaced width100"> - <tr><td class="thin nowrap"><b>License:</b> </td><td><%= plugin.license -%></td></tr> + <% if plugin.license %><tr><td class="thin nowrap"><b>License:</b> </td><td><%= plugin.license -%></td></tr><% end %> <% if plugin.organization %> <tr><td class="thin nowrap"><b>Author:</b> </td> <td><%= link_to_if plugin.organization_url, plugin.organization, plugin.organization_url, :class=>'external' -%></td> @@ -43,9 +43,9 @@ <% end %> <tr> <td colspan="2"> - <form method="post" action="<%= ApplicationController.root_context -%>/updatecenter/uninstall?key=<%= plugin.plugin_key -%>" style="display: inline-block"> - <input type="submit" value="Uninstall"></input> - </form> + <form method="post" action="<%= ApplicationController.root_context -%>/updatecenter/uninstall?key=<%= plugin.plugin_key -%>" style="display: inline-block"> + <input type="submit" value="Uninstall"></input> + </form> </td> </tr> </table> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/updates.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/updates.html.erb index 64d5e0eb0cf..d7b3e30696f 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/updates.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/updatecenter/updates.html.erb @@ -1,9 +1,10 @@ <script> function upgradePlugin(key) { + $('upgrade-form-' + key).submit(); var button=$('upgrade-submit-' + key); button.disable(); button.writeAttribute('value', 'Upgrading'); - return true; + return false; } </script> @@ -52,7 +53,7 @@ function upgradePlugin(key) { <td> </td> <td colspan="5"> <form method="post" id="upgrade-form-<%= plugin.getKey() -%>" action="<%= ApplicationController.root_context -%>/updatecenter/install?from=updates&key=<%= plugin.getKey() -%>&version=<%= @last_compatible[plugin.getKey()] -%>" style="display: inline-block"> - <input type="submit" id="upgrade-submit-<%= plugin.getKey() -%>" value="Upgrade to <%= @last_compatible[plugin.getKey()] -%>" onClick="return upgradePlugin('<%= plugin.getKey() -%>')"></input> + <input type="submit" id="upgrade-submit-<%= plugin.getKey() -%>" value="Upgrade to <%= @last_compatible[plugin.getKey()] -%>" onClick="upgradePlugin('<%= plugin.getKey() -%>');return false;"></input> </form> </td> </tr> |