version 1.563, 2007/08/15 16:25:14
|
version 1.565, 2007/08/18 00:01:37
|
Line 1084 sub changable_area {
|
Line 1084 sub changable_area {
|
|
|
=pod |
=pod |
|
|
|
=item * resize_textarea_js |
|
|
|
emits the needed javascript to resize a textarea to be as big as possible |
|
|
|
creates a function resize_textrea that takes two IDs first should be |
|
the id of the element to resize, second should be the id of a div that |
|
surrounds everything that comes after the textarea, this routine needs |
|
to be attached to the <body> for the onload and onresize events. |
|
|
|
|
|
=cut |
|
|
|
sub resize_textarea_js { |
|
return <<"RESIZE"; |
|
<script type="text/javascript"> |
|
var Geometry = {}; |
|
function init_geometry() { |
|
if (Geometry.init) { return }; |
|
Geometry.init=1; |
|
if (window.innerHeight) { |
|
Geometry.getViewportHeight = function() { return window.innerHeight; }; |
|
} |
|
else if (document.documentElement && document.documentElement.clientHeight) { |
|
Geometry.getViewportHeight = |
|
function() { return document.documentElement.clientHeight; }; |
|
} |
|
else if (document.body.clientHeight) { |
|
Geometry.getViewportHeight = |
|
function() { return document.body.clientHeight; }; |
|
} |
|
} |
|
|
|
function resize_textarea(textarea_id,bottom_id) { |
|
init_geometry(); |
|
var textarea = document.getElementById(textarea_id); |
|
//alert(textarea); |
|
|
|
var textarea_top = textarea.offsetTop; |
|
var textarea_height = textarea.offsetHeight; |
|
var bottom = document.getElementById(bottom_id); |
|
var bottom_top = bottom.offsetTop; |
|
var bottom_height = bottom.offsetHeight; |
|
var window_height = Geometry.getViewportHeight(); |
|
var fudge = 23; |
|
var new_height = window_height-fudge-textarea_top-bottom_height; |
|
if (new_height < 300) { |
|
new_height = 300; |
|
} |
|
textarea.style.height=new_height+'px'; |
|
} |
|
</script> |
|
RESIZE |
|
|
|
} |
|
|
|
=pod |
|
|
=back |
=back |
|
|
=head1 Excel and CSV file utility routines |
=head1 Excel and CSV file utility routines |
Line 5575 sub user_picker {
|
Line 5632 sub user_picker {
|
$srchterm = $srch->{'srchterm'}; |
$srchterm = $srch->{'srchterm'}; |
} |
} |
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'usr' => 'Search criteria', |
|
'doma' => 'Domain/institution to search', |
'doma' => 'Domain/institution to search', |
'uname' => 'username', |
'uname' => 'username', |
'lastname' => 'last name', |
'lastname' => 'last name', |
Line 5735 $new_user_create
|
Line 5791 $new_user_create
|
|
|
<table> |
<table> |
<tr> |
<tr> |
<td>$lt{'usr'}:</td> |
|
<td>$srchbysel |
<td>$srchbysel |
$srchtypesel |
$srchtypesel |
<input type="text" size="15" name="srchterm" value="$srchterm" /> |
<input type="text" size="15" name="srchterm" value="$srchterm" /> |
$srchinsel |
$srchinsel |
</td> |
</td> |
</tr> |
</tr> |
<tr> |
<tr> |
<td align="right">$lt{'doma'}:</td> |
<td>$lt{'doma'}: $domform</td> |
<td>$domform</td> |
|
</td> |
</td> |
</tr> |
</tr> |
</table> |
</table> |