1 |
185 |
ahitrov |
<a href="#" onclick="this.href = $('input[name=<% $name %>]').attr('value'); if ( this.href.slice(0,4) == 'http' || this.href.slice(0,3) == 'ftp' ) { return true } else { return false }" |
2 |
|
|
title="������� ������" target="_blank"><img src="/contenido/i/lookup-19x19.gif" width="19" height="19" align="right" style="border:0; margin:0 5px;"></a> |
3 |
3 |
ahitrov@rambler.ru |
<input <% $prop->{readonly} ? 'readonly ' : '' %> type="text" name="<% $name %>" id="<% $name%>_text" size="60" value="<% html_escape($check) || $prop->{default} %>" |
4 |
185 |
ahitrov |
style="width: 97%;color:blue;text-decoration:underline;" onkeyup="<% $name %>_changed();"> |
5 |
3 |
ahitrov@rambler.ru |
|
6 |
|
|
<table id="<% $name %>_prev_table" style="width: 95%; display: none;" cellspacing="0" cellpadding="0" border="0"> |
7 |
|
|
<tr> |
8 |
|
|
<td width="100%" class="bb undo" style="padding: 3px;"><% $check || ' ' %></td> |
9 |
|
|
<td style="padding-left: 3px; vertical-align: top;"><a href="#" onclick="return <% $name %>_undo();" title="�������� ���������"><img src="/contenido/i/undo-19x19.gif" width="19" height="19" class="bb gb"></a></td> |
10 |
|
|
</tr> |
11 |
|
|
</table> |
12 |
185 |
ahitrov |
% if ( exists $prop->{rem} && $prop->{rem} ) { |
13 |
|
|
<div style="color:gray; font-size:85%; padding:4px">» <% $prop->{rem} %></div> |
14 |
|
|
% } |
15 |
3 |
ahitrov@rambler.ru |
<textarea id="<% $name %>_prev_value" style="display: none;"><% $check %></textarea> |
16 |
|
|
|
17 |
|
|
<script type="text/javascript"> |
18 |
185 |
ahitrov |
<!-- |
19 |
3 |
ahitrov@rambler.ru |
function <% $name %>_changed() { |
20 |
|
|
var t = document.getElementById('<% $name %>_prev_table'); |
21 |
|
|
if (document.getElementById('<% $name %>_text').value==document.getElementById('<% $name %>_prev_value').value) { |
22 |
|
|
if (t.style.display!='none') { |
23 |
|
|
t.style.display = 'none'; |
24 |
|
|
} |
25 |
|
|
return; |
26 |
|
|
} |
27 |
|
|
if (t.style.display=='none') { |
28 |
|
|
t.style.display = ''; |
29 |
|
|
} |
30 |
|
|
} |
31 |
|
|
|
32 |
|
|
function <% $name %>_undo() { |
33 |
|
|
document.getElementById('<% $name %>_text').value = document.getElementById('<% $name %>_prev_value').value; |
34 |
|
|
<% $name %>_changed(); |
35 |
|
|
return false; |
36 |
|
|
} |
37 |
185 |
ahitrov |
//--> |
38 |
3 |
ahitrov@rambler.ru |
</script> |
39 |
|
|
|
40 |
|
|
<%args> |
41 |
|
|
$name => undef |
42 |
|
|
$check => undef |
43 |
|
|
$prop => {} |
44 |
|
|
</%args> |