Browse Source

No delay in ajax section/article

Javi Jimenez Villar 13 năm trước cách đây
mục cha
commit
8e3596d349
1 tập tin đã thay đổi với 6 bổ sung8 xóa
  1. 6 8
      src/boot/Lungo.Boot.Events.coffee

+ 6 - 8
src/boot/Lungo.Boot.Events.coffee

@@ -64,14 +64,12 @@ Lungo.Boot.Events = do(lng = Lungo) ->
 
     lng.Boot.Data.init "##{id}"
     link.removeAttribute("data-async") for link in lng.dom "[data-async='#{url}']"
-    setTimeout (->
-      if type is C.ELEMENT.ARTICLE
-        lng.Router.article section_id, id
-        lng.Aside.hide()
-      else
-        lng.Router.section id
-      do lng.Notification.hide
-    ), lng.Constants.TRANSITION.DURATION * 2
+    if type is C.ELEMENT.ARTICLE
+      lng.Router.article section_id, id
+      lng.Aside.hide()
+    else
+      lng.Router.section id
+    do lng.Notification.hide
 
 
   _onAside = (event) ->