lib/assets/javascripts/up/navigation.js.coffee in upjs-rails-0.9.1 vs lib/assets/javascripts/up/navigation.js.coffee in upjs-rails-0.10.0
- old
+ new
@@ -21,19 +21,19 @@
@method up.navigation.defaults
@param {Number} [options.currentClass]
The class to set on [links that point the current location](#up-current).
###
config = u.config
- currentClass: 'up-current'
+ currentClasses: ['up-current']
reset = ->
config.reset()
currentClass = ->
- klass = config.currentClass
- unless u.contains(klass, 'up-current')
- klass += ' up-current'
- klass
+ classes = config.currentClasses
+ classes = classes.concat(['up-current'])
+ classes = u.uniq(classes)
+ classes.join(' ')
CLASS_ACTIVE = 'up-active'
SELECTORS_SECTION = ['a', '[up-href]', '[up-alias]']
SELECTOR_SECTION = SELECTORS_SECTION.join(', ')
SELECTOR_SECTION_INSTANT = ("#{selector}[up-instant]" for selector in SELECTORS_SECTION).join(', ')