Project

General

Profile

« Previous | Next » 

Revision 8d73396b

Added by sidkhemka almost 10 years ago

Fixes #6747 - Add textarea automatic resizing

View differences:

app/assets/javascripts/host_edit.js
$(document).on('ContentLoad', function(){onHostEditLoad()});
$(document).on('AddedClass', function(event, link){load_puppet_class_parameters(link)});
$(document).on('click', '#params-tab', function() { resizeTextareaAll(); });
function computeResourceSelected(item){
var compute = $(item).val();
......
});
$("a.disable-unsupported").remove();
}
function resizeTextareaAll () {
$('textarea').each(function() {
if (this.scrollHeight !== undefined){
if (this.scrollHeight <= 100){
this.style.height = this.scrollHeight+ 'px';
}
else{
this.style.height = 100+'px';
}
}
});
}

Also available in: Unified diff