Skip to content

Commit

Permalink
fix issue #1 - remove highlighjs lib (for mysql queries) because of a…
Browse files Browse the repository at this point in the history
… requireJs incompatibility
  • Loading branch information
Laurent MINGUET committed Aug 1, 2018
1 parent 2ce51bc commit ff2367e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this project will be documented in this file.

## [3.1.1] - 2018-08-01
[3.1.1]: https://github.com/Smile-SA/magento2-module-debug-toolbar/compare/3.1.0...3.1.1

* fix issue #1 - remove highlighjs lib (for mysql queries) because of a requireJs incompatibility

## [3.1.0] - 2017-12-29
[3.1.0]: https://github.com/Smile-SA/magento2-module-debug-toolbar/compare/3.0.1...3.1.0

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
],
"license": "EPL-2.0",
"version": "3.1.0",
"version": "3.1.1",
"require": {
"php": "~7.0.6|~7.1.0",
"magento/framework": "~101.0.0"
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Smile_DebugToolbar" setup_version="3.1.0">
<module name="Smile_DebugToolbar" setup_version="3.1.1">
<sequence>
<module name="Magento_Config"/>
<module name="Magento_Backend"/>
Expand Down
2 changes: 0 additions & 2 deletions view/base/layout/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
<head>
<css src="Smile_DebugToolbar::css/smile-toolbar.css"/>
<css src="Smile_DebugToolbar::css/smile-unit.css"/>
<css src="Smile_DebugToolbar::css/highlight.min.css"/>
<script src="Smile_DebugToolbar::js/smile-toolbar.js"/>
<script src="Smile_DebugToolbar::js/smile-table.js"/>
<script src="Smile_DebugToolbar::js/highlight.min.js"/>
</head>
</page>
2 changes: 0 additions & 2 deletions view/base/web/css/highlight.min.css

This file was deleted.

3 changes: 0 additions & 3 deletions view/base/web/js/highlight.min.js

This file was deleted.

11 changes: 8 additions & 3 deletions view/base/web/js/smile-toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function smileToolbarAdd(toolbarIdentifier, hasWarning)
function smileToolbarInit()
{
smileToolbarSelect(smileToolbarCount);
setTimeout('smileToolbarHighlight();', 500);
setTimeout(smileToolbarHighlight, 500);
}

/**
Expand Down Expand Up @@ -265,6 +265,11 @@ function smileToolbarTreeGrid(node, forceClose)
*/
function smileToolbarHighlight()
{
var blocks = document.querySelectorAll('pre code');
[].forEach.call(blocks, hljs.highlightBlock);
if (window.hljs === undefined) {
return false;
}

var blocks = document.querySelectorAll('.smile-toolbar pre code');
[].forEach.call(blocks, window.hljs.highlightBlock);
return true;
}

0 comments on commit ff2367e

Please sign in to comment.