mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-24 13:13:17 -05:00
Fixed a bug where button Cancel could look infinately (or a lot)
This commit is contained in:
parent
6ea05929ee
commit
0f27d923a5
@ -96,7 +96,6 @@ var ConfigInitialValues = {
|
||||
};
|
||||
var Config = {
|
||||
configPath: '',
|
||||
configOptionValues: '',
|
||||
init: function () {
|
||||
new Ajax.Request('/config.xml',{method: 'get',onComplete: Config.storeConfigLayout});
|
||||
},
|
||||
@ -114,7 +113,6 @@ var Config = {
|
||||
},
|
||||
showConfig: function (request) {
|
||||
ConfigInitialValues.parseXML(request.responseXML);
|
||||
Config.configOptionValues = request.responseXML;
|
||||
var sections = ConfigXML.getSections();
|
||||
sections.each(function (section) {
|
||||
var head = document.createElement('div');
|
||||
@ -264,9 +262,15 @@ var Config = {
|
||||
}
|
||||
Config._removeItem(div);
|
||||
},
|
||||
_removeItem: function(div) {
|
||||
_removeItem: function(div,noAnimation) {
|
||||
if (div.parentNode.childNodes.length > 1) {
|
||||
if (noAnimation) {
|
||||
// cancelForm uses a loop to delete elements, the loop can't wait
|
||||
// for Effect.BlindUp to finish
|
||||
Element.remove(div);
|
||||
} else {
|
||||
Effect.BlindUp(div,{duration: 0.2, afterFinish: function (){Element.remove(div);}});
|
||||
}
|
||||
} else {
|
||||
div.getElementsByTagName('input')[0].value='';
|
||||
}
|
||||
@ -372,10 +376,10 @@ var i=0;
|
||||
while (initialValuesCount < currentElements.length) {
|
||||
i++;
|
||||
if (i > 10) {
|
||||
alert('Getting dizy; too many turns in this loop (silly errormessage 1');
|
||||
alert('Getting dizzy; too many turns in this loop (silly errormessage 1)');
|
||||
return;
|
||||
}
|
||||
Config._removeItem(currentElements[0].parentNode);
|
||||
Config._removeItem(currentElements[0].parentNode,'noAnimation');
|
||||
}
|
||||
while (initialValuesCount > currentElements.length) {
|
||||
i++;
|
||||
|
@ -81,7 +81,7 @@
|
||||
</item>
|
||||
</section>
|
||||
|
||||
<section name="Music_Files">
|
||||
<section name="Music Files">
|
||||
<item id="mp3_dir" config_section="general" required="true">
|
||||
<name>MP3 Directory</name>
|
||||
<short_description></short_description>
|
||||
|
Loading…
x
Reference in New Issue
Block a user