Orbit/app/assets/javascripts/lib/member/textarea-lang-btn.js

32 lines
808 B
JavaScript
Raw Permalink Normal View History

2013-09-17 03:30:30 +00:00
function textareaResizable() {
2013-07-22 08:31:44 +00:00
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);
2013-09-17 03:30:30 +00:00
$(this).on(clickEvent, function() {
2013-07-22 08:31:44 +00:00
var $id = $($(this).attr('href'));
if($id.find('.ui-wrapper').height() < 96) {
$id.find('.ui-wrapper').height(96)
2013-09-17 03:30:30 +00:00
};
});
2013-07-22 08:31:44 +00:00
});
});
$textarea.each(function() {
$(this).width($btnW+100);
});
$textarea.resizable({
maxHeight: 250,
maxWidth: 500,
minHeight: 100,
minWidth: $btnW+114,
handles: "se",
});
2013-09-17 03:30:30 +00:00
};
$(function() {
textareaResizable();
2013-07-22 08:31:44 +00:00
});