mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
Fix element id:s for dynamically added elements
This commit is contained in:
parent
5eba5fc5ac
commit
8c969a9367
@ -9,7 +9,6 @@ Event.observe(window,'load',init);
|
|||||||
else if (platform.indexOf('unix') != -1 || platform.indexOf('linux') != -1 || platform.indexOf('sun') != -1)
|
else if (platform.indexOf('unix') != -1 || platform.indexOf('linux') != -1 || platform.indexOf('sun') != -1)
|
||||||
navigator.OS = 'nix';*/
|
navigator.OS = 'nix';*/
|
||||||
//Inform user if server restart needed
|
//Inform user if server restart needed
|
||||||
//disable all page elements when read only
|
|
||||||
//better errormessage for not writable config
|
//better errormessage for not writable config
|
||||||
//make tabs?
|
//make tabs?
|
||||||
//create the path/file browser
|
//create the path/file browser
|
||||||
@ -243,8 +242,13 @@ var Config = {
|
|||||||
}
|
}
|
||||||
var frag = document.createDocumentFragment();
|
var frag = document.createDocumentFragment();
|
||||||
span = span.cloneNode(true);
|
span = span.cloneNode(true);
|
||||||
span.getElementsByTagName('label')[0].setAttribute('for','hej');
|
var id = span.getElementsByTagName('input')[0].id;
|
||||||
span.getElementsByTagName('input')[0].id = 'hej';
|
var num = parseInt(id.match(/\d+$/));
|
||||||
|
num++;
|
||||||
|
var id = id.replace(/\d+$/,'') + num;
|
||||||
|
|
||||||
|
span.getElementsByTagName('label')[0].setAttribute('for',id);
|
||||||
|
span.getElementsByTagName('input')[0].id = id;
|
||||||
span.getElementsByTagName('input')[0].value = '';
|
span.getElementsByTagName('input')[0].value = '';
|
||||||
var hrefs = span.getElementsByTagName('a');
|
var hrefs = span.getElementsByTagName('a');
|
||||||
if ('Netscape' == navigator.appName) {
|
if ('Netscape' == navigator.appName) {
|
||||||
|
Loading…
Reference in New Issue
Block a user