Ignore:
Timestamp:
10/20/08 15:53:08 (11 years ago)
Author:
nicholasbs
Message:
  • Fixes #58 (configuration of allowed target types)
  • Fixes #1308 (remove link button doesn't work, switching target types causes JS error)
  • Clean up dialog html (remove embedded JavaScript?)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/Linker/dialog.html

    r1078 r1097  
    44<div id="[options]" > 
    55  <fieldset> 
    6     <legend><label><input type="radio" name="[type]" id="[type]" value="url" checked="checked" onclick=" 
    7       document.getElementById('[urltable]').style.display=this.checked?'':'none'; 
    8       document.getElementById('[mailtable]').style.display=this.checked?'none':''; 
    9       document.getElementById('[anchortable]').style.display=this.checked?'none':''; 
    10     " /> <l10n>URL Link</l10n></label></legend> 
     6    <legend><label><input type="radio" name="[type]" id="[type_url]" value="url" checked="checked" /> 
     7        <l10n>URL Link</l10n> 
     8    </label></legend> 
    119    <table id="[urltable]" width="100%"> 
    1210      <tr> 
    1311        <th><label for="[href]"><l10n>URL:</l10n> </label></th> 
    14         <td><input type="text" name="[href]" style="width:100%" value="http://www.example.com/" onfocus="if (this.value == 'http://www.example.com/') this.value = '';" /></td> 
     12        <td><input type="text" name="[href]" id="[href]" style="width:100%" value="http://www.example.com/" onfocus="if (this.value == 'http://www.example.com/') this.value = '';" /></td> 
    1513      </tr> 
    16       <tr style="vertical-align: top;"> 
     14      <tr style="vertical-align: top;" id="[target_options]"> 
    1715        <th><l10n>Target:</l10n></th> 
    1816        <td> 
    19           <div><label><input type="radio" name="[target]" value="" onclick="document.getElementById('[popuptable]').style.display='none';"  checked="checked" /> <l10n>Ordinary Link</l10n></label></div> 
    20           <div><label><input type="radio" name="[target]" value="_top" onclick="document.getElementById('[popuptable]').style.display='none';"  /> <l10n>Same Window (jump out of frames)</l10n></label></div> 
    21           <div><label><input type="radio" name="[target]" value="_blank" onclick="document.getElementById('[popuptable]').style.display='none';"/> <l10n>New Window</l10n> </label></div> 
    22           <div> 
    23             <label><input type="radio" name="[target]" value="popup"    onclick="document.getElementById('[popuptable]').style.display='';" /> <l10n>Popup Window</l10n> </label> 
     17          <div id="[noTarget]"><label><input type="radio" name="[target]" id="[noTargetRadio]" value="" /> <l10n>Ordinary Link</l10n></label></div> 
     18          <div id="[sameWindow]"><label><input type="radio" name="[target]" id="[sameWindowRadio]" value="_top" /> <l10n>Same Window (jump out of frames)</l10n></label></div> 
     19          <div id="[newWindow]"><label><input type="radio" name="[target]" id="[newWindowRadio]" value="_blank" /> <l10n>New Window</l10n> </label></div> 
     20          <div id="[popupWindow]"> 
     21            <label><input type="radio" name="[target]" id="[popupWindowRadio]" value="popup" /> <l10n>Popup Window</l10n> </label> 
    2422             <div style="padding-left:10px"> 
    2523              <table id="[popuptable]"> 
     
    6159  </fieldset> 
    6260  <fieldset id="[mailtofieldset]"> 
    63     <legend><label><input type="radio" name="[type]" value="mailto" onclick=" 
    64       document.getElementById('[mailtable]').style.display=this.checked?'':'none'; 
    65       document.getElementById('[urltable]').style.display=this.checked?'none':''; 
    66       document.getElementById('[anchortable]').style.display=this.checked?'none':''; 
    67     "/> <l10n>Email Link</l10n></label></legend> 
     61    <legend><label><input type="radio" name="[type]" id="[type_mailto]" value="mailto"/> 
     62        <l10n>Email Link</l10n> 
     63    </label></legend> 
    6864    <table id="[mailtable]" width="100%"> 
    6965      <tr> 
    7066        <th><label for="[to]"><l10n>Email Address:</l10n> </label></th> 
    71         <td><input type="text" name="[to]" style="width:100%" value="alice@example.com" onfocus="if (this.value == 'alice@example.com') this.value = '';" /></td> 
     67        <td><input type="text" name="[to]" id="[to]" style="width:100%" value="alice@example.com" onfocus="if (this.value == 'alice@example.com') this.value = '';" /></td> 
    7268      </tr> 
    7369      <tr> 
     
    8379 
    8480  <fieldset id="[anchorfieldset]"> 
    85     <legend><label><input type="radio" name="[type]" value="anchor" onclick=" 
    86       document.getElementById('[urltable]').style.display=this.checked?'none':''; 
    87       document.getElementById('[mailtable]').style.display=this.checked?'none':''; 
    88       document.getElementById('[anchortable]').style.display=this.checked?'':'none'; 
    89     "/> <l10n>Anchor-Link</l10n></label></legend> 
     81    <legend><label><input type="radio" name="[type]" id="[type_anchor]" value="anchor"/> 
     82        <l10n>Anchor-Link</l10n> 
     83    </label></legend> 
    9084    <table id="[anchortable]" width="100%"> 
    9185      <tr> 
     
    10195  <div style="text-align:right"> 
    10296    <input type="button" id="[ok]"     value="_(OK)"     /> 
    103     <input type="button" id="[clear]"  value="_(Remove Link)" onclick="this.form['[href]'].value='';this.form['[to]'].value='';document.getElementById('[ok]').click();" /> 
     97    <input type="button" id="[clear]"  value="_(Remove Link)" /> 
    10498    <input type="button" id="[cancel]" value="_(Cancel)" /> 
    10599  </div> 
    106100</div> 
    107101</div> 
     102 
     103 
Note: See TracChangeset for help on using the changeset viewer.