Skip to content

Commit

Permalink
Corrected bug that prevented nested mobile menus from being built.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Jackson authored and Paul Jackson committed Jun 18, 2012
1 parent d054a41 commit 98d843b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/js/pe-ap-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/theme-gcwu-fegc/js/theme-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/js/pe-ap.js
Expand Up @@ -611,7 +611,7 @@
* @param {jQuery object | DOM object} menusrc Existing menu to process
* @param {number} hlevel Heading level to process (e.g., h3 = 3)
* @param {string} theme Letter representing the jQuery Mobile theme
* @param {boolean} menubar Is the heading level to process in a menu bar?
* @param {boolean} menubar Optional. Is the heading level to process in a menu bar? Defaults to false.
* @function
* @return {jQuery object} Mobile menu
*/
Expand Down Expand Up @@ -663,7 +663,7 @@
subsection.find('ul').wrap('<div data-role="controlgroup">' + (nested.length > 0 ? "<div data-role=\"collapsible-set\" data-theme=\"" + theme + "\"></div>" : "") + '</div>');
} else {
// If the section contains sub-sections
subsection.append(pe.buildmenu($this.parent(), hlevel + 1, theme, false));
subsection.append(pe.menu.buildmobile($this.parent(), hlevel + 1, theme));
// If the original menu item was not in a menu bar
if (!menubar) {
subsection.find('div[data-role="collapsible-set"]').eq(0).prepend($this.children('a').html(hlink.html() + ' - ' + pe.dic.get('%home')).attr('data-role', 'button').attr('data-theme', theme).attr('data-icon', 'arrow-r').attr('data-iconpos', 'right'));
Expand Down
2 changes: 1 addition & 1 deletion src/theme-gcwu-fegc/js/theme.js
Expand Up @@ -66,7 +66,7 @@
}

if (pe.secnav.length > 0) {
nav = pe.menu.buildmobile(pe.secnav.find('.wb-sec-def'), 3, "c", false);
nav = pe.menu.buildmobile(pe.secnav.find('.wb-sec-def'), 3, "c");
pe.menu.expandmobile(nav);
mb_dialogue += $('<section><h2>' + pe.secnav.find('h2').eq(0).html() + '</h2></section>').append(nav).html();
pe.secnav.remove();
Expand Down

0 comments on commit 98d843b

Please sign in to comment.