Added highlighting for build config + updated dependencies

This commit is contained in:
Dmitry Khomutov 2017-02-10 23:14:07 +07:00
commit 91a8054fdd
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9
5 changed files with 78 additions and 39 deletions

View file

@ -1,3 +1,18 @@
<script src="<?= APP_URL; ?>assets/vendor/codemirror/lib/codemirror.js"></script>
<script src="<?= APP_URL; ?>assets/vendor/codemirror/mode/yaml/yaml.js"></script>
<link href="<?= APP_URL; ?>assets/vendor/codemirror/lib/codemirror.css" rel="stylesheet" type="text/css" />
<script>
setupProjectForm();
$(document).ready(function () {
CodeMirror.fromTextArea(document.getElementById('element-build_config'), {
mode: "yaml",
lineWrapping: true,
lineNumbers: true
});
});
</script>
<?php use PHPCensor\Helper\Lang; ?>
<div class="row">
@ -17,9 +32,8 @@
<div class="col-sm-4">
<div class="box">
<div class="box-body">
<p><?php Lang::out('public_key_help'); ?></p>
<textarea style="width: 90%; height: 150px;"><?php print $key ?></textarea>
<p><?php Lang::out('public_key_help'); ?></p>
<textarea style="width: 90%; height: 150px;"><?php print $key ?></textarea>
</div>
</div>
</div>
@ -34,13 +48,11 @@ window.return_url = <?php print json_encode((empty($_SERVER['HTTPS']) ? 'http' :
$gh = \b8\Config::getInstance()->get('php-censor.github', null);
if($gh) {
print 'window.github_app_id = ' . json_encode($gh['id']) . ';' . PHP_EOL;
print 'window.github_app_id = ' . json_encode($gh['id']) . ';' . PHP_EOL;
}
if(!empty($token)) {
print 'window.github_token = ' . json_encode($token) . ';' . PHP_EOL;
print 'window.github_token = ' . json_encode($token) . ';' . PHP_EOL;
}
?>
$(document).ready(setupProjectForm);
</script>