use optgroup tag for grouped select boxes

master
Andrew Dolgov 16 years ago
parent a52dca6cc5
commit 2b60628a06

@ -1369,8 +1369,7 @@
print "<select id=\"feedActionChooser\" onchange=\"feedActionChange()\"> print "<select id=\"feedActionChooser\" onchange=\"feedActionChange()\">
<option value=\"facDefault\" selected>".__('Actions...')."</option> <option value=\"facDefault\" selected>".__('Actions...')."</option>
<option disabled>--------</option> <optgroup label=\"".__('Selection:')."\">
<option style=\"color : #5050aa\" disabled>".__('Selection:')."</option>
<option value=\"facEdit\">&nbsp;&nbsp;".__('Edit')."</option>"; <option value=\"facEdit\">&nbsp;&nbsp;".__('Edit')."</option>";
if (FORCE_ARTICLE_PURGE == 0) { if (FORCE_ARTICLE_PURGE == 0) {
@ -1383,12 +1382,15 @@
<option value=\"facRescore\">&nbsp;&nbsp;".__('Rescore articles')."</option> <option value=\"facRescore\">&nbsp;&nbsp;".__('Rescore articles')."</option>
<option value=\"facUnsubscribe\">&nbsp;&nbsp;".__('Unsubscribe')."</option>"; <option value=\"facUnsubscribe\">&nbsp;&nbsp;".__('Unsubscribe')."</option>";
print "</optgroup>";
if (get_pref($link, 'ENABLE_FEED_CATS')) { if (get_pref($link, 'ENABLE_FEED_CATS')) {
print "<option disabled>--------</option> print "<optgroup label=\"".__('Other:')."\">
<option style=\"color : #5050aa\" disabled>".__('Other:')."</option>
<option value=\"facEditCats\">&nbsp;&nbsp;".__('Edit categories')." <option value=\"facEditCats\">&nbsp;&nbsp;".__('Edit categories')."
</option>"; </option>
</optgroup>";
} }
print "</select>"; print "</select>";

@ -2160,3 +2160,11 @@ div#offlineModeDrop {
color : #909090; color : #909090;
} }
optgroup {
color : #5050aa;
font-style : normal;
}
option {
color : black;
}

@ -189,25 +189,25 @@ window.onload = init;
<option value="qmcDefault" selected="selected"><?php echo __('Actions...') ?></option> <option value="qmcDefault" selected="selected"><?php echo __('Actions...') ?></option>
<option value="qmcSearch"><?php echo __('Search...') ?></option> <option value="qmcSearch"><?php echo __('Search...') ?></option>
<!-- <option value="qmcPrefs"><?php echo __('Preferences') ?></option> --> <!-- <option value="qmcPrefs"><?php echo __('Preferences') ?></option> -->
<option disabled="disabled">--------</option> <optgroup label="<?php echo __('Feed actions:') ?>">
<option style="color : #5050aa" disabled="disabled"><?php echo __('Feed actions:') ?></option>
<option value="qmcAddFeed">&nbsp;&nbsp;<?php echo __('Subscribe to feed...') ?></option> <option value="qmcAddFeed">&nbsp;&nbsp;<?php echo __('Subscribe to feed...') ?></option>
<option value="qmcEditFeed">&nbsp;&nbsp;<?php echo __('Edit this feed...') ?></option> <option value="qmcEditFeed">&nbsp;&nbsp;<?php echo __('Edit this feed...') ?></option>
<!-- <option value="qmcClearFeed">&nbsp;&nbsp;<?php echo __('Clear articles') ?></option> --> <!-- <option value="qmcClearFeed">&nbsp;&nbsp;<?php echo __('Clear articles') ?></option> -->
<option value="qmcRescoreFeed">&nbsp;&nbsp;<?php echo __('Rescore feed') ?></option> <option value="qmcRescoreFeed">&nbsp;&nbsp;<?php echo __('Rescore feed') ?></option>
<option value="qmcRemoveFeed">&nbsp;&nbsp;<?php echo __('Unsubscribe') ?></option> <option value="qmcRemoveFeed">&nbsp;&nbsp;<?php echo __('Unsubscribe') ?></option>
<option disabled="disabled">--------</option> </optgroup>
<option style="color : #5050aa" disabled="disabled"><?php echo __('All feeds:') ?></option> <optgroup label="<?php echo __('All feeds:') ?>">
<option value="qmcCatchupAll">&nbsp;&nbsp;<?php echo __('Mark as read') ?></option> <option value="qmcCatchupAll">&nbsp;&nbsp;<?php echo __('Mark as read') ?></option>
<option value="qmcShowOnlyUnread">&nbsp;&nbsp;<?php echo __('(Un)hide read feeds') ?></option> <option value="qmcShowOnlyUnread">&nbsp;&nbsp;<?php echo __('(Un)hide read feeds') ?></option>
<option disabled="disabled">--------</option> </optgroup>
<option style="color : #5050aa" disabled="disabled"><?php echo __('Other actions:') ?></option> <optgroup label="<?php echo __('Other actions:') ?>">
<option value="qmcAddLabel">&nbsp;&nbsp;<?php echo __('Create label...') ?></option> <option value="qmcAddLabel">&nbsp;&nbsp;<?php echo __('Create label...') ?></option>
<option value="qmcAddFilter">&nbsp;&nbsp;<?php echo __('Create filter...') ?></option> <option value="qmcAddFilter">&nbsp;&nbsp;<?php echo __('Create filter...') ?></option>
<option value="qmcResetUI">&nbsp;&nbsp;<?php echo __('Reset UI layout') ?></option> <option value="qmcResetUI">&nbsp;&nbsp;<?php echo __('Reset UI layout') ?></option>
<option value="qmcResetCats">&nbsp;&nbsp;<?php echo __('Reset category order') ?></option> <option value="qmcResetCats">&nbsp;&nbsp;<?php echo __('Reset category order') ?></option>
<option value="qmcHKhelp"><?php echo __('&nbsp;&nbsp;Keyboard shortcuts') ?></option> <option value="qmcHKhelp"><?php echo __('&nbsp;&nbsp;Keyboard shortcuts') ?></option>
</optgroup>
</select> </select>
</div> </div>

Loading…
Cancel
Save