Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add java version check logic

Signed-off-by: Noritaka Horio <holy.shared.design@gmail.com>
  • Loading branch information...
commit d4efe20a4c70d415dfc4b18ae5f33448f92e4404 1 parent 79988e7
@holyshared authored
View
26 packages/frontend_developer/blocks/mootools_plugin_build_form/elements/form.php
@@ -16,30 +16,30 @@
<script type="text/javascript">var PluginPackages = <?php echo $json; ?>;</script>
<?php if (count($packages) <= 0) : ?>
-<p><em class="warning">The plugin was not found. <br />
-Please do the plugin from the repository of github importing.</em></p>
-<p><a href="<?php echo $this->url("dashboard/mootools/importer") ?>">It moves to the import page.</a></p>
+<p><em class="warning"><?php echo t("The plugin was not found."); ?><br />
+<?php echo t("Please do the plugin from the repository of github importing."); ?></em></p>
+<p><a href="<?php echo $this->url("dashboard/mootools/importer") ?>"><?php echo t("It moves to the import page."); ?></a></p>
<?php endif; ?>
-<p>Please select the plug-in name displayed in the list of the form.</p>
+<p><?php echo t("Please select the plug-in name displayed in the list of the form."); ?></p>
<fieldset>
- <legend>General</legend>
- <p>General setting</p>
+ <legend><?php echo t("General"); ?></legend>
+ <p><?php echo t("General setting"); ?></p>
<dl>
- <dt>Form title&nbsp;<em class="required">required</em></dt>
+ <dt><?php echo t("Form title"); ?>&nbsp;<em class="required"><?php echo t("required"); ?></em></dt>
<dd><?php echo $f->text("title", $title, array("size" => 60)); ?></dd>
- <dt>Description of form</dt>
+ <dt><?php echo t("Description of form"); ?></dt>
<dd><?php echo $f->text("description", $description, array("size" => 80)); ?></dd>
- <dt>Header of script</dt>
+ <dt><?php echo t("Header of script"); ?></dt>
<dd><?php echo $f->textarea("header", $header, array("cols" => 57)); ?></dd>
- <dt>Download file name&nbsp;<em class="required">required</em></dt>
+ <dt><?php echo t("Download file name"); ?>&nbsp;<em class="required"><?php echo t("required"); ?></em></dt>
<dd><?php echo $f->text("javascript", $javascript, array("size" => 20)); ?>.js</dd>
</dl>
</fieldset>
<fieldset>
- <legend>plugins</legend>
- <p>Plugin displayed in form</p>
+ <legend><?php echo t("Plugins"); ?></legend>
+ <p><?php echo t("Plugin displayed in form"); ?></p>
<ul id="packageList" class="packageList">
<?php foreach($packages as $key => $value) : ?>
<li class="r<?php echo $key; ?> <?php echo (in_array($key, $current)) ? "selected" : "" ?>">
@@ -47,4 +47,4 @@
</li>
<?php endforeach; ?>
</ul>
-</fieldset>
+</fieldset>
View
11 packages/frontend_developer/blocks/mootools_plugin_build_form/view.php
@@ -3,6 +3,15 @@
<?php $f = Loader::helper('form'); ?>
<?php $t = Loader::helper('text'); ?>
<?php $v = Loader::helper('validation/token'); ?>
+<?php
+exec("java -version 2>&1", $output);
+$line = array_shift($output);
+$version = str_replace(array("java version", "\""), "", $line);
+$isYUICompressorCRequirement = false;
+if (version_compare($version, "1.4.", "<")) {
+ $isYUICompressorCRequirement = true;
+}
+?>
<div class="mod packages">
<div class="inner">
<div class="hd"><h3><?php echo $t->entities($title); ?></h3></div>
@@ -13,7 +22,9 @@
<?php $v->output(''); ?>
<?php $this->inc('elements/fileset.php'); ?>
<ul class="packtypeList">
+ <?php if ($isYUICompressorCRequirement) : ?>
<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>
+ <?php endif; ?>
<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>
<li><label class="compression"><input type="radio" name="packType" value="3" />&nbsp;No Compression</label><br />Uncompressed source. Recommended in testing phase.</li>
</ul>
View
1  packages/frontend_developer/js/jquery.importWizard.js
@@ -20,7 +20,6 @@
if (this.current < this.options.step) {
var response = json.response;
if (response.status) {
- alert(this.current);
$(this.container).trigger('progress', [this.current]);
var prevAction = "step" + this.current.toString();
Please sign in to comment.
Something went wrong with that request. Please try again.