Changes for page Settings

Last modified by Hal Eden on 2010/08/26 23:45

From version Icon 3.1 Icon
edited by Hal Eden
on 2026/11/28 07:54
Change comment: Migrated property [contentType] from class [XWiki.StyleSheetExtension]
To version Icon 4.1
edited by Hal Eden
on 2010/08/26 23:45
Change comment: Migrated property [contentType] from class [XWiki.StyleSheetExtension]

Summary

Details

Icon Page properties
Title
... ... @@ -1,0 +1,1 @@
1 +Settings
Content
... ... @@ -8,7 +8,7 @@
8 8   *#
9 9  #macro(displayCriterion $label $name $expanded $active $options)
10 10   <div class="criterion #if(!$expanded) collapsed #end #if($active) active #end">
11 - <span class="criterion-label">$label <span class="details">($msg.get('annotations.filters.anyvalue'))</span> <span class="clear">($msg.get('annotations.filters.clearvalue'))</span></span>
11 + <span class="criterion-label">$label <span class="details">($services.localization.render('annotations.filters.anyvalue'))</span> <span class="clear">($services.localization.render('annotations.filters.clearvalue'))</span></span>
12 12   ## and the hidden input holding the criterion name, that allows the javascript to extract the filter from this criterion
13 13   <input type="hidden" name="${name}" value="${name}"/>
14 14   #if ($expanded)
... ... @@ -15,11 +15,11 @@
15 15   <div class="criterion-options">
16 16   <div class="criterion-option-list">
17 17   #if ($options.keySet().size() == 0)
18 - <span class="no-option">$msg.get('annotations.filters.nooption', [$label])</span>
18 + <span class="no-option">$services.localization.render('annotations.filters.nooption', [$label])</span>
19 19   #end
20 20   #foreach ($option in $options.keySet())
21 21   #set($optionValue = $options.get($option))
22 - <label class="option #if($optionValue.checked) selected #end"><input type="checkbox" value="${option}" #if($optionValue.checked) checked="checked" #end/>$optionValue.prettyName</label>
22 + <label class="option #if($optionValue.checked) selected #end"><input type="checkbox" value="$escapetool.xml($option)" #if($optionValue.checked) checked="checked" #end/>$optionValue.prettyName</label>
23 23   #end
24 24   </div>
25 25   </div>
... ... @@ -34,20 +34,22 @@
34 34   * @param $valuesMap the map to return the values in
35 35   *#
36 36  #macro(getValues $annotationsList $propertyName $valuesMap)
37 - #set($valuesMap = {})
37 + #set ($result = {})
38 38   #foreach($ann in $annotationsList)
39 39   #set($value = "")
40 40   #set($value = $ann.get($propertyName))
41 41   #if("$!{value}" != "")
42 - #set($previousValue = $valuesMap.get($value))
42 + #set($previousValue = $result.get($value))
43 43   #if ($previousValue)
44 44   #set($newValue = $previousValue + 1)
45 - #set($dispose = $valuesMap.put($value, $newValue))
45 + #set($dispose = $result.put($value, $newValue))
46 46   #else
47 - #set($dispose = $valuesMap.put($value, 1))
47 + #set($dispose = $result.put($value, 1))
48 48   #end
49 49   #end
50 50   #end
51 + #set ($valuesMap = $NULL)
52 + #setVariable ("$valuesMap" $result)
51 51  #end
52 52  
53 53  #*
... ... @@ -96,22 +96,22 @@
96 96   #set($targetDoc = $xwiki.getDocument($!request.target))
97 97   #set($targetDocSyntax = $targetDoc.syntax)
98 98   #if (!($targetDocSyntax.type.id == 'xwiki' && $targetDocSyntax.version == '1.0'))
99 - <div class="box plainmessage">$msg.get("annotations.action.create.helpmessage", ["<strong>Ctrl + M (Meta + M)</strong>"])</div>
101 + <div class="box plainmessage">$services.localization.render('annotations.action.create.helpmessage', ['<strong>Ctrl + M (Meta + M)</strong>'])</div>
100 100   <input type="checkbox" name="annotationsdisplay" id="annotationsdisplay" />
101 - <label for="annotationsdisplay">$msg.get('annotations.settings.display')</label>
103 + <label for="annotationsdisplay">$services.localization.render('annotations.settings.display')</label>
102 102   <div class="annotation-filters collapsed" id="annotation-filters">
103 - <div class="annotation-filters-toggler"><a href="#annotation-filters">$msg.get('annotations.filters.show')</a></div>
105 + <div class="annotation-filters-toggler"><a href="#annotation-filters">$services.localization.render('annotations.filters.show')</a></div>
104 104   <div class="criteria">
105 - #set($annotationsList = $annotations.getAnnotations($!request.target))
107 + #set($annotationsList = $services.annotations.getAnnotations($!request.target))
106 106   #displayAnnotatorCheckboxes($annotationsList)
107 107   </div>
108 108   </div>
109 109   <div class="clearfloats" />
110 110   #else
111 - <div class="box infomessage">$msg.get("annotations.settings.error.wrongsyntax")</div>
113 + #info($services.localization.render('annotations.settings.error.wrongsyntax'))
112 112   #end
113 113   #else
114 - <div class="box infomessage">$msg.get("annotations.settings.error.notarget")</div>
116 + #info($services.localization.render('annotations.settings.error.notarget'))
115 115   #end
116 116  </div>
117 117  {{/html}}