* textarea in batch operation page can ajust height to fit text content.

This commit is contained in:
Catouse
2014-11-05 09:59:25 +08:00
parent f4a092f574
commit 32e3858046
6 changed files with 37 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
$(function() {
for(i = 0; i < batchCreateNum; i++) $("#story" + i).chosen(defaultChosenOptions);
})
});
/* Get select of stories.*/
function setStories(moduleID, projectID, num)
@@ -78,3 +78,12 @@ $(document).on('mousedown', 'select', function()
$(this).val(value);
}
})
if(navigator.userAgent.indexOf("Firefox") < 0)
{
$(document).on('input keyup paste change', 'textarea.autosize', function()
{
this.style.height = 'auto';
this.style.height = (this.scrollHeight + 2) + "px";
});
}