Skip to content

Commit

Permalink
Additional fix to submenus
Browse files Browse the repository at this point in the history
- Additionally disabled debug in the flask config
  • Loading branch information
LupusUmbrae committed May 21, 2016
1 parent e60e4e1 commit ac34f7f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 1 addition & 3 deletions kdm.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash, Response

# Config
DEBUG = True


DEBUG = False

app = Flask(__name__)
app.config.from_object(__name__)
Expand Down
12 changes: 9 additions & 3 deletions static/javascript/kdm.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,15 @@

$(function() {
$('.dropdown-submenu').click(
function() {
$('.dropdown-submenu > .dropdown-menu').css('display','block');
return false;
function(event) {
// stop bootstrap.js to hide the parents
event.stopPropagation();
// hide the open children
$( this ).find(".dropdown-submenu").removeClass('open');
// add 'open' class to all parents with class 'dropdown-submenu'
$( this ).parents(".dropdown-submenu").addClass('open');
// this is also open (or was)
$( this ).toggleClass('open');
});

$("#load-dialog").dialog({
Expand Down

0 comments on commit ac34f7f

Please sign in to comment.