Restyling configfiles with textareas instead of pre
Signed-off-by: Roman Schmerold (BNoiZe) <bnoize@froxlor.org>
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
<div class="pushbot">
|
<div class="pushbot">
|
||||||
<pre class="shell">{$commands}</pre>
|
<textarea class="shell" rows="{$numbrows}" readonly>{$commands}</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="pushbot">
|
<div class="pushbot">
|
||||||
<fieldset class="file">
|
<fieldset class="file">
|
||||||
<legend>{$realname}</legend>
|
<legend>{$realname}</legend>
|
||||||
<pre class="shell">$EDITOR {$realname}</pre>
|
<textarea class="shell" rows="1" readonly>$EDITOR {$realname}</textarea>
|
||||||
<pre class="filecontent">{$file_content}</pre>
|
<textarea class="filecontent" rows="{$numbrows}" readonly>{$file_content}</textarea>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
22
templates/Sparkle/assets/css/main.css
vendored
22
templates/Sparkle/assets/css/main.css
vendored
@@ -1465,14 +1465,21 @@ table thead th.tablesorter-headerDesc {
|
|||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shell {
|
.shell, .filecontent {
|
||||||
font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;
|
font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;
|
||||||
color: #bbb;
|
|
||||||
background-color: #333;
|
|
||||||
border: 1px solid #d1d5d8;
|
border: 1px solid #d1d5d8;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
margin-bottom: 20px;
|
background-image: none;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shell {
|
||||||
|
color: #bbb;
|
||||||
|
background-color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldset.file {
|
fieldset.file {
|
||||||
@@ -1480,10 +1487,3 @@ fieldset.file {
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.filecontent {
|
|
||||||
font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;
|
|
||||||
border: 1px solid #d1d5d8;
|
|
||||||
border-radius: 3px;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
|||||||
12
templates/Sparkle/assets/js/main.js
vendored
12
templates/Sparkle/assets/js/main.js
vendored
@@ -64,17 +64,7 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
// Enable autoselect in configfules
|
// Enable autoselect in configfules
|
||||||
$(".shell, .filecontent").click(function() {
|
$(".shell, .filecontent").click(function() {
|
||||||
if (window.getSelection) {
|
$(this).select();
|
||||||
selection = window.getSelection();
|
|
||||||
range = document.createRange();
|
|
||||||
range.selectNodeContents(this);
|
|
||||||
selection.removeAllRanges();
|
|
||||||
selection.addRange(range);
|
|
||||||
} else if (document.body.createTextRange) {
|
|
||||||
range = document.body.createTextRange();
|
|
||||||
range.moveToElementText(this);
|
|
||||||
range.select();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
// Height of divs fix
|
// Height of divs fix
|
||||||
var snheight = $('#sidenavigation').height();
|
var snheight = $('#sidenavigation').height();
|
||||||
|
|||||||
Reference in New Issue
Block a user