mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-09 04:38:10 -05:00
Prevent "Remove" from removing the last html input for options
with multiple values.
This commit is contained in:
parent
0285f0bdc0
commit
5d29ec0dbd
@ -271,14 +271,11 @@ var Config = {
|
|||||||
Effect.BlindDown(newSpan,{duration: 0.2});
|
Effect.BlindDown(newSpan,{duration: 0.2});
|
||||||
},
|
},
|
||||||
_removeItemEvent: function (e) {
|
_removeItemEvent: function (e) {
|
||||||
var div = Event.element(e);
|
var div = Event.element(e).parentNode;
|
||||||
while (div.nodeName.toLowerCase() != 'div') {
|
|
||||||
div = div.parentNode;
|
|
||||||
}
|
|
||||||
Config._removeItem(div);
|
Config._removeItem(div);
|
||||||
},
|
},
|
||||||
_removeItem: function(div,noAnimation) {
|
_removeItem: function(div,noAnimation) {
|
||||||
if (div.parentNode.childNodes.length > 1) {
|
if (div.parentNode.getElementsByTagName('input').length > 1) {
|
||||||
if (noAnimation) {
|
if (noAnimation) {
|
||||||
// cancelForm uses a loop to delete elements, the loop can't wait
|
// cancelForm uses a loop to delete elements, the loop can't wait
|
||||||
// for Effect.BlindUp to finish
|
// for Effect.BlindUp to finish
|
||||||
|
Loading…
x
Reference in New Issue
Block a user