JsMinify: Add basic template and js for minifier
parent
090784945d
commit
a76abb9bad
|
@ -1,3 +1,8 @@
|
|||
<div>
|
||||
<span>JS Minifier</span>
|
||||
<h5>Minify JavaScript Code on the go!</h5>
|
||||
<div class="js_minify__io_box">
|
||||
<textarea name="js_minify__input" id="js_input" rows="20" cols="60"></textarea>
|
||||
<textarea name="js_minify__output" id="js_output" rows="20" cols="60"></textarea><br>
|
||||
</div>
|
||||
<div class="js_minify__action_box">
|
||||
<button class="js_minify__action">Minify</button>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
.zci--js_minify .js_minify__action_box {
|
||||
margin-top: 3.25em;
|
||||
}
|
||||
|
||||
.zci--js_minify .js_minify__action {
|
||||
background: #5DA4DC;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
font-size: 1.25em;
|
||||
padding: 10px 15px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
margin-bottom: .25em;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.zci--js_minify .js_minify__action:active {
|
||||
background: #4793D0;
|
||||
}
|
|
@ -1,14 +1,27 @@
|
|||
DDH.js_minify = DDH.js_minify || {};
|
||||
|
||||
(function(DDH) {
|
||||
"use strict";
|
||||
"use strict";
|
||||
|
||||
DDH.js_minify.build = function(ops) {
|
||||
DDH.js_minify.build = function(ops) {
|
||||
|
||||
return {
|
||||
onShow: function() {
|
||||
var shown = false;
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
return {
|
||||
onShow: function() {
|
||||
console.log("onShow called");
|
||||
// make sure this function is run only once, the first time
|
||||
// the IA is shown otherwise things will get initialized more than once
|
||||
if (shown)
|
||||
return;
|
||||
|
||||
// set the flag to true so it doesn't get run again
|
||||
shown = true;
|
||||
|
||||
var $dom = $('#zci-js_minify'),
|
||||
$main = $dom.find('.zci__main');
|
||||
|
||||
$main.toggleClass('c-base');
|
||||
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue