From 8642e5947295c84313568baf748bae8a81835831 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Sun, 31 May 2009 14:18:17 +0000 Subject: [PATCH] Always try to enable syntax highlighting git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@629 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- functions.js | 16 ++++++++++++++++ include/design.inc.php | 11 ++--------- sql.inc.php | 3 --- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/functions.js b/functions.js index 684fdcf9..092674c3 100644 --- a/functions.js +++ b/functions.js @@ -13,6 +13,22 @@ function check_version(version) { document.body.appendChild(script); } +function load_jush() { + var script = document.createElement('script'); + script.src = 'externals/jush/jush.js'; + script.onload = function () { + jush.style('externals/jush/jush.css'); + jush.highlight_tag('pre'); + jush.highlight_tag('code'); + } + script.onreadystatechange = function () { + if (script.readyState == 'loaded' || script.readyState == 'complete') { + script.onload(); + } + } + document.body.appendChild(script); +} + function tables_check(el) { var elems = el.form.elements; for (var i=0; i < elems.length; i++) { diff --git a/include/design.inc.php b/include/design.inc.php index 0e208d6e..22c792e8 100644 --- a/include/design.inc.php +++ b/include/design.inc.php @@ -106,15 +106,8 @@ function page_footer($missing = false) { ?> - - - + + diff --git a/sql.inc.php b/sql.inc.php index e0164484..920eeefd 100644 --- a/sql.inc.php +++ b/sql.inc.php @@ -67,9 +67,6 @@ if (!$error && $_POST) {

-