29 lines
		
	
	
		
			747 B
		
	
	
	
		
			JavaScript
		
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			747 B
		
	
	
	
		
			JavaScript
		
	
	
	
$(function() {
 | 
						|
	var $btnW = null,
 | 
						|
		$textareaLangBtnGroup = $('.textarea-lang > .btn-group'),
 | 
						|
		$textareaLang = $('.textarea-lang'),
 | 
						|
		$textareaTab = $('.textarea-lang > .tab-pane'),
 | 
						|
		$textarea = $('.textarea-lang > .tab-pane > .resizable');
 | 
						|
	$textareaLangBtnGroup.each(function() {
 | 
						|
		$btnW = 4
 | 
						|
		$(this).find('.btn').each(function() {
 | 
						|
			$btnW += $(this).outerWidth(true);
 | 
						|
			$(this).on('click', function() {
 | 
						|
				var $id = $($(this).attr('href'));
 | 
						|
				if($id.find('.ui-wrapper').height() < 96) {
 | 
						|
					$id.find('.ui-wrapper').height(96)
 | 
						|
				}
 | 
						|
			})
 | 
						|
		});
 | 
						|
	});
 | 
						|
	$textarea.each(function() {
 | 
						|
		$(this).width($btnW+100);
 | 
						|
	});
 | 
						|
	$textarea.resizable({
 | 
						|
		maxHeight: 250,
 | 
						|
		maxWidth: 500,
 | 
						|
		minHeight: 100,
 | 
						|
		minWidth: $btnW+114,
 | 
						|
		handles: "se",
 | 
						|
	});
 | 
						|
}); |