JsMinify: Move default css properties from js to template
parent
7d364d281e
commit
bd8e8a804a
|
@ -1,7 +1,7 @@
|
|||
<div class="js_minify__io_box">
|
||||
<textarea name="js_minify__input" id="js_minify__input" rows="20" cols="60"></textarea>
|
||||
<textarea name="js_minify__output" id="js_minify__output" rows="20" cols="60" readonly="readonly" onclick="this.focus();this.select()"></textarea><br>
|
||||
<textarea name="js_minify__output" class="is-hidden" id="js_minify__output" rows="20" cols="60" readonly="readonly" onclick="this.focus();this.select()"></textarea><br>
|
||||
</div>
|
||||
<div class="js_minify__action_box">
|
||||
<button class="js_minify__action">Minify</button>
|
||||
<button class="js_minify__action" disabled>Minify</button>
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
position: absolute;
|
||||
bottom: 0;
|
||||
margin-bottom: .25em;
|
||||
cursor: pointer;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.zci--js_minify .js_minify__action:active {
|
||||
|
|
|
@ -28,13 +28,6 @@ DDH.js_minify.build = function(ops) {
|
|||
|
||||
$main.toggleClass('c-base');
|
||||
|
||||
// Hide output textarea by default
|
||||
$output.css('display', 'none');
|
||||
|
||||
// Disable 'Minify' button by default and change cursor to default
|
||||
$minifyButton.prop('disabled', true);
|
||||
$minifyButton.css('cursor', 'default');
|
||||
|
||||
// Add event handler for change in input of textarea
|
||||
$input.on('input', function() {
|
||||
if (!libLoaded) {
|
||||
|
@ -71,8 +64,8 @@ DDH.js_minify.build = function(ops) {
|
|||
// Operate using the prettydiff function provided by the library
|
||||
var output = prettydiff(args);
|
||||
|
||||
// hide output textarea by default
|
||||
$output.css('display', 'inline');
|
||||
// Remove is-hidden class to make it visible again
|
||||
$output.removeClass('is-hidden');
|
||||
|
||||
// Add the output to output textarea field
|
||||
$output.val(output);
|
||||
|
|
Loading…
Reference in New Issue