From 5d3fb35cd149288ddbab94ffa903c5977ca3da76 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Thu, 22 Nov 2012 02:08:53 +0100 Subject: [PATCH] Rename JS behaviors --- app/assets/javascripts/behaviors/details_behavior.coffee | 5 +++++ app/assets/javascripts/behaviors/toggler_behavior.coffee | 5 +++++ app/assets/javascripts/behaviours/details_behavior.coffee | 5 ----- app/assets/javascripts/behaviours/toggler_behaviour.coffee | 5 ----- 4 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 app/assets/javascripts/behaviors/details_behavior.coffee create mode 100644 app/assets/javascripts/behaviors/toggler_behavior.coffee delete mode 100644 app/assets/javascripts/behaviours/details_behavior.coffee delete mode 100644 app/assets/javascripts/behaviours/toggler_behaviour.coffee diff --git a/app/assets/javascripts/behaviors/details_behavior.coffee b/app/assets/javascripts/behaviors/details_behavior.coffee new file mode 100644 index 00000000..7ad5c818 --- /dev/null +++ b/app/assets/javascripts/behaviors/details_behavior.coffee @@ -0,0 +1,5 @@ +$ -> + $("body").on "click", ".js-details-target", -> + container = $(@).closest(".js-details-container") + + container.toggleClass("open") diff --git a/app/assets/javascripts/behaviors/toggler_behavior.coffee b/app/assets/javascripts/behaviors/toggler_behavior.coffee new file mode 100644 index 00000000..3fefbf8e --- /dev/null +++ b/app/assets/javascripts/behaviors/toggler_behavior.coffee @@ -0,0 +1,5 @@ +$ -> + $("body").on "click", ".js-toggler-target", -> + container = $(@).closest(".js-toggler-container") + + container.toggleClass("on") diff --git a/app/assets/javascripts/behaviours/details_behavior.coffee b/app/assets/javascripts/behaviours/details_behavior.coffee deleted file mode 100644 index f75284d9..00000000 --- a/app/assets/javascripts/behaviours/details_behavior.coffee +++ /dev/null @@ -1,5 +0,0 @@ -$ -> - $("body").on "click", ".js-details-target", -> - container = $(@).closest ".js-details-container" - - container.toggleClass "open" diff --git a/app/assets/javascripts/behaviours/toggler_behaviour.coffee b/app/assets/javascripts/behaviours/toggler_behaviour.coffee deleted file mode 100644 index 76f200d4..00000000 --- a/app/assets/javascripts/behaviours/toggler_behaviour.coffee +++ /dev/null @@ -1,5 +0,0 @@ -$ -> - $("body").on "click", ".js-toggler-target", -> - container = $(@).closest ".js-toggler-container" - - container.toggleClass "on"