From b37279d1a00eb80f2c86a7f9116b1b1972acb871 Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Fri, 6 Sep 2013 19:07:58 +0200 Subject: [PATCH] Updates info. --- src/_h5ai/client/css/inc/h5ai-info.less | 44 ++++++++++---------- src/_h5ai/client/js/inc/info.js | 10 ++--- src/_h5ai/index.html.jade | 54 ++++++++++++------------- 3 files changed, 55 insertions(+), 53 deletions(-) diff --git a/src/_h5ai/client/css/inc/h5ai-info.less b/src/_h5ai/client/css/inc/h5ai-info.less index d231be17..cafce35e 100644 --- a/src/_h5ai/client/css/inc/h5ai-info.less +++ b/src/_h5ai/client/css/inc/h5ai-info.less @@ -68,31 +68,33 @@ body#h5ai-info { margin: 0; padding: 0; - .test-label { - display: inline-block; - width: 350px; - } - .test-result { - display: inline-block; - width: 70px; - text-align: right; - font-weight: bold; - color: #aaa; + .test { + .label { + display: inline-block; + width: 350px; + } + .result { + display: inline-block; + width: 70px; + text-align: right; + font-weight: bold; + color: #aaa; - &.test-passed { - color: #5a5; + &.passed { + color: #5a5; + } + &.failed { + color: #a55; + } } - &.test-failed { - color: #a55; + .info { + margin: 4px 0 12px 12px; + font-size: 0.7em; + color: #aaa; + width: 350px; + line-height: 1.2em; } } - .test-info { - margin: 4px 0 12px 12px; - font-size: 0.7em; - color: #aaa; - width: 350px; - line-height: 1.2em; - } } #bottombar { diff --git a/src/_h5ai/client/js/inc/info.js b/src/_h5ai/client/js/inc/info.js index 54bb59cc..8097b7f8 100644 --- a/src/_h5ai/client/js/inc/info.js +++ b/src/_h5ai/client/js/inc/info.js @@ -1,14 +1,14 @@ modulejs.define('info', ['$'], function ($) { - var setCheckResult = function (id, result) { + var setCheckResult = function (el, result) { - var $result = $(id).find('.test-result'); + var $result = $(el).find('.result'); if (result) { - $result.addClass('test-passed').text('yes'); + $result.addClass('passed').text('yes'); } else { - $result.addClass('test-failed').text('no'); + $result.addClass('failed').text('no'); } }, @@ -22,7 +22,7 @@ modulejs.define('info', ['$'], function ($) { setCheckResult(this, json.checks[$(this).data('id')]); }); - $('.test.php .test-result').text(json.checks['phpversion']); + $('.test.php .result').text(json.checks['phpversion']); } }); }; diff --git a/src/_h5ai/index.html.jade b/src/_h5ai/index.html.jade index eea96a56..e09cbed6 100644 --- a/src/_h5ai/index.html.jade +++ b/src/_h5ai/index.html.jade @@ -33,53 +33,53 @@ html.no-js.browser( lang="en" ) h2 Server Details ul#tests li.test.php( data-id="php" ) - span.test-label PHP version - span.test-result ? - div.test-info PHP version >= 5.2.1 + span.label PHP version + span.result ? + div.info PHP version >= 5.2.1 li.test( data-id="cache" ) - span.test-label Cache directory - span.test-result ? - div.test-info Web server has write access + span.label Cache directory + span.result ? + div.info Web server has write access li.test( data-id="thumbs" ) - span.test-label Image thumbs - span.test-result ? - div.test-info PHP GD extension with JPEG support available + span.label Image thumbs + span.result ? + div.info PHP GD extension with JPEG support available li.test( data-id="exif" ) - span.test-label Use EXIF thumbs - span.test-result ? - div.test-info PHP EXIF extension available + span.label Use EXIF thumbs + span.result ? + div.info PHP EXIF extension available li.test( data-id="ffmpeg" ) - span.test-label Movie thumbs - span.test-result ? - div.test-info + span.label Movie thumbs + span.result ? + div.info | Command line program code ffmpeg | available li.test( data-id="convert" ) - span.test-label PDF thumbs - span.test-result ? - div.test-info + span.label PDF thumbs + span.result ? + div.info | Command line program code convert | available li.test( data-id="tar" ) - span.test-label Shell tar - span.test-result ? - div.test-info + span.label Shell tar + span.result ? + div.info | Command line program code tar | available li.test( data-id="zip" ) - span.test-label Shell zip - span.test-result ? - div.test-info + span.label Shell zip + span.result ? + div.info | Command line program code zip | available li.test( data-id="du" ) - span.test-label Folder sizes - span.test-result ? - div.test-info + span.label Folder sizes + span.result ? + div.info | Command line program code du | available