diff --git a/app/assets/javascripts/contracts.coffee b/app/assets/javascripts/contracts.coffee deleted file mode 100644 index 24f83d18b..000000000 --- a/app/assets/javascripts/contracts.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/sessions.coffee b/app/assets/javascripts/sessions.coffee deleted file mode 100644 index 24f83d18b..000000000 --- a/app/assets/javascripts/sessions.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/sotechsha.coffee b/app/assets/javascripts/sotechsha.coffee deleted file mode 100644 index 24f83d18b..000000000 --- a/app/assets/javascripts/sotechsha.coffee +++ /dev/null @@ -1,3 +0,0 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. -# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/static_pages.coffee b/app/assets/javascripts/static_pages.coffee deleted file mode 100644 index f50a8f580..000000000 --- a/app/assets/javascripts/static_pages.coffee +++ /dev/null @@ -1,5 +0,0 @@ -$ -> - $('.collapse').on 'shown.bs.collapse', -> - $(this).parent().find(".fa-chevron-right").removeClass("fa-chevron-right").addClass("fa-chevron-down") - $('.collapse').on 'hidden.bs.collapse', -> - $(this).parent().find(".fa-chevron-down").removeClass("fa-chevron-down").addClass("fa-chevron-right") diff --git a/app/views/shared/_dojos.html+smartphone.haml b/app/views/shared/_dojos.html+smartphone.haml index 2247aa7f8..04d32ba93 100644 --- a/app/views/shared/_dojos.html+smartphone.haml +++ b/app/views/shared/_dojos.html+smartphone.haml @@ -3,7 +3,7 @@ .panel.panel-default .panel-heading{id: "heading#{index}", role: "tab"} %h4.panel-title - %a{"data-parent" => "#accordion", "data-toggle" => "collapse", + %a{"data-toggle" => "collapse", href: "##{"collapse#{index}"}", role: "button"} %i.fa.fa-chevron-right{"aria-hidden" => "true"} = region @@ -11,3 +11,14 @@ .panel-collapse.collapse{id: "collapse#{index}", role: "tabpanel"} .panel-body.grayscale-bg.dojo-flex = render partial: 'shared/dojo', collection: dojos + +:javascript + $(document).ready(function() { + $('.collapse').on('shown.bs.collapse', function() { + $(this).parent().find(".fa-chevron-right").removeClass("fa-chevron-right").addClass("fa-chevron-down"); + }); + + $('.collapse').on('hidden.bs.collapse', function() { + $(this).parent().find(".fa-chevron-down").removeClass("fa-chevron-down").addClass("fa-chevron-right"); + }); + });