Changeset 5253


Ignore:
Timestamp:
Feb 12, 2009, 1:17:26 PM (15 years ago)
Author:
osimons
Message:

CustomFieldAdminPlugin: Fixed a javascript show/hide error + cleaned some very old inefficient Genshi code...

Location:
customfieldadminplugin/0.11/customfieldadmin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • customfieldadminplugin/0.11/customfieldadmin/htdocs/js/customfieldadmin.js

    r5252 r5253  
    1313                break;
    1414            case 1: // select
    15                 label('#options, #cols, #rows').show();
    16                 label('#format').hide();
     15                label('#options').show();
     16                label('#cols, #rows, #format').hide();
    1717                break;
    1818            case 2: // checkbox
    19                 label('#options, #cols, #rows').hide();
    20                 label('#format').hide();
     19                label('#options, #cols, #rows, #format').hide();
    2120                break;
    2221            case 3: // radio
  • customfieldadminplugin/0.11/customfieldadmin/templates/customfieldadmin.html

    r5252 r5253  
    2626          <label>Type:<br />
    2727            <select name="type" id="type">
    28               <option value="text" selected="${cfadmin.customfield.type=='text' and 'selected' or None}">
    29                 Text</option>
    30               <option value="select" selected="${cfadmin.customfield.type=='select' and 'selected' or None}">
    31                 Select</option>
    32               <option value="checkbox" selected="${cfadmin.customfield.type=='checkbox' and 'selected' or None}">
    33                 Checkbox</option>
    34               <option value="radio" selected="${cfadmin.customfield.type=='radio' and 'selected' or None}">
    35                 Radio</option>
    36               <option value="textarea" selected="${cfadmin.customfield.type=='textarea' and 'selected' or None}">
    37                 Textarea</option>
     28              <option py:for="value in ['text', 'select', 'checkbox', 'radio', 'textarea']"
     29                  value="${value}" selected="${cfadmin.customfield.type==value and 'selected' or None}">
     30                ${value.capitalize()}</option>
    3831            </select>
    3932          </label>
Note: See TracChangeset for help on using the changeset viewer.