This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/assets/javascripts/lib/member/textarea-lang-btn.js

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",
});
});