Switching to using moment.js for times in JS, rather than a custom solution. Fixes #688

This commit is contained in:
Dan Cryer 2014-12-07 11:51:41 +00:00
commit 3db08c7315
6 changed files with 27 additions and 74 deletions

View file

@ -33,6 +33,11 @@ class Lang
print call_user_func_array(array('PHPCI\Helper\Lang', 'get'), func_get_args());
}
public static function getLanguage()
{
return self::$language;
}
public static function getStrings()
{
return self::$strings;

View file

@ -82,6 +82,7 @@ PHPCI',
'success' => 'Success',
'successful' => 'Successful',
'failed' => 'Failed',
'manual_build' => 'Manual Build',
// Add/Edit Project:
'new_project' => 'New Project',

View file

@ -19,6 +19,7 @@
<script>
var PHPCI_URL = '<?php print PHPCI_URL; ?>';
var PHPCI_LANGUAGE = <?php print json_encode(Lang::getLanguage()); ?>;
<?php if (defined('JSON_UNESCAPED_UNICODE')): ?>
var PHPCI_STRINGS = <?php print json_encode(Lang::getStrings(), JSON_UNESCAPED_UNICODE); ?>;
@ -30,6 +31,7 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js"></script>
<script src="<?php print PHPCI_URL; ?>assets/js/class.js"></script>
<script src="<?php print PHPCI_URL; ?>assets/js/sprintf.js"></script>
<script src="<?php print PHPCI_URL; ?>assets/js/moment.min.js"></script>
<script src="<?php print PHPCI_URL; ?>assets/js/phpci.js" type="text/javascript"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>