Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add java version check logic

Signed-off-by: Noritaka Horio <holy.shared.design@gmail.com>
  • Loading branch information...
commit d4efe20a4c70d415dfc4b18ae5f33448f92e4404 1 parent 79988e7
Noritaka Horio authored
26 packages/frontend_developer/blocks/mootools_plugin_build_form/elements/form.php
@@ -16,30 +16,30 @@
16 16 <script type="text/javascript">var PluginPackages = <?php echo $json; ?>;</script>
17 17
18 18 <?php if (count($packages) <= 0) : ?>
19   -<p><em class="warning">The plugin was not found. <br />
20   -Please do the plugin from the repository of github importing.</em></p>
21   -<p><a href="<?php echo $this->url("dashboard/mootools/importer") ?>">It moves to the import page.</a></p>
  19 +<p><em class="warning"><?php echo t("The plugin was not found."); ?><br />
  20 +<?php echo t("Please do the plugin from the repository of github importing."); ?></em></p>
  21 +<p><a href="<?php echo $this->url("dashboard/mootools/importer") ?>"><?php echo t("It moves to the import page."); ?></a></p>
22 22 <?php endif; ?>
23 23
24   -<p>Please select the plug-in name displayed in the list of the form.</p>
  24 +<p><?php echo t("Please select the plug-in name displayed in the list of the form."); ?></p>
25 25 <fieldset>
26   - <legend>General</legend>
27   - <p>General setting</p>
  26 + <legend><?php echo t("General"); ?></legend>
  27 + <p><?php echo t("General setting"); ?></p>
28 28 <dl>
29   - <dt>Form title&nbsp;<em class="required">required</em></dt>
  29 + <dt><?php echo t("Form title"); ?>&nbsp;<em class="required"><?php echo t("required"); ?></em></dt>
30 30 <dd><?php echo $f->text("title", $title, array("size" => 60)); ?></dd>
31   - <dt>Description of form</dt>
  31 + <dt><?php echo t("Description of form"); ?></dt>
32 32 <dd><?php echo $f->text("description", $description, array("size" => 80)); ?></dd>
33   - <dt>Header of script</dt>
  33 + <dt><?php echo t("Header of script"); ?></dt>
34 34 <dd><?php echo $f->textarea("header", $header, array("cols" => 57)); ?></dd>
35   - <dt>Download file name&nbsp;<em class="required">required</em></dt>
  35 + <dt><?php echo t("Download file name"); ?>&nbsp;<em class="required"><?php echo t("required"); ?></em></dt>
36 36 <dd><?php echo $f->text("javascript", $javascript, array("size" => 20)); ?>.js</dd>
37 37 </dl>
38 38 </fieldset>
39 39
40 40 <fieldset>
41   - <legend>plugins</legend>
42   - <p>Plugin displayed in form</p>
  41 + <legend><?php echo t("Plugins"); ?></legend>
  42 + <p><?php echo t("Plugin displayed in form"); ?></p>
43 43 <ul id="packageList" class="packageList">
44 44 <?php foreach($packages as $key => $value) : ?>
45 45 <li class="r<?php echo $key; ?> <?php echo (in_array($key, $current)) ? "selected" : "" ?>">
@@ -47,4 +47,4 @@
47 47 </li>
48 48 <?php endforeach; ?>
49 49 </ul>
50   -</fieldset>
  50 +</fieldset>
11 packages/frontend_developer/blocks/mootools_plugin_build_form/view.php
@@ -3,6 +3,15 @@
3 3 <?php $f = Loader::helper('form'); ?>
4 4 <?php $t = Loader::helper('text'); ?>
5 5 <?php $v = Loader::helper('validation/token'); ?>
  6 +<?php
  7 +exec("java -version 2>&1", $output);
  8 +$line = array_shift($output);
  9 +$version = str_replace(array("java version", "\""), "", $line);
  10 +$isYUICompressorCRequirement = false;
  11 +if (version_compare($version, "1.4.", "<")) {
  12 + $isYUICompressorCRequirement = true;
  13 +}
  14 +?>
6 15 <div class="mod packages">
7 16 <div class="inner">
8 17 <div class="hd"><h3><?php echo $t->entities($title); ?></h3></div>
@@ -13,7 +22,9 @@
13 22 <?php $v->output(''); ?>
14 23 <?php $this->inc('elements/fileset.php'); ?>
15 24 <ul class="packtypeList">
  25 + <?php if ($isYUICompressorCRequirement) : ?>
16 26 <li><label class="compression"><input type="radio" name="packType" value="1" checked="checked" />&nbsp;YUI Compressor</label><br />Uses YUI Compressor by Julien Lecomte, to clean whitespace and rename internal variables to shorter values. Highest compression ratio.</li>
  27 + <?php endif; ?>
17 28 <li><label class="compression"><input type="radio" name="packType" value="2" />&nbsp;JsMin Compression</label><br />Uses JSMin by Douglas Crockford. Cleans comments and whitespace.</li>
18 29 <li><label class="compression"><input type="radio" name="packType" value="3" />&nbsp;No Compression</label><br />Uncompressed source. Recommended in testing phase.</li>
19 30 </ul>
1  packages/frontend_developer/js/jquery.importWizard.js
@@ -20,7 +20,6 @@
20 20 if (this.current < this.options.step) {
21 21 var response = json.response;
22 22 if (response.status) {
23   - alert(this.current);
24 23 $(this.container).trigger('progress', [this.current]);
25 24
26 25 var prevAction = "step" + this.current.toString();

0 comments on commit d4efe20

Please sign in to comment.
Something went wrong with that request. Please try again.