Skip to content

Commit

Permalink
prefixed css classes, fixes #152 (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnnkB committed Aug 14, 2020
1 parent 83d398d commit d474a6a
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 101 deletions.
72 changes: 36 additions & 36 deletions flask_debugtoolbar/static/css/toolbar.css
Expand Up @@ -53,7 +53,7 @@
}

#flDebug #flDebugToolbar li>a,
#flDebug #flDebugToolbar li>div.contentless {
#flDebug #flDebugToolbar li>div.flDebugContentless {
font-weight:normal;
font-style:normal;
text-decoration:none;
Expand All @@ -68,15 +68,15 @@
background-color:#ffc;
}

#flDebug #flDebugToolbar li.active {
#flDebug #flDebugToolbar li.flDebugActive {
background-image:url(../img/indicator.png);
background-repeat:no-repeat;
background-position:left center;
background-color:#333;
padding-left:10px;
}

#flDebug #flDebugToolbar li.active a:hover {
#flDebug #flDebugToolbar li.flDebugActive a:hover {
color:#b36a60;
background-color:transparent;
}
Expand All @@ -89,7 +89,7 @@
font-variant:small-caps;
}

#flDebug #flDebugToolbar li .switch {
#flDebug #flDebugToolbar li .flDebugSwitch {
font-size: 10px;
position: absolute;
display: block;
Expand All @@ -101,11 +101,11 @@
right: 2px;
}

#flDebug #flDebugToolbar li .switch.active {
#flDebug #flDebugToolbar li .flDebugSwitch.flDebugActive {
background-image: url(../img/tick.png);
}

#flDebug #flDebugToolbar li .switch.inactive {
#flDebug #flDebugToolbar li .flDebugSwitch.flDebugInactive {
background-image: url(../img/tick-red.png);
}

Expand All @@ -120,7 +120,7 @@
opacity:0.75;
}

#flDebug a#flShowToolBarButton {
#flDebug a#flDebugShowToolBarButton {
display:block;
height:75px;
width:30px;
Expand All @@ -138,7 +138,7 @@
opacity:0.5;
}

#flDebug a#flShowToolBarButton:hover {
#flDebug a#flDebugShowToolBarButton:hover {
background-color:#111;
padding-right:6px;
border-top-color:#FFE761;
Expand All @@ -157,7 +157,7 @@
background-color:#f5f5f5;
}

#flDebug .panelContent {
#flDebug .flDebugPanelContentParent {
display:none;
position:fixed;
margin:0;
Expand All @@ -170,7 +170,7 @@
z-index:100000000;
}

#flDebug .panelContent > div {
#flDebug .flDebugPanelContentParent > div {
border-bottom:1px solid #ddd;
}

Expand Down Expand Up @@ -223,7 +223,7 @@
font-size: 14px;
}

#flDebug .panelContent table {
#flDebug .flDebugPanelContentParent table {
border:1px solid #ccc;
border-collapse:collapse;
width:100%;
Expand All @@ -232,29 +232,29 @@
margin-top:0.8em;
overflow: auto;
}
#flDebug .panelContent tbody td,
#flDebug .panelContent tbody th {
#flDebug .flDebugPanelContentParent tbody td,
#flDebug .flDebugPanelContentParent tbody th {
vertical-align:top;
padding:2px 3px;
}
#flDebug .panelContent thead th {
#flDebug .flDebugPanelContentParent thead th {
padding:1px 6px 1px 3px;
text-align:left;
font-weight:bold;
font-size:14px;
}
#flDebug .panelContent tbody th {
#flDebug .flDebugPanelContentParent tbody th {
width:12em;
text-align:right;
color:#666;
padding-right:.5em;
}

#flDebug .panelContent ol li {
#flDebug .flDebugPanelContentParent ol li {
margin: 0 0 1em 2em;
}

#flDebug .panelContent pre {
#flDebug .flDebugPanelContentParent pre {
border:1px solid #ccc;
background-color:#fff;
display:block;
Expand All @@ -266,7 +266,7 @@
background-color:#fff;
}

