Changeset 5158 in josm for trunk/data


Ignore:
Timestamp:
2012-04-01T20:36:32+02:00 (13 years ago)
Author:
simon04
Message:

see #7552 - presets: allow icons for individual combo items

Location:
trunk/data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/defaultpresets.xml

    r5156 r5158  
    4040  display_values: comma separated list of values to be displayed instead of the
    4141                  database values, order and number must be equal to values
    42   short_description: comma separated list of texts to be displayed below each
    43                     display_value. (Only if it is not possible to describe
    44                     the entry in 2-3 words.) Instead of comma separeted list, you can
    45                     also write it in the following form:
    46                         <short_description>first description</short_description>
    47                                 ...
    48                         <short_description>last description</short_description>
     42  short_descriptions: comma separated list of texts to be displayed below each
     43                      display_value. (Only if it is not possible to describe
     44                      the entry in 2-3 words.) Instead of comma separeted list
     45  instead using values, display_values and short_descriptions, the following form is also supported:
     46    <list_item value="" display_value="' short_description="" icon=""/>
    4947  default: default string to display (defaults to "")
    5048  use_last_as_default: true/false/force (default is "false")
     
    6058  display_values: delimiter-separated list of values to be displayed instead of the
    6159                  database values, order and number must be equal to values
    62   short_description: delimiter-separated list of texts to be displayed below each
    63                     display_value. (Only if it is not possible to describe
    64                     the entry in 2-3 words.) Instead of a separated list, you can
    65                     also write it in the following form:
    66                         <short_description>first description</short_description>
    67                                 ...
    68                         <short_description>last description</short_description>
     60  short_descriptions: delimiter-separated list of texts to be displayed below each
     61                     display_value. (Only if it is not possible to describe
     62                     the entry in 2-3 words.) Instead of a separated list
     63  instead using values, display_values and short_descriptions, the following form is also supported:
     64    <list_item value="" display_value="' short_description="" icon=""/>
    6965  default: default string to display (defaults to "")
    7066  use_last_as_default: true/false/force (default is "false")
     
    700696            <optional>
    701697                <text key="name" text="Name" />
    702                 <combo key="sac_scale" text="SAC Scale" values="hiking,mountain_hiking,demanding_mountain_hiking,alpine_hiking,demanding_alpine_hiking,difficult_alpine_hiking" display_values="T1 - hiking trail,T2 - mountain hiking trail,T3 - difficult\, exposed hiking trail,T4 - difficult\, exposed\, steep alpine trail,T5 - difficult alpine trail with climbing,T6 - hazardous alpine trail with climbing">
    703                     <short_description>Trail well cleared. Area flat or slightly sloped, no fall hazard</short_description>
    704                     <short_description>Trail with continuous line and balanced ascent. Terrain partially steep, fall hazard possible</short_description>
    705                     <short_description>exposed sites may be secured with ropes or chains, possible need to use hands for balance. Partly exposed sites with fall hazard, scree, pathless jagged rocks</short_description>
    706                     <short_description>sometimes need for hand use to get ahead. Terrain quite exposed, precarious grassy acclivities, jagged rocks, facile snow-free glaciers.</short_description>
    707                     <short_description>single plainly climbing up to second grade. Exposed, demanding terrain, jagged rocks, few dangerous glacier and snow</short_description>
    708                     <short_description>climbing up to second grade. Often very exposed, precarious jagged rocks, glacier with danger to slip and fall</short_description>
     698                <combo key="sac_scale" text="SAC Scale">
     699                    <list_entry value="hiking" display_value="T1 - hiking trail" short_description="Trail well cleared. Area flat or slightly sloped, no fall hazard" />
     700                    <list_entry value="mountain_hiking" display_value="T2 - mountain hiking trail" short_description="Trail with continuous line and balanced ascent. Terrain partially steep, fall hazard possible" />
     701                    <list_entry value="demanding_mountain_hiking" display_value="T3 - difficult, exposed hiking trail" short_description="exposed sites may be secured with ropes or chains, possible need to use hands for balance. Partly exposed sites with fall hazard, scree, pathless jagged rocks" />
     702                    <list_entry value="alpine_hiking" display_value="T4 - difficult, exposed, steep alpine trail" short_description="sometimes need for hand use to get ahead. Terrain quite exposed, precarious grassy acclivities, jagged rocks, facile snow-free glaciers" />
     703                    <list_entry value="demanding_alpine_hiking" display_value="T5 - difficult alpine trail with climbing" short_description="single plainly climbing up to second grade. Exposed, demanding terrain, jagged rocks, few dangerous glacier and snow" />
     704                    <list_entry value="difficult_alpine_hiking" display_value="T6 - hazardous alpine trail with climbing" short_description="climbing up to second grade. Often very exposed, precarious jagged rocks, glacier with danger to slip and fall" />
    709705                </combo>
    710706                <combo key="mtb:scale" text="MTB Scale" values="0,1,2,3,4,5" />
  • trunk/data/tagging-preset.xsd

    r5157 r5158  
    126126        </complexType>
    127127
     128        <complexType name="list_entry">
     129                <attribute name="value" type="string" use="required" />
     130                <attribute name="display_value" type="string" />
     131                <attribute name="short_description" type="string" />
     132                <attribute name="icon" type="string" />
     133        </complexType>
     134
    128135        <complexType name="combo">
    129                 <sequence>
    130                         <element name="short_description" type="string" minOccurs="0"
    131                                 maxOccurs="unbounded" />
    132                 </sequence>
    133                 <attribute name="key" type="string" use="required" />
    134                 <attribute name="text" type="string" />
    135                 <attribute name="text_context" type="string" />
    136                 <attribute name="values" type="string" use="required" />
     136                <!-- use either list_entry's or a combination of values/display_values -->
     137                <sequence>
     138                        <element name="list_entry" type="tns:list_entry" minOccurs="0" maxOccurs="unbounded" />
     139                </sequence>
     140                <attribute name="key" type="string" use="required" />
     141                <attribute name="text" type="string" />
     142                <attribute name="text_context" type="string" />
     143                <attribute name="values" type="string" />
    137144                <attribute name="values_context" type="string" />
    138145                <attribute name="display_values" type="string" />
Note: See TracChangeset for help on using the changeset viewer.