Changeset 1078 for trunk


Ignore:
Timestamp:
10/10/08 21:12:24 (11 years ago)
Author:
douglas
Message:

FIXED Ticket #1299 Add configuration options for streamlining the Linker UI

Location:
trunk/plugins/Linker
Files:
2 edited

Legend:

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

    r987 r1078  
    44<div id="[options]" > 
    55  <fieldset> 
    6     <legend><label><input type="radio" name="[type]" value="url" checked="checked" onclick=" 
     6    <legend><label><input type="radio" name="[type]" id="[type]" value="url" checked="checked" onclick=" 
    77      document.getElementById('[urltable]').style.display=this.checked?'':'none'; 
    88      document.getElementById('[mailtable]').style.display=this.checked?'none':''; 
     
    6060    </table> 
    6161  </fieldset> 
    62   <fieldset> 
     62  <fieldset id="[mailtofieldset]"> 
    6363    <legend><label><input type="radio" name="[type]" value="mailto" onclick=" 
    6464      document.getElementById('[mailtable]').style.display=this.checked?'':'none'; 
  • trunk/plugins/Linker/pluginMethods.js

    r1055 r1078  
    447447  } 
    448448 
    449   //if no anchors found completely hide Anchor-Link 
    450   if(anchor.length==0) { 
     449  // Configuration for disabling the mail link functionality. 
     450  if(this.linker.lConfig.disableMailto) 
     451  { 
     452    this.dialog.getElementById('mailtofieldset').style.display = "none"; 
     453  } 
     454 
     455  // Configuration for hiding the anchor functionality.  Also, no need to show 
     456  // the UI if there are no anchors present in the document. 
     457  if(anchor.length==0 || this.linker.lConfig.disableAnchors) 
     458  { 
    451459    this.dialog.getElementById('anchorfieldset').style.display = "none"; 
    452   } 
     460 
     461    // If we disable the other two fieldsets, we'll hide the (now) unnecessary 
     462    // radio button. 
     463    if (this.linker.lConfig.disableMailto) 
     464    { 
     465      this.dialog.getElementById('type').style.display = "none"; 
     466    } 
     467  } 
     468 
    453469   
    454470  // if we're not editing an existing link, hide the remove link button 
Note: See TracChangeset for help on using the changeset viewer.