summaryrefslogtreecommitdiff
path: root/server/xml/macros/egen_brille-1.0.xml
diff options
context:
space:
mode:
Diffstat (limited to 'server/xml/macros/egen_brille-1.0.xml')
-rw-r--r--server/xml/macros/egen_brille-1.0.xml44
1 files changed, 28 insertions, 16 deletions
diff --git a/server/xml/macros/egen_brille-1.0.xml b/server/xml/macros/egen_brille-1.0.xml
index a917dff..7db6bce 100644
--- a/server/xml/macros/egen_brille-1.0.xml
+++ b/server/xml/macros/egen_brille-1.0.xml
@@ -4,20 +4,32 @@
out = ''
if ( getValue('lensmeter.right.missing') == '' )
then
- out = out .. 'Egen brille højre øje: ' .. getValue('lensmeter.right.sf')
- .. ' sf, ' .. getValue('lensmeter.right.cyl') .. ' cyl '
- .. getValue('lensmeter.right.grader') .. ' grader.'
- if ( getValue('lensmeter.left.missing') == '' )
- then
- out = out .. '\n'
- end
+ out = out .. 'Egen brille, o.dxt: ' .. getValue('lensmeter.right.sf') .. ' sf'
+ if ( getValue('lensmeter.right.cyl') ~= '' )
+ then
+ out = out .. ', ' .. getValue('lensmeter.right.cyl') .. ' cyl'
+ end
+ if ( getValue('lensmeter.right.grader') ~= '' )
+ then
+ out = out .. ', ' .. getValue('lensmeter.right.grader') .. ' grader\n'
+ else
+ out = out .. '\n'
+ end
end
if ( getValue('lensmeter.left.missing') == '' )
then
- out = out .. 'Egen brille venstre øje: ' .. getValue('lensmeter.left.sf')
- .. ' sf, ' .. getValue('lensmeter.left.cyl') .. ' cyl '
- .. getValue('lensmeter.left.grader') .. ' grader.'
+ out = out .. 'Egen brille, o.sin: ' .. getValue('lensmeter.left.sf') .. ' sf'
+ if ( getValue('lensmeter.left.cyl') ~= '' )
+ then
+ out = out .. ', ' .. getValue('lensmeter.left.cyl') .. ' cyl'
+ end
+ if ( getValue('lensmeter.left.grader') ~= '' )
+ then
+ out = out .. ', ' .. getValue('lensmeter.left.grader') .. ' grader\n'
+ else
+ out = out .. '\n'
+ end
end
return out
@@ -151,7 +163,7 @@
<script language="lua" name="lt10gt-15">
if(value == '')
then
- return false
+ return true
end
value = string.gsub(value, ',', '.')
@@ -165,7 +177,7 @@
<script language="lua" name="lt359gt0">
if(value == '')
then
- return false
+ return true
end
value = string.gsub(value, ',', '.')
@@ -216,12 +228,12 @@
<frame layout="vbox">
<label caption="Cyl:"/>
<lineedit name="lensmeter.right.cyl" map="lensmeter.right.cyl"
- regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ regexp="|[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
</frame>
<frame layout="vbox">
<label caption="Grader:"/>
<lineedit name="lensmeter.right.grader" map="lensmeter.right.grader"
- regexp="[\d]+" script="lt359gt0" value=""/>
+ regexp="|[\d]+" script="lt359gt0" value=""/>
</frame>
</frame>
</frame>
@@ -242,12 +254,12 @@
<frame layout="vbox">
<label caption="Cyl:"/>
<lineedit name="lensmeter.left.cyl" map="lensmeter.left.cyl"
- regexp="[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
+ regexp="|[+-]{0,1}\d{1,2},\d{2}" script="lt10gt-15" value=""/>
</frame>
<frame layout="vbox">
<label caption="Grader:"/>
<lineedit name="lensmeter.left.grader" map="lensmeter.left.grader"
- regexp="[\d]+" script="lt359gt0" value=""/>
+ regexp="|[\d]+" script="lt359gt0" value=""/>
</frame>
</frame>
</frame>