소스 검색

Merge pull request #368 from 2DU/master

Master
ect (or 2du) 8 년 전
부모
커밋
3ed2d8329c
3개의 변경된 파일5개의 추가작업 그리고 8개의 파일을 삭제
  1. 5 0
      mark.py
  2. 0 6
      set_mark/mid_pas.py
  3. 0 2
      views/acme/index.tpl

+ 5 - 0
mark.py

@@ -74,6 +74,11 @@ def namumark(conn, title, data, num, in_c, toc_y):
     data = footnote(data, fol_num)
     data = table(data)
     data = end(data, category)
+
+    data += '<script>function folding(num) { var fol = document.getElementById(\'folding_\' + num); \
+            if(fol.style.display == \'inline-block\' || fol.style.display == \'block\') { fol.style.display = \'none\'; } \
+            else { if(num % 3 == 0) { fol.style.display = \'block\'; } else { fol.style.display = \'inline-block\'; } } } \
+            </script>'
     
     if(num == 1):        
         for d4 in backlink:

+ 0 - 6
set_mark/mid_pas.py

@@ -100,12 +100,6 @@ def mid_pas(data, fol_num, include, in_c, toc_y):
             elif fol:
                 fol_d = fol.groups()
                 if toc_y != 0:
-                    if folding_test == 0:
-                        data += '<script>function folding(num) { var fol = document.getElementById(\'folding_\' + num); \
-                                if(fol.style.display == \'inline-block\' || fol.style.display == \'block\') { fol.style.display = \'none\'; } \
-                                else { if(num % 3 == 0) { fol.style.display = \'block\'; } else { fol.style.display = \'inline-block\'; } } } \
-                                </script>'
-
                     data = com.sub("<div>" + fol_d[0] + " <div id='folding_" + str(fol_num + 1) + "' style='display: inline-block;'>" + \
                                     "[<a href='javascript:void(0);' onclick='folding(" + str(fol_num + 1) + \
                                     "); folding(" + str(fol_num + 2) + "); folding(" + str(fol_num) + ");'>펼치기</a>]</div>" + \

+ 0 - 2
views/acme/index.tpl

@@ -42,14 +42,12 @@
                             <a href="/recent_changes">
                                 <i class="fa fa-refresh" aria-hidden="true"></i>
                                 최근 변경
-                                <i class="fa fa-angle-left"></i>
                             </a>
                         </li>
                         <li>
                             <a href="/recent_discuss">
                                 <i class="fa fa-comment" aria-hidden="true"></i>
                                 최근 토론
-                                <i class="fa fa-angle-left"></i>
                             </a>
                         </li>
                         <li class="dropdown">