Преглед изворни кода

First article in aside set .current

soyjavi пре 14 година
родитељ
комит
4168a0dfa3
1 измењених фајлова са 9 додато и 0 уклоњено
  1. 9 0
      src/boot/Lungo.Boot.Section.js

+ 9 - 0
src/boot/Lungo.Boot.Section.js

@@ -22,6 +22,7 @@ Lungo.Boot.Section = (function(lng, undefined) {
     var init = function() {
         _initFirstSection();
         _initAllSections();
+        _initAllAsides();
 
         lng.View.Resize.toolbars();
     };
@@ -45,6 +46,14 @@ Lungo.Boot.Section = (function(lng, undefined) {
         }
     };
 
+    var _initAllAsides = function() {
+        var aside = null;
+        for (var i = 0, len = lng.Element.asides.length; i < len; i++) {
+            aside = lng.dom(lng.Element.asides[i]);
+            aside.children(ELEMENT.ARTICLE).addClass(CLASS.CURRENT);
+        }
+    };
+
     var _initArticles = function(section_index) {
         var section = lng.dom(lng.Element.sections[section_index]);