Changeset 1188

Show
Ignore:
Timestamp:
10/25/06 01:30:10 (2 years ago)
Author:
jm3
Message:

fixed ajax edit buttons, added trac button css

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • feedmelinks/index.php

    r1178 r1188  
    7777<div class="attention"> 
    7878        <b><%= $mesg %></b><br /> 
    79         <img src="img/dk-gray.gif" height="1" width="250" /><br /> 
     79        <img src="/img/dk-gray.gif" height="1" width="250" /><br /> 
    8080</div> 
    8181<br /> 
     
    9292<div class="attention"> 
    9393        <b>add a link</b><br /> 
    94         <img src="img/dk-gray.gif" height="1" width="250" /><br /> 
     94        <img src="/img/dk-gray.gif" height="1" width="250" /><br /> 
    9595  <input name="op" value="submit" type="hidden" /> 
    9696<% if( $from == "toolbar" ) { %> 
     
    273273        <b>delete link:</b> 
    274274        <br /> 
    275         <img src="img/dk-gray.gif" height="1" width="250" /> 
     275        <img src="/img/dk-gray.gif" height="1" width="250" /> 
    276276        <br /> 
    277277        <br /> 
  • feedmelinks/mailer.php

    r927 r1188  
    8484<tr> 
    8585        <td colspan="2"> 
    86 <p style="text-align: right;"><button accesskey="s" value="Send it!" onClick="document.forms[0].submit();" class="default"><u>S</u>end It!</button></p> 
     86<p style="text-align: right;"><button accesskey="s" value="Send it!" onClick="document.forms[0].submit();" style="font-weight: bold; padding: 1.0em;"><u>S</u>end It!</button></p> 
    8787<input type="hidden" name="l" value="<%= $id %>" /> 
    8888 
  • feedmelinks/modules/utils.inc.php

    r1187 r1188  
    33693369 
    33703370function makeInflowAJAXEditLink( $type ) { 
    3371         %><input type="image" class="editor inflow_<%= $type %>" src="img/icons/edit.png"  
    3372                 height="26" width="26" hspace="5" alt="edit" border="0" /></a><% 
    3373 
    3374  
    3375 function makeAJAXEditLink( $type ) { 
    3376         %><input type="image" class="editor <%= $type %>" src="img/icons/edit.png"  
    3377                 height="26" width="26" hspace="5" alt="edit" border="0" /></a><% 
     3371        %><input type="button" class="editor inflow_<%= $type %>" src="/img/icons/edit.png"  
     3372                height="26" width="26" hspace="5" value="edit" border="0" /></a><% 
     3373
     3374 
     3375function makeAJAXEditLink( $type, $label ) { 
     3376        $label = $label ? $label : "Rename this link"; 
     3377        %><input type="button" class="editor <%= $type %>" src="/img/icons/edit.png"  
     3378                height="26" width="26" hspace="5" value="<%= $label %>" border="0" /></a><% 
    33783379} 
    33793380 
  • feedmelinks/modules/view-link.inc.php

    r1184 r1188  
    5656 
    5757        <div ftype="name" fid="<%= $l %>"> 
    58                 <a class="biglink" title="<%= $name %>" href="/t/<%= $l %>"><%= $name %></a><% if( $owned ) {makeAJAXEditLink( "name" );} %> 
     58                <a class="biglink" title="<%= $name %>" href="/t/<%= $l %>"><%= $name %></a> <% if( $owned ) {makeAJAXEditLink( "name", "Rename this link" );} %> 
    5959<% if( $owned ) { %> 
    6060                        Privacy: <%= makeAJAXToggle( "link_privacy", $l, $isPrivate ) %> 
     
    6565                        <small class="subtle"> 
    6666                         
    67                         (<%= $numClicks %> <%= $numClicks == 1 ? "click" : "clicks" %>) 
    68                         (<a href="<%= $l %>">#permalink</a>) 
     67                        <a href="<%= $l %>">#permalink</a> 
    6968                        </small> 
    7069<% 
     
    7675  <%= insertBigThumb( $link ) %> 
    7776        <div ftype="url" fid="<%= $l %>"> 
    78                 <a title="<%= $link %>" href="/t/<%= $l %>"><%= $displayLink %></a><% if( $owned ) {makeAJAXEditLink( "url" ); } %> 
     77                <a title="<%= $link %>" href="/t/<%= $l %>"><%= $displayLink %></a> <% if( $owned ) {makeAJAXEditLink( "url", "Edit this URL" ); } %> 
    7978        </div> 
    8079 
  • feedmelinks/script/fajax.js

    r889 r1188  
    8686        edit_field.setAttribute( "name", "name" ); 
    8787        edit_field.setAttribute( "value", value ); 
    88         edit_field.setAttribute( "size", Math.floor( value ).length * 1.2); 
     88        edit_field.setAttribute( "size", value.length / (value.length * .015) ); // very cool, somewhat magical dampening function to even out the pixel : character length -- as the string gets longer, the ratio shrinks 
     89        edit_field.setAttribute( "style", "padding: 5px; font-size: 100%; color: #ff0000;"); 
    8990        edit_field.setAttribute( "onKeyDown", field_handler ); 
    9091        edit_ui.appendChild( edit_field ); 
     
    9798        save_button.setAttribute( "type", "submit" ); 
    9899        save_button.setAttribute( "value", "Save" ); 
    99         save_button.setAttribute( "type", "image" ); 
    100         save_button.setAttribute( "src", "/img/icons/ok.png" ); 
     100        save_button.setAttribute( "type", "button" ); 
    101101        save_button.setAttribute( "hspace", "5" ); 
    102102        save_button.setAttribute( "onClick", save_handler ); 
     
    107107        cancel_button.setAttribute( "id", "cancel-button" ); 
    108108        cancel_button.setAttribute( "value", "Cancel" ); 
    109         cancel_button.setAttribute( "type", "image" ); 
    110         cancel_button.setAttribute( "src", "/img/icons/cancel.png" ); 
     109        cancel_button.setAttribute( "type", "button" ); 
    111110        cancel_button.setAttribute( "hspace", "5" ); 
    112111        cancel_button.setAttribute( "onClick", cancel_handler ); 
  • feedmelinks/script/funcs.js

    r1084 r1188  
    5555 
    5656function openMailer( argId ) { 
    57         window.open( "/mailer?id=" + argId, "foo", "width=435,height=340" ); 
     57        window.open( "/mailer?id=" + argId, "foo", "width=455,height=350" ); 
    5858} 
    5959 
  • feedmelinks/style/new-portal.css

    r1177 r1188  
     1/* stolen from trac.css */ 
     2input, textarea, select { margin: 2px } 
     3input, select { vertical-align: middle } 
     4input[type=button], input[type=submit], input[type=reset] { 
     5        font-size: 10px; 
     6 background: #eee; 
     7 color: #222; 
     8 border: 1px outset #ccc; 
     9 padding: .1em .5em; 
     10} 
     11input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover { 
     12 background: #ccb; 
     13} 
     14input[type=button][disabled], input[type=submit][disabled], 
     15input[type=reset][disabled] { 
     16 background: #f6f6f6; 
     17 border-style: solid; 
     18 color: #999; 
     19} 
     20 
     21/* end stealing */ 
     22 
    123.progress { 
    224        background-color: white;