Revision 184

Date:
2012/02/02 14:45:41
Author:
ahitrov
Revision Log:
More accurate control implementation
Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/core/comps/contenido/components/inputs/url.msn

     
    1 <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>
    1 3 <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 %>()">
    4 style="width: 97%;color:blue;text-decoration:underline;" onkeyup="<% $name %>_changed();">
    3 5
    4 6 <table id="<% $name %>_prev_table" style="width: 95%; display: none;" cellspacing="0" cellpadding="0" border="0">
    5 7 <tr>
     
    13 15 <textarea id="<% $name %>_prev_value" style="display: none;"><% $check %></textarea>
    14 16
    15 17 <script type="text/javascript">
    18 <!--
    16 19 function <% $name %>_changed() {
    17 20 var t = document.getElementById('<% $name %>_prev_table');
    18 21 if (document.getElementById('<% $name %>_text').value==document.getElementById('<% $name %>_prev_value').value) {
     
    26 29 }
    27 30 }
    28 31
    29 function lookfor_<% $name %>() {
    30 var id = document.getElementById('<% $name %>').value;
    31 if (id) {
    32 var Uri = id;
    33 var Width = screen.width;
    34 var Height = screen.height;
    35 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');
    36 }
    37 }
    38
    39 32 function <% $name %>_undo() {
    40 33 document.getElementById('<% $name %>_text').value = document.getElementById('<% $name %>_prev_value').value;
    41 34 <% $name %>_changed();
    42 35 return false;
    43 36 }
    37 //-->
    44 38 </script>
    45 39
    46 40 <%args>