#flDebug .panelContent .flDebugClose {
#flDebug .flDebugPanelContentParent .flDebugClose {
text-indent:-9999999px;
display:block;
position:absolute;
Expand All @@ -277,38 +277,38 @@
background:url(../img/close.png) no-repeat center center;
}

#flDebug .panelContent .flDebugClose:hover {
#flDebug .flDebugPanelContentParent .flDebugClose:hover {
background-image:url(../img/close_hover.png);
}

#flDebug .panelContent .flDebugClose.flDebugBack {
#flDebug .flDebugPanelContentParent .flDebugClose.flDebugBack {
background-image:url(../img/back.png);
}

#flDebug .panelContent .flDebugClose.flDebugBack:hover {
#flDebug .flDebugPanelContentParent .flDebugClose.flDebugBack:hover {
background-image:url(../img/back_hover.png);
}

#flDebug .panelContent dt, #flDebug .panelContent dd {
#flDebug .flDebugPanelContentParent dt, #flDebug .flDebugPanelContentParent dd {
display:block;
}

#flDebug .panelContent dt {
#flDebug .flDebugPanelContentParent dt {
margin-top:0.75em;
}

#flDebug .panelContent dd {
#flDebug .flDebugPanelContentParent dd {
margin-left:10px;
}

#flDebug a.toggleTemplate {
#flDebug a.flDebugToggleTemplate {
padding:4px;
background-color:#bbb;
-moz-border-radius:3px;
-webkit-border-radius:3px;
}

#flDebug a.toggleTemplate:hover {
#flDebug a.flDebugToggleTemplate:hover {
padding:4px;
background-color:#444;
color:#ffe761;
Expand All @@ -317,11 +317,11 @@
}


#flDebug a.flTemplateShowContext, #flDebug a.flTemplateShowContext span.toggleArrow {
#flDebug a.flDebugTemplateShowContext, #flDebug a.flDebugTemplateShowContext span.flDebugToggleArrow {
color:#999;
}

#flDebug a.flTemplateShowContext:hover, #flDebug a.flTemplateShowContext:hover span.toggleArrow {
#flDebug a.flDebugTemplateShowContext:hover, #flDebug a.flDebugTemplateShowContext:hover span.flDebugToggleArrow {
color:#000;
cursor:pointer;
}
Expand All @@ -334,7 +334,7 @@
z-index:100000002;
}

#flDebug .flSQLHideStacktraceDiv tbody th {
#flDebug .flDebugHideStacktraceDiv tbody th {
text-align: left;
}

Expand Down Expand Up @@ -373,25 +373,25 @@
#flDebug .highlight .cp { color:#333 } /* Comment.Preproc */

