| ... |
... |
@@ -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">($services.localization.render('annotations.filters.anyvalue'))</span> <span class="clear">($services.localization.render('annotations.filters.clearvalue'))</span></span> |
|
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> |
| 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">$services.localization.render('annotations.filters.nooption', [$label])</span> |
|
18 |
+ <span class="no-option">$msg.get('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="$escapetool.xml($option)" #if($optionValue.checked) checked="checked" #end/>$optionValue.prettyName</label> |
|
22 |
+ <label class="option #if($optionValue.checked) selected #end"><input type="checkbox" value="${option}" #if($optionValue.checked) checked="checked" #end/>$optionValue.prettyName</label> |
| 23 |
23 |
#end |
| 24 |
24 |
</div> |
| 25 |
25 |
</div> |
| ... |
... |
@@ -34,22 +34,20 @@ |
| 34 |
34 |
* @param $valuesMap the map to return the values in |
| 35 |
35 |
*# |
| 36 |
36 |
#macro(getValues $annotationsList $propertyName $valuesMap) |
| 37 |
|
- #set ($result = {}) |
|
37 |
+ #set($valuesMap = {}) |
| 38 |
38 |
#foreach($ann in $annotationsList) |
| 39 |
39 |
#set($value = "") |
| 40 |
40 |
#set($value = $ann.get($propertyName)) |
| 41 |
41 |
#if("$!{value}" != "") |
| 42 |
|
- #set($previousValue = $result.get($value)) |
|
42 |
+ #set($previousValue = $valuesMap.get($value)) |
| 43 |
43 |
#if ($previousValue) |
| 44 |
44 |
#set($newValue = $previousValue + 1) |
| 45 |
|
- #set($dispose = $result.put($value, $newValue)) |
|
45 |
+ #set($dispose = $valuesMap.put($value, $newValue)) |
| 46 |
46 |
#else |
| 47 |
|
- #set($dispose = $result.put($value, 1)) |
|
47 |
+ #set($dispose = $valuesMap.put($value, 1)) |
| 48 |
48 |
#end |
| 49 |
49 |
#end |
| 50 |
50 |
#end |
| 51 |
|
- #set ($valuesMap = $NULL) |
| 52 |
|
- #setVariable ("$valuesMap" $result) |
| 53 |
53 |
#end |
| 54 |
54 |
|
| 55 |
55 |
#* |
| ... |
... |
@@ -98,22 +98,22 @@ |
| 98 |
98 |
#set($targetDoc = $xwiki.getDocument($!request.target)) |
| 99 |
99 |
#set($targetDocSyntax = $targetDoc.syntax) |
| 100 |
100 |
#if (!($targetDocSyntax.type.id == 'xwiki' && $targetDocSyntax.version == '1.0')) |
| 101 |
|
- <div class="box plainmessage">$services.localization.render('annotations.action.create.helpmessage', ['<strong>Ctrl + M (Meta + M)</strong>'])</div> |
|
99 |
+ <div class="box plainmessage">$msg.get("annotations.action.create.helpmessage", ["<strong>Ctrl + M (Meta + M)</strong>"])</div> |
| 102 |
102 |
<input type="checkbox" name="annotationsdisplay" id="annotationsdisplay" /> |
| 103 |
|
- <label for="annotationsdisplay">$services.localization.render('annotations.settings.display')</label> |
|
101 |
+ <label for="annotationsdisplay">$msg.get('annotations.settings.display')</label> |
| 104 |
104 |
<div class="annotation-filters collapsed" id="annotation-filters"> |
| 105 |
|
- <div class="annotation-filters-toggler"><a href="#annotation-filters">$services.localization.render('annotations.filters.show')</a></div> |
|
103 |
+ <div class="annotation-filters-toggler"><a href="#annotation-filters">$msg.get('annotations.filters.show')</a></div> |
| 106 |
106 |
<div class="criteria"> |
| 107 |
|
- #set($annotationsList = $services.annotations.getAnnotations($!request.target)) |
|
105 |
+ #set($annotationsList = $annotations.getAnnotations($!request.target)) |
| 108 |
108 |
#displayAnnotatorCheckboxes($annotationsList) |
| 109 |
109 |
</div> |
| 110 |
110 |
</div> |
| 111 |
111 |
<div class="clearfloats" /> |
| 112 |
112 |
#else |
| 113 |
|
- #info($services.localization.render('annotations.settings.error.wrongsyntax')) |
|
111 |
+ <div class="box infomessage">$msg.get("annotations.settings.error.wrongsyntax")</div> |
| 114 |
114 |
#end |
| 115 |
115 |
#else |
| 116 |
|
- #info($services.localization.render('annotations.settings.error.notarget')) |
|
114 |
+ <div class="box infomessage">$msg.get("annotations.settings.error.notarget")</div> |
| 117 |
117 |
#end |
| 118 |
118 |
</div> |
| 119 |
119 |
{{/html}} |