Changeset 318 for trunk/examples


Ignore:
Timestamp:
09/14/05 12:09:22 (14 years ago)
Author:
mokhet
Message:

add options to let the user choose between panel or popup for CharacterMap? and between panel or toolbar for ListType? plugin

Location:
trunk/examples
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/full_example-menu.html

    r312 r318  
    1515label {display:block;} 
    1616#numeditor {width:25px;} 
     17.options {display:none;} 
    1718</style> 
     19<script type="text/javascript"> 
     20function checkPluginsOptions() 
     21{ 
     22  var plugins = document.forms[0].elements['plugins']; 
     23  for(var x = 0; x < plugins.length; x++) 
     24    if (document.getElementById(plugins[x].value + 'Options')) 
     25      document.getElementById(plugins[x].value + 'Options').style.display = (plugins[x].checked)? 'block':'none'; 
     26} 
     27function toggleOnChange(elt) { 
     28  document.getElementById(elt.value + 'Options').style.display = (elt.checked)? 'block':'none'; 
     29} 
     30</script> 
    1831</head> 
    1932 
    20 <body> 
     33<body onload="checkPluginsOptions();"> 
    2134  <form action="full_example-body.html" target="body"> 
    2235    <p> 
     
    5669      </label> 
    5770      <label> 
    58         <input type="checkbox" name="plugins" value="CharacterMap" checked="checked"> CharacterMap 
     71        <input type="checkbox" name="plugins" value="CharacterMap" checked="checked" onchange="toggleOnChange(this);"> CharacterMap 
    5972      </label> 
     73      <div id="CharacterMapOptions" class="options"> 
     74        mode : <select name="CharacterMapMode"> 
     75          <option value="popup">popup</option> 
     76          <option value="panel">panel</option> 
     77        </select> 
     78      </div> 
    6079      <label> 
    6180        <input type="checkbox" name="plugins" value="CharCounter"> CharCounter 
     
    110129      </label> 
    111130      <label> 
    112         <input type="checkbox" name="plugins" value="ListType" checked="checked"> ListType 
     131        <input type="checkbox" name="plugins" value="ListType" checked="checked" onchange="toggleOnChange(this);"> ListType 
    113132      </label> 
     133      <div id="ListTypeOptions" class="options"> 
     134        mode : <select name="ListTypeMode"> 
     135          <option value="toolbar">toolbar</option> 
     136          <option value="panel">panel</option> 
     137        </select> 
     138      </div> 
    114139      <label> 
    115140        <input type="checkbox" name="plugins" value="NoteServer"> NoteServer 
  • trunk/examples/full_example.js

    r239 r318  
    8585 
    8686    } 
     87     
     88    if (typeof ListType != 'undefined') 
     89    { 
     90      if(window.parent && window.parent != window) 
     91      { 
     92        var f = window.parent.menu.document.forms[0]; 
     93        config.ListType.mode = f.elements['ListTypeMode'].options[f.elements['ListTypeMode'].selectedIndex].value; 
     94      } 
     95    } 
     96 
     97    if (typeof CharacterMap != 'undefined') 
     98    { 
     99      if(window.parent && window.parent != window) 
     100      { 
     101        var f = window.parent.menu.document.forms[0]; 
     102        config.CharacterMap.mode = f.elements['CharacterMapMode'].options[f.elements['CharacterMapMode'].selectedIndex].value; 
     103      } 
     104    } 
    87105 
    88106    return config; 
Note: See TracChangeset for help on using the changeset viewer.