Line # Revision Author
1 3 ahitrov@rambler.ru <input <% $prop->{readonly} ? 'readonly ' : '' %> type="text" name="<% $name %>" id="<% $name%>_text" size="60" value="<% html_escape($check) || $prop->{default} %>"
2 style="width: 95%;color:blue;text-decoration:underline;" onkeyup="<% $name %>_changed();" onclick="lookfor_<% $name %>()">
3
4 <table id="<% $name %>_prev_table" style="width: 95%; display: none;" cellspacing="0" cellpadding="0" border="0">
5 <tr>
6 <td width="100%" class="bb undo" style="padding: 3px;"><% $check || '&nbsp;' %></td>
7 <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>
8 </tr>
9 </table>
10
11 <textarea id="<% $name %>_prev_value" style="display: none;"><% $check %></textarea>
12
13 <script type="text/javascript">
14 function <% $name %>_changed() {
15 var t = document.getElementById('<% $name %>_prev_table');
16 if (document.getElementById('<% $name %>_text').value==document.getElementById('<% $name %>_prev_value').value) {
17 if (t.style.display!='none') {
18 t.style.display = 'none';
19 }
20 return;
21 }
22 if (t.style.display=='none') {
23 t.style.display = '';
24 }
25 }
26
27 function lookfor_<% $name %>() {
28 var id = document.getElementById('<% $name %>').value;
29 if (id) {
30 var Uri = id;
31 var Width = screen.width;
32 var Height = screen.height;
33 window.open(Uri,'Interface','width='+Width+',height='+Height+',top=0,left=0,location=1,menubar=1,resizable=0,scrollbars=1,status=1,titlebar=1,toolbar=1,directories=1,hotkeys=1');
34 }
35 }
36
37 function <% $name %>_undo() {
38 document.getElementById('<% $name %>_text').value = document.getElementById('<% $name %>_prev_value').value;
39 <% $name %>_changed();
40 return false;
41 }
42 </script>
43
44 <%args>
45 $name => undef
46 $check => undef
47 $prop => {}
48 </%args>