MCSM:WebConsole: стилистические модернизации поля ввода
This commit is contained in:
@@ -90,6 +90,9 @@ var WebConsole = React.createClass({
|
||||
this.ws.close();
|
||||
this.ws = null;
|
||||
},
|
||||
focusInput: function() {
|
||||
this.refs.input.focus();
|
||||
},
|
||||
/*--------------------*/
|
||||
getInitialState: function(){return{
|
||||
lines: []
|
||||
@@ -104,7 +107,7 @@ var WebConsole = React.createClass({
|
||||
return ce('p', {dangerouslySetInnerHTML: {__html: ansi_up.ansi_to_html(line)}});
|
||||
})
|
||||
),
|
||||
ce('input')
|
||||
ce('input', {ref: 'input'})
|
||||
)
|
||||
)
|
||||
},
|
||||
@@ -117,6 +120,7 @@ var ServerInfo = React.createClass({
|
||||
tabStateWebConsole: function(state) {
|
||||
if (state === 1) {
|
||||
this.refs.webconsole.connect();
|
||||
this.refs.webconsole.focusInput();
|
||||
}
|
||||
},
|
||||
/*--------------------*/
|
||||
|
||||
@@ -13,9 +13,11 @@
|
||||
|
||||
#webconsole input {
|
||||
background-color: #1e1e1e;
|
||||
background-image: url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="30"><text x="7" y="24" style="font-size: 1.5em; font-family: monospace" fill="#ffffff">></text></svg>');
|
||||
background-repeat: no-repeat;
|
||||
color: #eee;
|
||||
border: none;
|
||||
padding: 8px;
|
||||
padding: 8px 8px 8px 1.5em;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user