mirror of
https://github.com/vrana/adminer.git
synced 2025-08-15 02:54:28 +02:00
Always try to enable syntax highlighting
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@629 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
16
functions.js
16
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++) {
|
||||
|
@@ -106,15 +106,8 @@ function page_footer($missing = false) {
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ($_COOKIE["highlight"] == "jush") { ?>
|
||||
<script type="text/javascript" src="externals/jush/jush.js"></script>
|
||||
<script type="text/javascript">
|
||||
if (typeof jush != 'undefined') {
|
||||
jush.style('externals/jush/jush.css');
|
||||
jush.highlight_tag('pre');
|
||||
jush.highlight_tag('code');
|
||||
}
|
||||
</script>
|
||||
<?php if (!$missing) { ?>
|
||||
<script type="text/javascript">onload = load_jush;</script>
|
||||
<?php } ?>
|
||||
|
||||
</body>
|
||||
|
@@ -67,9 +67,6 @@ if (!$error && $_POST) {
|
||||
<p>
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>" />
|
||||
<input type="submit" value="<?php echo lang('Execute'); ?>" />
|
||||
<script type="text/javascript">// <![CDATA[
|
||||
document.write('<label><input type="checkbox" name="highlight" value="jush"<?php echo ($_COOKIE["highlight"] == "jush" ? ' checked="checked"' : ''); ?> /><?php echo addcslashes(lang('Syntax highlighting'), "\r\n'\\"); ?></label>');
|
||||
// ]]></script>
|
||||
<label><input type="checkbox" name="error_stops" value="1"<?php echo ($_POST["error_stops"] ? " checked='checked'" : ""); ?> /><?php echo lang('Stop on error'); ?></label>
|
||||
</p>
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user