File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 8888 </div >
8989 <div class =" col-md-6" >
9090 <hr />
91- <form action =" #" method =" post" id =" console_command" >
91+ <form action =" #" method =" post" id =" console_command" style = " display : none ; " >
9292 <fieldset >
9393 <div class =" input-group" >
9494 <input type =" text" class =" form-control" name =" command" id =" ccmd" placeholder =" {{ trans (' server.index.command' ) } }" />
@@ -265,11 +265,18 @@ function updatePlayerListVisibility(data) {
265265 var can_run = true ;
266266 function updateServerPowerControls (data ) {
267267
268+ // Reset Console Data
269+ if (data === 2 ) {
270+ $ (" #live_console" ).val (' ' );
271+ }
272+
268273 // Server is On or Starting
269- if (data == 1 || data == 3 ) {
274+ if (data == 1 || data == 2 ) {
275+ $ (" #console_command" ).slideDown ();
270276 $ (' [data-attr="power"][data-action="start"]' ).addClass (' disabled' );
271277 $ (' [data-attr="power"][data-action="stop"], [data-attr="power"][data-action="restart"]' ).removeClass (' disabled' );
272278 } else {
279+ $ (" #console_command" ).slideUp ();
273280 $ (' [data-attr="power"][data-action="start"]' ).removeClass (' disabled' );
274281 $ (' [data-attr="power"][data-action="stop"], [data-attr="power"][data-action="restart"]' ).addClass (' disabled' );
275282 }
@@ -290,9 +297,6 @@ function updateServerPowerControls (data) {
290297 } else { var killConfirm = true ; }
291298
292299 if (killConfirm) {
293- if (action === ' start' ) {
294- $ (" #live_console" ).val (' ' );
295- }
296300 $ .ajax ({
297301 type: ' PUT' ,
298302 headers: {
You can’t perform that action at this time.
0 commit comments