Handle option.disabled

This commit is contained in:
Zixaphir 2014-03-06 20:43:33 -07:00
parent c440c236ad
commit ac20dcf81f
4 changed files with 22 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -84,6 +84,10 @@ body > hr {
.index #returnlink {
display: none;
}
#index-menu .selectrice {
width: 110px;
display: inline-block;
}
#index-search {
padding-right: 1.5em;
width: 100px;
@ -120,7 +124,6 @@ body > hr {
#index-last-refresh::after {
content: ']';
}
.catalog-mode .board {
text-align: center;
}

View File

@ -57,6 +57,8 @@ Rice =
option: (e) ->
e.stopPropagation()
e.preventDefault()
return if @dataset.disabled
select = Rice.input
container = select.nextElementSibling
@ -87,6 +89,8 @@ Rice =
for option in select.options
li = $.el 'li', textContent: option.textContent
li.dataset.value = option.value
if option.disabled
li.dataset.disabled = true
$.on li, 'click', Rice.cb.option
nodes.push li