Skip to content

Commit

Permalink
Should be done, needs testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Altmann committed Feb 10, 2015
1 parent 1b8cf1b commit 09913fb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions app/assets/javascripts/visual/accordion.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ accordion = ->
.removeClass('ui-accordion-header-icon ui-icon ui-icon-triangle-1-s')


# Event handlers
# Event handler for scrolling
$accordions
.filter('.Accordion--scrollToActive')
.on('accordionactivate', (event, ui) ->
Expand All @@ -51,9 +51,5 @@ accordion = ->
.closest('.Accordion')
.accordion('option', 'active', target_index)

#$target_el = $('.Accordion-item--active')
#if $target_el.length > 0
# target = $('.Accordion-item--active').index()


$(document).on('page:done ready', accordion)
2 changes: 1 addition & 1 deletion app/views/application/_accordion_layout.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/ You should have received a copy of the GNU Affero General Public License
/ along with Fairmondo. If not, see <http://www.gnu.org/licenses/>.
/
.Accordion-item id=accordion_name class="#{accordion_item_class}#{params[:active_accordion]==accordion_name ? ' Accordion-item--active' : '' }"
.Accordion-item id=accordion_name class=accordion_item_class
a href="##{accordion_name}" class="Accordion-header #{accordion_header_class}"
- if accordion_arrow
i.icon-arrow
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/show/_article_accordion.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

= paginate articles,
link_attributes: { data: {scroll: false} },
params: { active_accordion: item_name },
params: { anchor: item_name },
param_name: "#{item_name}_articles_page"

- if current_user.type == "LegalEntity"
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/show/_line_item_group_accordion.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
line_item_group: group
= paginate line_item_groups,
link_attributes: { data: {scroll: false} },
params: { active_accordion: item_name },
params: { anchor: item_name },
param_name: "#{item_name}_page"

/ - if current_user.type == 'LegalEntity' && item_name == 'seller_line_item_groups'
Expand Down

0 comments on commit 09913fb

Please sign in to comment.