Project

General

Profile

« Previous | Next » 

Revision b3ac878a

Added by Tomer Brisker over 8 years ago

Fixes #11466, #11462 - Improve layout of textareas

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() { resizeTextareas($('#params')); });
function update_nics(success_callback) {
var data = $('form').serialize().replace('method=put', 'method=post');
......
});
}
function resizeTextareas (elem) {
elem.find('textarea').each(function() {
if (this.scrollHeight !== undefined){
if (this.scrollHeight <= 100){
this.style.height = this.scrollHeight+parseInt(this.style.paddingTop)+parseInt(this.style.paddingBottom)+ 'px';
}
else{
this.style.height = 100+'px';
}
}
});
}
function selectedSubnetHasIPAM() {
var subnet = $("#host_subnet_id")
var subnet_id = subnet.val();

Also available in: Unified diff