orbit-4-2/app/assets/javascripts/lib/member/textarea-lang-btn.js

32 lines
808 B
JavaScript
Raw Permalink Normal View History

function textareaResizable() {
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(clickEvent, 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",
});
};
$(function() {
textareaResizable();
});