|
606 | 606 | <caption label="&highlight.caption;"/>
|
607 | 607 | <tabbox>
|
608 | 608 | <tabs id="highlight" onselect="onHighlightTabSelect();">
|
609 |
| - <tab label="&highlight.tab1.label;" observes="b.highlightCurrent"/> |
610 |
| - <tab label="&highlight.tab2.label;" observes="b.highlightUnread"/> |
611 |
| - <tab label="&highlight.tab3.label;" observes="b.highlightRead"/> |
612 |
| - <tab label="&highlight.tab6.label;" observes="b.highlightUnloaded"/> |
613 |
| - <tab label="&highlight.tab7.label;" observes="b.highlightSelected"/> |
| 609 | + <tab label="&highlight.tab1.label;" value="Current" observes="b.highlightCurrent"/> |
| 610 | + <tab label="&highlight.tab2.label;" value="Unread" observes="b.highlightUnread"/> |
| 611 | + <tab label="&highlight.tab3.label;" value="Read" observes="b.highlightRead"/> |
| 612 | + <tab label="&highlight.tab6.label;" value="Unloaded" observes="b.highlightUnloaded"/> |
| 613 | + <tab label="&highlight.tab7.label;" value="Selected" observes="b.highlightSelected"/> |
614 | 614 | </tabs>
|
615 | 615 | <tabpanels>
|
616 | 616 | <tabpanel orient="vertical">
|
|
1195 | 1195 | }
|
1196 | 1196 |
|
1197 | 1197 | function onHighlightTabSelect() {
|
1198 |
| - var target = $("highlight"); |
1199 |
| - var tabs = ["Current", "Unread", "Read", "Unloaded", "Selected"]; |
| 1198 | + var prefName = $("highlight").selectedItem.value; |
1200 | 1199 |
|
1201 |
| - $("c.highlightEnabled").setAttribute("preference", "highlight" + tabs[target.selectedIndex]); |
1202 |
| - $("c.highlightEnabled").checked = $("highlight" + tabs[target.selectedIndex]).value; |
| 1200 | + $("c.highlightEnabled").setAttribute("preference", "highlight" + prefName); |
| 1201 | + $("c.highlightEnabled").checked = $("highlight" + prefName).value; |
1203 | 1202 |
|
1204 |
| - onHighlightEnabled(tabs[target.selectedIndex]); |
| 1203 | + onHighlightEnabled(prefName); |
1205 | 1204 | }
|
1206 | 1205 |
|
1207 | 1206 | function onHighlightEnabled(item) {
|
1208 |
| - var tabs = ["Current", "Unread", "Read", "Unloaded", "Selected"]; |
1209 |
| - if (item == tabs[$("highlight").selectedIndex]) { |
| 1207 | + if (item == $("highlight").selectedItem.value) { |
1210 | 1208 | setDisabled("b.highlightEnabled", !$("highlight" + item).value);
|
1211 | 1209 | }
|
1212 | 1210 |
|
|
1233 | 1231 | : ""
|
1234 | 1232 | );
|
1235 | 1233 |
|
1236 |
| - var tabs = ["Current", "Unread", "Read", "Unloaded", "Selected"]; |
1237 |
| - if (item == tabs[$("highlight").selectedIndex]) { |
| 1234 | + if (item == $("highlight").selectedItem.value) { |
1238 | 1235 | $("c.highlightBold").checked = style.bold;
|
1239 | 1236 | $("c.highlightItalic").checked = style.italic;
|
1240 | 1237 | $("c.highlightUnderline").checked = style.underline;
|
|
1274 | 1271 | opacityCode: $("c.highlightOpacityCode").value / 100
|
1275 | 1272 | };
|
1276 | 1273 |
|
1277 |
| - var tabs = ["Current", "Unread", "Read", "Unloaded", "Selected"]; |
1278 |
| - $("style" + tabs[$("highlight").selectedIndex]).value = JSON.stringify(style); |
| 1274 | + $("style" + $("highlight").selectedItem.value).value = JSON.stringify(style); |
1279 | 1275 | }
|
1280 | 1276 |
|
1281 | 1277 | function onHighlightColor() {
|
|
0 commit comments