How to make some form controls editable while other content
Posted: Mon Jun 23, 2014 10:33 pm
Hi,
I have the following XML (a short sample extracted from a more complex one):
and an associated CSS stylesheet:
(I used the oxy_xpath function to show the names, because I did not figure out if it is possible to get the @name values using the oxy_label function)
However I would like to have the number and the name of stations to be fixed and also the number and the names of the params to be fixed. I want only the param's "value" attributes to be editable in the Author mode.
Then I tried adding the following to the CSS:
The -oxy-editable:false applied to the "station" as expected but the -oxy-editable:true did not apply to the "param" (so the "param" was not editable at all). Anyway I guess if the -oxy-editable:true worked for the "param", it would make all the "param" element editable (not only the @value) so I think it still would not be exactly what I wanted to achieve.
Could you please give some advice? Thank you.
I have the following XML (a short sample extracted from a more complex one):
Code: Select all
<weather>
<section name="All">
<station name="KhasabPort">
<param name="T_MIN" value="34"/>
<param name="T_MAX" value="40"/>
</station>
<station name="Matrah">
<param name="T_MIN" value="30"/>
<param name="T_MAX" value="35"> </param>
</station>
</section>
</weather>
Code: Select all
* {
display: block;
margin-left: 5px;
}
station:before {
content:
oxy_xpath("@name")
}
param:before {
content:
oxy_xpath("@name")
": "
oxy_editor( type, text,
edit, "@value");
}
However I would like to have the number and the name of stations to be fixed and also the number and the names of the params to be fixed. I want only the param's "value" attributes to be editable in the Author mode.
Then I tried adding the following to the CSS:
Code: Select all
station {
-oxy-editable:false;
}
param {
-oxy-editable:true;
}
Could you please give some advice? Thank you.