From: Jozef Zigmund jzigmund@redhat.com
This patch fixed bug in page for Adding Provider accounts. It was caused by using link_to with the same class of a href tag, so i've added id='edit_button' to editing provider's link. --- src/app/helpers/providers_helper.rb | 2 +- src/app/views/providers/_providers.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/helpers/providers_helper.rb b/src/app/helpers/providers_helper.rb index 1921056..cfc12b7 100644 --- a/src/app/helpers/providers_helper.rb +++ b/src/app/helpers/providers_helper.rb @@ -2,7 +2,7 @@ module ProvidersHelper
def edit_button(provider, action) if provider and action == 'show' - link_to 'Edit', edit_provider_path(provider), :class => 'button' + link_to 'Edit', edit_provider_path(provider), :class => 'button', :id => 'edit_button' else content_tag('a', 'Edit', :href => '#', :class => 'button disabled') end diff --git a/src/app/views/providers/_providers.haml b/src/app/views/providers/_providers.haml index 928853b..6c46532 100644 --- a/src/app/views/providers/_providers.haml +++ b/src/app/views/providers/_providers.haml @@ -15,7 +15,7 @@
:javascript $(document).ready( function () { - $("a.button").click(function (event) { + $("a#edit_button").click(function (event) { event.preventDefault() if (!$(this).attr("disabled")) { $.get(($(this).attr("href")), function (response) {
On 12/06/2010 04:58 PM, jzigmund@redhat.com wrote:
From: Jozef Zigmundjzigmund@redhat.com
This patch fixed bug in page for Adding Provider accounts. It was caused by using link_to with the same class of a href tag, so i've added id='edit_button' to editing provider's link.
src/app/helpers/providers_helper.rb | 2 +- src/app/views/providers/_providers.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/helpers/providers_helper.rb b/src/app/helpers/providers_helper.rb index 1921056..cfc12b7 100644 --- a/src/app/helpers/providers_helper.rb +++ b/src/app/helpers/providers_helper.rb @@ -2,7 +2,7 @@ module ProvidersHelper
def edit_button(provider, action) if provider and action == 'show'
link_to 'Edit', edit_provider_path(provider), :class => 'button'
link_to 'Edit', edit_provider_path(provider), :class => 'button', :id => 'edit_button' else content_tag('a', 'Edit', :href => '#', :class => 'button disabled') end
diff --git a/src/app/views/providers/_providers.haml b/src/app/views/providers/_providers.haml index 928853b..6c46532 100644 --- a/src/app/views/providers/_providers.haml +++ b/src/app/views/providers/_providers.haml @@ -15,7 +15,7 @@
:javascript $(document).ready( function () {
- $("a.button").click(function (event) {
- $("a#edit_button").click(function (event) { event.preventDefault() if (!$(this).attr("disabled")) { $.get(($(this).attr("href")), function (response) {
ACK
deltacloud-devel@lists.fedorahosted.org