Handle option.disabled
This commit is contained in:
parent
c440c236ad
commit
ac20dcf81f
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -84,6 +84,10 @@ body > hr {
|
|||||||
.index #returnlink {
|
.index #returnlink {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
#index-menu .selectrice {
|
||||||
|
width: 110px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
#index-search {
|
#index-search {
|
||||||
padding-right: 1.5em;
|
padding-right: 1.5em;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
@ -120,7 +124,6 @@ body > hr {
|
|||||||
#index-last-refresh::after {
|
#index-last-refresh::after {
|
||||||
content: ']';
|
content: ']';
|
||||||
}
|
}
|
||||||
|
|
||||||
.catalog-mode .board {
|
.catalog-mode .board {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,6 +58,8 @@ Rice =
|
|||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|
||||||
|
return if @dataset.disabled
|
||||||
|
|
||||||
select = Rice.input
|
select = Rice.input
|
||||||
container = select.nextElementSibling
|
container = select.nextElementSibling
|
||||||
|
|
||||||
@ -87,6 +89,8 @@ Rice =
|
|||||||
for option in select.options
|
for option in select.options
|
||||||
li = $.el 'li', textContent: option.textContent
|
li = $.el 'li', textContent: option.textContent
|
||||||
li.dataset.value = option.value
|
li.dataset.value = option.value
|
||||||
|
if option.disabled
|
||||||
|
li.dataset.disabled = true
|
||||||
$.on li, 'click', Rice.cb.option
|
$.on li, 'click', Rice.cb.option
|
||||||
nodes.push li
|
nodes.push li
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user