Skip to content
Permalink
Browse files

Merge pull request #12945 from aeslaughter/MOOSEDocs-content-order

Sort headings in MooseDocs content extension
  • Loading branch information...
permcody committed Feb 21, 2019
2 parents 36bec2b + aba4555 commit 715a6fd1443aa96d05e71b546451cc7cffe4ddaf
Showing with 5 additions and 4 deletions.
  1. +1 −1 framework/doc/content/js/init.js
  2. +4 −3 python/MooseDocs/extensions/content.py
@@ -4,6 +4,7 @@
$('.modal').modal();
$('.collapsible').collapsible();
$('.slider').slider();
$('.materialboxed').materialbox();
$('.dropdown-trigger').dropdown({
inDuration: 300,
outDuration: 225,
@@ -13,7 +14,6 @@
alignment: 'left' // Displays dropdown with edge aligned to the left of button
});


// $('.collapsible').collapsible({
// onOpen: function(el) {var icons = $(el).find('i'); $(icons[0]).text('keyboard_arrow_up');},
// onClose: function(el) {var icons = $(el).find('i'); $(icons[0]).text('keyboard_arrow_down');}
@@ -135,8 +135,8 @@ def createMaterialize(self, parent, token, page):
headings = self.extension.binContent(page, token['location'], ContentExtension.FOLDER)

# Build lists
for head, items in headings.iteritems():

for head in sorted(headings.keys()):
items = headings[head]
if head:
html.Tag(parent, 'h{:d}'.format(int(token['level'])),
class_='moose-a-to-z',
@@ -154,7 +154,8 @@ def createLatex(self, parent, token, page):

headings = self.extension.binContent(page, token['location'], ContentExtension.FOLDER)
latex.Command(parent, 'par', start='\n')
for items in headings.itervalues():
for key in sorted(headings.keys()):
items = headings[key]
for text, path, label in sorted(items, key=lambda x: x[2]):
args = [latex.Brace(string=path, escape=False),
latex.Brace(string=label, escape=False)]

0 comments on commit 715a6fd

Please sign in to comment.
You can’t perform that action at this time.