Auto-shrink client window and constrain
This commit is contained in:
		@@ -75,6 +75,7 @@ $(document).ready(function() {
 | 
				
			|||||||
				alsoResize: "#client-term-output",
 | 
									alsoResize: "#client-term-output",
 | 
				
			||||||
				minWidth: "100%",
 | 
									minWidth: "100%",
 | 
				
			||||||
				maxWidth: "100%",
 | 
									maxWidth: "100%",
 | 
				
			||||||
 | 
									maxHeight: ($(window).height() * 0.95),
 | 
				
			||||||
				stop: function(event, ui) {
 | 
									stop: function(event, ui) {
 | 
				
			||||||
        $(this).css("width", '');
 | 
					        $(this).css("width", '');
 | 
				
			||||||
				$('#client-term-output').css("width",'');
 | 
									$('#client-term-output').css("width",'');
 | 
				
			||||||
@@ -93,6 +94,12 @@ $(document).ready(function() {
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
		});
 | 
							});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							$(window).resize(function() {
 | 
				
			||||||
 | 
									$('.vertical-resize').resizable( "option", "maxHeight", ($(window).height() * 0.95) );
 | 
				
			||||||
 | 
									if($('.vertical-resize').height() > ($(window).height() * 0.95) ) {
 | 
				
			||||||
 | 
										$('.vertical-resize').height(($(window).height() * 0.95));
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
							});
 | 
				
			||||||
		// Websocket client startup
 | 
							// Websocket client startup
 | 
				
			||||||
		startup();
 | 
							startup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user