Browse Source

Added git js dependencies to the main header js call.

pull/24/head
Teknikode 8 years ago
parent
commit
3608d8299c
  1. 3
      git/index.php
  2. 6
      git/views/layout.twig
  3. 11
      templates/default/header.php
  4. 10
      templates/default/js/raphael/raphael.js

3
git/index.php

@ -19,9 +19,6 @@ if(!preg_match($pattern, $url)) @@ -19,9 +19,6 @@ if(!preg_match($pattern, $url))
include('../templates/'.$CONF['template'].'/header.php');
set_page_title("Teknik Git");
?>
<script src="<?php echo get_page_url($CONF['page'], $CONF); ?>/templates/<?php echo $CONF['template']; ?>/js/codemirror/codemirror.js"></script>
<?php
}
if (php_sapi_name() == 'cli-server' && file_exists(substr($_SERVER['REQUEST_URI'], 1))) {

6
git/views/layout.twig

@ -1,7 +1 @@ @@ -1,7 +1 @@
<!--[if lt IE 9]>
<script src="{{ app.request.basepath }}/web/js/html5.js"></script>
<![endif]-->
{% block body %}{% endblock %}
<script src="{{ app.request.basepath }}/web/js/raphael.js"></script>
<script src="{{ app.request.basepath }}/web/js/codemirror.js"></script>
<script src="{{ app.request.basepath }}/web/js/showdown.js"></script>

11
templates/default/header.php

@ -49,7 +49,16 @@ @@ -49,7 +49,16 @@
case "contact":
array_push($jsFiles, 'contact.js');
break;
case "git":
case "git":
$url = curPageURL();
$pattern = "/^(.*)((\/zipball\/)|(\/tarball\/)|(\/raw\/))(.*)$/";
if(!preg_match($pattern, $url))
{
array_push($jsFiles,
'raphael/raphael.js',
'showdown/showdown.js',
'codemirror/codemirror.js');
}
array_push($jsFiles, 'git.js');
break;
case "pod":

10
templates/default/js/raphael/raphael.js

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save