/* tablesorted */
#flDebug table.tablesorter {
#flDebug table.flDebugTablesorter {
width: 100%;
}
#flDebug table.tablesorter thead th, table.tablesorter tfoot th {
#flDebug table.flDebugTablesorter thead th, table.flDebugTablesorter tfoot th {
padding-right: 20px;
}
#flDebug table.tablesorter thead th {
#flDebug table.flDebugTablesorter thead th {
background: url(../img/bg.gif) center right no-repeat;
cursor: pointer;
}
#flDebug table.tablesorter tbody tr.odd td {
#flDebug table.flDebugTablesorter tbody tr.odd td {
background-color: #F0F0F6;
}
#flDebug table.tablesorter thead .headerSortUp {
#flDebug table.flDebugTablesorter thead .headerSortUp {
background-image: url(../img/asc.gif);
}
#flDebug table.tablesorter thead .headerSortDown {
#flDebug table.flDebugTablesorter thead .headerSortDown {
background-image: url(../img/desc.gif);
}
#flDebug table.tablesorter thead .headerSortDown, #flDebug table.tablesorter thead .headerSortUp {
#flDebug table.flDebugTablesorter thead .headerSortDown, #flDebug table.flDebugTablesorter thead .headerSortUp {
background-color: #8dbdd8;
}
46 changes: 23 additions & 23 deletions flask_debugtoolbar/static/js/toolbar.js
Expand Up @@ -14,16 +14,16 @@
current = $('#flDebug #' + this.className + '-content');
if (current.is(':visible')) {
$(document).trigger('close.flDebug');
$(this).parent().removeClass('active');
$(this).parent().removeClass('flDebugActive');
} else {
$('.panelContent').hide(); // Hide any that are already open
$('.flDebugPanelContentParent').hide(); // Hide any that are already open
current.show();
$('#flDebugToolbar li').removeClass('active');
$(this).parent().addClass('active');
$('#flDebugToolbar li').removeClass('flDebugActive');
$(this).parent().addClass('flDebugActive');
}
return false;
});
$('#flDebugPanelList li .switch').click(function() {
$('#flDebugPanelList li .flDebugSwitch').click(function() {
var $panel = $(this).parent();
var $this = $(this);
var dom_id = $panel.attr('id');
Expand All @@ -33,13 +33,13 @@
var active = (active_str) ? active_str.split(';') : [];
active = $.grep(active, function(n,i) { return n != dom_id; });

if ($this.hasClass('active')) {
$this.removeClass('active');
$this.addClass('inactive');
if ($this.hasClass('flDebugActive')) {
$this.removeClass('flDebugActive');
$this.addClass('flDebugInactive');
} else {
active.push(dom_id);
$this.removeClass('inactive');
$this.addClass('active');
$this.removeClass('flDebugInactive');
$this.addClass('flDebugActive');
}

if (active.length > 0) {
Expand All @@ -54,10 +54,10 @@
});
$('#flDebug a.flDebugClose').click(function() {
$(document).trigger('close.flDebug');
$('#flDebugToolbar li').removeClass('active');
$('#flDebugToolbar li').removeClass('flDebugActive');
return false;
});
$('#flDebug a.remoteCall').click(function() {
$('#flDebug a.flDebugRemoteCall').click(function() {
$('#flDebugWindow').load(this.href, {}, function() {
$('#flDebugWindow a.flDebugBack').click(function() {
$(this).parent().parent().hide();
Expand All @@ -67,20 +67,20 @@
$('#flDebugWindow').show();
return false;
});
$('#flDebugTemplatePanel a.flTemplateShowContext').click(function() {
fldt.toggle_arrow($(this).children('.toggleArrow'))
$('#flDebugTemplatePanel a.flDebugTemplateShowContext').click(function() {
fldt.toggle_arrow($(this).children('.flDebugToggleArrow'))
fldt.toggle_content($(this).parent().next());
return false;
});
$('#flDebugSQLPanel a.flSQLShowStacktrace').click(function() {
fldt.toggle_content($('.flSQLHideStacktraceDiv', $(this).parents('tr')));
$('#flDebugSQLPanel a.flDebugShowStacktrace').click(function() {
fldt.toggle_content($('.flDebugHideStacktraceDiv', $(this).parents('tr')));
return false;
});
$('#flHideToolBarButton').click(function() {
$('#flDebugHideToolBarButton').click(function() {
fldt.hide_toolbar(true);
return false;
});
$('#flShowToolBarButton').click(function() {
$('#flDebugShowToolBarButton').click(function() {
fldt.show_toolbar();
return false;
});
Expand All @@ -91,8 +91,8 @@
return;
}
// If a panel is open, close that
if ($('.panelContent').is(':visible')) {
$('.panelContent').hide();
if ($('.flDebugPanelContentParent').is(':visible')) {
$('.flDebugPanelContentParent').hide();
return;
}
// Otherwise, just minimize the toolbar
Expand All @@ -106,7 +106,7 @@
} else {
fldt.show_toolbar(false);
}
$('#flDebug table.tablesorter').each(function() {
$('#flDebug table.flDebugTablesorter').each(function() {
var headers = {};
$(this).find('thead th').each(function(idx, elem) {
headers[idx] = $(elem).data();
Expand Down Expand Up @@ -137,8 +137,8 @@
// close any sub panels
$('#flDebugWindow').hide();
// close all panels
$('.panelContent').hide();
$('#flDebugToolbar li').removeClass('active');
$('.flDebugPanelContentParent').hide();
$('#flDebugToolbar li').removeClass('flDebugActive');
// finally close toolbar
$('#flDebugToolbar').hide('fast');
$('#flDebugToolbarHandle').show();
Expand Down

0 comments on commit d474a6a

Please sign in to comment.