Line # Revision Author
1 184 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 8 ahitrov@rambler.ru <input <% $prop->{readonly} ? 'readonly ' : '' %> type="text" name="<% $name %>" id="<% $name%>_text" size="60" value="<% html_escape($check) || $prop->{default} %>"
4 184 ahitrov style="width: 97%;color:blue;text-decoration:underline;" onkeyup="<% $name %>_changed();">
5 8 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 || '&nbsp;' %></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 <textarea id="<% $name %>_prev_value" style="display: none;"><% $check %></textarea>
13
14 <script type="text/javascript">
15 184 ahitrov <!--
16 8 ahitrov@rambler.ru function <% $name %>_changed() {
17 var t = document.getElementById('<% $name %>_prev_table');
18 if (document.getElementById('<% $name %>_text').value==document.getElementById('<% $name %>_prev_value').value) {
19 if (t.style.display!='none') {
20 t.style.display = 'none';
21 }
22 return;
23 }
24 if (t.style.display=='none') {
25 t.style.display = '';
26 }
27 }
28
29 function <% $name %>_undo() {
30 document.getElementById('<% $name %>_text').value = document.getElementById('<% $name %>_prev_value').value;
31 <% $name %>_changed();
32 return false;
33 }
34 184 ahitrov //-->
35 8 ahitrov@rambler.ru </script>
36
37 <%args>
38 $name => undef
39 $check => undef
40 $prop => {}
41 </%args>