Allow playlist as end preset in playlist.
Playlist chaining.
This commit is contained in:
parent
3f0eb0a046
commit
fb2e556726
@ -511,7 +511,7 @@ function populatePresets(fromls)
|
|||||||
let i = is[a];
|
let i = is[a];
|
||||||
if (expanded[i+100]) expand(i+100, true);
|
if (expanded[i+100]) expand(i+100, true);
|
||||||
}
|
}
|
||||||
makePlSel(arr);
|
//makePlSel(arr);
|
||||||
} else { presetError(true); }
|
} else { presetError(true); }
|
||||||
updatePA();
|
updatePA();
|
||||||
populateQL();
|
populateQL();
|
||||||
@ -1296,14 +1296,16 @@ var plJson = {"0":{
|
|||||||
"end": 0
|
"end": 0
|
||||||
}};
|
}};
|
||||||
|
|
||||||
var plSelContent = "";
|
//var plSelContent = "";
|
||||||
function makePlSel(arr) {
|
function makePlSel(incPl=false) {
|
||||||
plSelContent = "";
|
var plSelContent = "";
|
||||||
|
var arr = Object.entries(pJson);
|
||||||
for (var i = 0; i < arr.length; i++) {
|
for (var i = 0; i < arr.length; i++) {
|
||||||
var n = arr[i][1].n ? arr[i][1].n : "Preset " + arr[i][0];
|
var n = arr[i][1].n ? arr[i][1].n : "Preset " + arr[i][0];
|
||||||
if (arr[i][1].playlist && arr[i][1].playlist.ps) continue; //remove playlists, sub-playlists not yet supported
|
if (!incPl && arr[i][1].playlist && arr[i][1].playlist.ps) continue; //remove playlists, sub-playlists not yet supported
|
||||||
plSelContent += `<option value=${arr[i][0]}>${n}</option>`
|
plSelContent += `<option value=${arr[i][0]}>${n}</option>`
|
||||||
}
|
}
|
||||||
|
return plSelContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshPlE(p) {
|
function refreshPlE(p) {
|
||||||
@ -1391,7 +1393,7 @@ function makeP(i,pl) {
|
|||||||
End preset:<br>
|
End preset:<br>
|
||||||
<select class="btn sel sel-ple" id="pl${i}selEnd" onchange="plR(${i})" data-val=${plJson[i].end?plJson[i].end:0}>
|
<select class="btn sel sel-ple" id="pl${i}selEnd" onchange="plR(${i})" data-val=${plJson[i].end?plJson[i].end:0}>
|
||||||
<option value=0>None</option>
|
<option value=0>None</option>
|
||||||
${plSelContent}
|
${makePlSel(true)}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-i btn-p" onclick="testPl(${i}, this)"><i class='icons btn-icon'></i>Test</button>`;
|
<button class="btn btn-i btn-p" onclick="testPl(${i}, this)"><i class='icons btn-icon'></i>Test</button>`;
|
||||||
@ -1449,7 +1451,7 @@ function makePlEntry(p,i) {
|
|||||||
return `
|
return `
|
||||||
<div class="plentry">
|
<div class="plentry">
|
||||||
<select class="btn sel sel-pl" onchange="plePs(${p},${i},this)" data-val=${plJson[p].ps[i]} data-index=${i}>
|
<select class="btn sel sel-pl" onchange="plePs(${p},${i},this)" data-val=${plJson[p].ps[i]} data-index=${i}>
|
||||||
${plSelContent}
|
${makePlSel()}
|
||||||
</select>
|
</select>
|
||||||
<button class="btn btn-i btn-xs btn-pl-del" onclick="delPl(${p},${i})"><i class="icons btn-icon"></i></button>
|
<button class="btn btn-i btn-xs btn-pl-del" onclick="delPl(${p},${i})"><i class="icons btn-icon"></i></button>
|
||||||
<div class="h plnl">Duration</div><div class="h plnl">Transition</div><div class="h pli">#${i+1}</div><br>
|
<div class="h plnl">Duration</div><div class="h plnl">Transition</div><div class="h pli">#${i+1}</div><br>
|
||||||
|
1226
wled00/html_ui.h
1226
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user