|
|
@@ -31,7 +31,7 @@ Lungo.Router = do(lng = Lungo) ->
|
|
|
|
|
|
lng.Section.show current, target
|
|
|
lng.Router.step section_id
|
|
|
- do _url
|
|
|
+ do _url if Lungo.Config.history
|
|
|
do _updateNavigationElements
|
|
|
|
|
|
|
|
|
@@ -50,7 +50,8 @@ Lungo.Router = do(lng = Lungo) ->
|
|
|
lng.Element.Cache.article = target.addClass(C.CLASS.ACTIVE).trigger(C.TRIGGER.LOAD)
|
|
|
if element?.data(C.ATTRIBUTE.TITLE)?
|
|
|
lng.Element.Cache.section.find(C.QUERY.TITLE).text element.data(C.ATTRIBUTE.TITLE)
|
|
|
- do _url
|
|
|
+ do _url if Lungo.Config.history
|
|
|
+ do _updateNavigationElements
|
|
|
|
|
|
|
|
|
###
|
|
|
@@ -70,7 +71,7 @@ Lungo.Router = do(lng = Lungo) ->
|
|
|
if target.hasClass("aside") then lng.Aside.toggle()
|
|
|
|
|
|
lng.Section.show current, target
|
|
|
- do _url
|
|
|
+ do _url if Lungo.Config.history?
|
|
|
do _updateNavigationElements
|
|
|
|
|
|
|
|
|
@@ -99,7 +100,6 @@ Lungo.Router = do(lng = Lungo) ->
|
|
|
_hashed_url += "#{section}/" for section in _history
|
|
|
_hashed_url += lng.Element.Cache.article.attr "id"
|
|
|
setTimeout (-> window.location.hash = _hashed_url), 0
|
|
|
- do _updateNavigationElements
|
|
|
|
|
|
_updateNavigationElements = ->
|
|
|
article_id = lng.Element.Cache.article.attr C.ATTRIBUTE.ID
|