version 1.588, 2007/09/25 22:58:48
|
version 1.590, 2007/09/27 15:36:23
|
Line 1074 sub changable_area {
|
Line 1074 sub changable_area {
|
|
|
=pod |
=pod |
|
|
=item * resize_textarea_js |
=item * viewport_geometry_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. |
|
|
|
|
Provides javascript object (Geometry) which can provide information about the viewport geometry for the client browser. |
|
|
=cut |
=cut |
|
|
sub resize_textarea_js { |
|
return <<"RESIZE"; |
sub viewport_geometry_js { |
<script type="text/javascript"> |
return <<"GEOMETRY"; |
var Geometry = {}; |
var Geometry = {}; |
function init_geometry() { |
function init_geometry() { |
if (Geometry.init) { return }; |
if (Geometry.init) { return }; |
Geometry.init=1; |
Geometry.init=1; |
if (window.innerHeight) { |
if (window.innerHeight) { |
Geometry.getViewportHeight = function() { return window.innerHeight; }; |
Geometry.getViewportHeight = function() { return window.innerHeight; }; |
Geometry.getHorizontalScroll = function() { return window.pageXOffset; }; |
Geometry.getViewportWidth = function() { return window.innerWidth; }; |
Geometry.getVerticalScroll = function() { return window.pageYOffset; }; |
Geometry.getHorizontalScroll = function() { return window.pageXOffset; }; |
|
Geometry.getVerticalScroll = function() { return window.pageYOffset; }; |
} |
} |
else if (document.documentElement && document.documentElement.clientHeight) { |
else if (document.documentElement && document.documentElement.clientHeight) { |
Geometry.getViewportHeight = |
Geometry.getViewportHeight = |
function() { return document.documentElement.clientHeight; }; |
function() { return document.documentElement.clientHeight; }; |
Geometry.getHorizontalScroll = |
Geometry.getViewportWidth = |
function() { return document.documentElement.scrollLeft; }; |
function() { return document.documentElement.clientWidth; }; |
Geometry.getVerticalScroll = |
|
function() { return document.documentElement.scrollTop; }; |
Geometry.getHorizontalScroll = |
|
function() { return document.documentElement.scrollLeft; }; |
|
Geometry.getVerticalScroll = |
|
function() { return document.documentElement.scrollTop; }; |
} |
} |
else if (document.body.clientHeight) { |
else if (document.body.clientHeight) { |
Geometry.getViewportHeight = |
Geometry.getViewportHeight = |
function() { return document.body.clientHeight; }; |
function() { return document.body.clientHeight; }; |
Geometry.getHorizontalScroll = |
Geometry.getViewportWidth = |
function() { return document.body.scrollLeft; }; |
function() { return document.body.clientWidth; }; |
Geometry.getVerticalScroll = |
Geometry.getHorizontalScroll = |
function() { return document.body.scrollTop; }; |
function() { return document.body.scrollLeft; }; |
|
Geometry.getVerticalScroll = |
|
function() { return document.body.scrollTop; }; |
} |
} |
} |
} |
|
|
|
GEOMETRY |
|
} |
|
|
|
=pod |
|
|
|
=item * viewport_size_js { |
|
|
|
Provides a javascript function to set values of two form elements - width and height (elements are passed in as arguments to the javascript function) to the dimensions of the user's browser window. |
|
|
|
=cut |
|
|
|
sub viewport_size_js { |
|
my $geometry = &viewport_geometry_js(); |
|
return <<"DIMS"; |
|
|
|
$geometry |
|
|
|
function getViewportDims(width,height) { |
|
init_geometry(); |
|
width.value = Geometry.getViewportWidth(); |
|
height.value = Geometry.getViewportHeight(); |
|
return; |
|
} |
|
|
|
DIMS |
|
} |
|
|
|
=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 { |
|
my $geometry = &viewport_geometry_js(); |
|
return <<"RESIZE"; |
|
<script type="text/javascript"> |
|
$geometry |
|
|
function getX(element) { |
function getX(element) { |
var x = 0; |
var x = 0; |
while (element) { |
while (element) { |
Line 4330 table.LC_data_table, table.LC_mail_list
|
Line 4377 table.LC_data_table, table.LC_mail_list
|
} |
} |
table.LC_nested_outer { |
table.LC_nested_outer { |
border: 1px solid #000000; |
border: 1px solid #000000; |
border-collapse: separate; |
border-collapse: collapse; |
border-spacing: 0px; |
border-spacing: 0px; |
width: 100%; |
width: 100%; |
} |
} |
table.LC_nested { |
table.LC_nested { |
border: 0px; |
border: 0px; |
border-collapse: separate; |
border-collapse: collapse; |
border-spacing: 0px; |
border-spacing: 0px; |
width: 100%; |
width: 100%; |
} |
} |
Line 4388 table.LC_nested tr.LC_info_row td {
|
Line 4435 table.LC_nested tr.LC_info_row td {
|
font-size: small; |
font-size: small; |
text-align: center; |
text-align: center; |
} |
} |
table.LC_nested tr.LC_info_row td.LC_left_item { |
table.LC_nested tr.LC_info_row td.LC_left_item, |
|
table.LC_nested_outer tr th.LC_left_item { |
text-align: left; |
text-align: left; |
} |
} |
table.LC_nested td { |
table.LC_nested td { |
Line 4912 table.LC_sty_end {
|
Line 4960 table.LC_sty_end {
|
background: #FFBBBB; |
background: #FFBBBB; |
} |
} |
|
|
|
table.LC_double_column { |
|
border-width: 0px; |
|
border-collapse: collapse; |
|
width: 100%; |
|
padding: 2px; |
|
} |
|
|
|
table.LC_double_column tr td.LC_left_col { |
|
top: 2px; |
|
left: 2px; |
|
width: 47%; |
|
vertical-align: top; |
|
} |
|
|
|
table.LC_double_column tr td.LC_right_col { |
|
top: 2px; |
|
right: 2px; |
|
width: 47%; |
|
vertical-align: top; |
|
} |
|
|
END |
END |
} |
} |
|
|