LSP: fixed display issue with autopushes with a scheduletime but no complete time and vice versa

This commit is contained in:
Cat 2017-11-08 16:48:13 +01:00 committed by Thulinma
parent ba11c868c9
commit a3db600bcb
2 changed files with 24 additions and 18 deletions

View file

@ -154,20 +154,20 @@ $(this).getval();$(".embed_code").setval(v(p))}},{label:"Preselect tracks",type:
c.append($("<option>").text(f?f+" ("+e.type+")":UI.format.capital(e.type)).val(e.type))}ea.html(UI.buildUI(b));L.html("");b={};for(d in a.meta.tracks){c=a.meta.tracks[d];c.type!="audio"&&c.type!="video"||(c.type in b?b[c.type].push([c.trackid,UI.format.capital(c.type)+" track "+(b[c.type].length+1)]):b[c.type]=[["",UI.format.capital(c.type)+" track 1"]])}if(Object.keys(b).length){L.closest("label").show();for(d in b){a=$("<select>").attr("data-type",d).css("flex-grow","1").change(function(){$(this).val()== c.append($("<option>").text(f?f+" ("+e.type+")":UI.format.capital(e.type)).val(e.type))}ea.html(UI.buildUI(b));L.html("");b={};for(d in a.meta.tracks){c=a.meta.tracks[d];c.type!="audio"&&c.type!="video"||(c.type in b?b[c.type].push([c.trackid,UI.format.capital(c.type)+" track "+(b[c.type].length+1)]):b[c.type]=[["",UI.format.capital(c.type)+" track 1"]])}if(Object.keys(b).length){L.closest("label").show();for(d in b){a=$("<select>").attr("data-type",d).css("flex-grow","1").change(function(){$(this).val()==
""?delete p.setTracks[$(this).attr("data-type")]:p.setTracks[$(this).attr("data-type")]=$(this).val();$(".embed_code").setval(v(p))});L.append(a);b[d].push([-1,"No "+d]);for(var g in b[d])a.append($("<option>").val(b[d][g][0]).text(b[d][g][1]));if(d in p.setTracks){a.val(p.setTracks[d]);if(a.val()==null){a.val("");delete p.setTracks[d];$(".embed_code").setval(v(p))}}}}else L.closest("label").hide()},error:function(){ea.html("Error while retrieving stream info.");L.closest("label").hide();p.setTracks= ""?delete p.setTracks[$(this).attr("data-type")]:p.setTracks[$(this).attr("data-type")]=$(this).val();$(".embed_code").setval(v(p))});L.append(a);b[d].push([-1,"No "+d]);for(var g in b[d])a.append($("<option>").val(b[d][g][0]).text(b[d][g][1]));if(d in p.setTracks){a.val(p.setTracks[d]);if(a.val()==null){a.val("");delete p.setTracks[d];$(".embed_code").setval(v(p))}}}}else L.closest("label").hide()},error:function(){ea.html("Error while retrieving stream info.");L.closest("label").hide();p.setTracks=
{}}});h=document.createElement("script");h.src=N+"player.js";document.head.appendChild(h);h.onload=function(){var a=U.find(".forcePlayer"),b;for(b in mistplayers)a.append($("<option>").text(mistplayers[b].name).val(b));document.head.removeChild(this)};h.onerror=function(){document.head.removeChild(this)};break;case "Push":var B=$("<div>").text("Loading..");d.append(B);mist.send(function(a){function b(a){setTimeout(function(){mist.send(function(c){var d=false;if("push_list"in c&&c.push_list&&c.push_list.length){var d= {}}});h=document.createElement("script");h.src=N+"player.js";document.head.appendChild(h);h.onload=function(){var a=U.find(".forcePlayer"),b;for(b in mistplayers)a.append($("<option>").text(mistplayers[b].name).val(b));document.head.removeChild(this)};h.onerror=function(){document.head.removeChild(this)};break;case "Push":var B=$("<div>").text("Loading..");d.append(B);mist.send(function(a){function b(a){setTimeout(function(){mist.send(function(c){var d=false;if("push_list"in c&&c.push_list&&c.push_list.length){var d=
true,f;for(f in c.push_list)if(a.indexOf(c.push_list[f][0])>-1){d=false;break}}else d=true;if(d)for(f in a)e.find("tr[data-pushid="+a[f]+"]").remove();else b()},{push_list:1})},1E3)}function c(f,g){var h=$("<span>");g=="Automatic"&&f.length>=4?h.append($("<span>").text(f[2])).append($("<span>").text(", schedule on "+(new Date(f[3]*1E3)).toLocaleString())).append($("<span>").text(", complete on "+(new Date(f[4]*1E3)).toLocaleString())):f.length>=4&&f[2]!=f[3]?h.append($("<span>").text(f[2])).append($("<span>").html("&#187").addClass("unit").css("margin", true,f;for(f in c.push_list)if(a.indexOf(c.push_list[f][0])>-1){d=false;break}}else d=true;if(d)for(f in a)e.find("tr[data-pushid="+a[f]+"]").remove();else b()},{push_list:1})},1E3)}function c(f,g){var h=$("<span>");if(g=="Automatic"&&f.length>=4){h.append($("<span>").text(f[2]));f[3]&&h.append($("<span>").text(", schedule on "+(new Date(f[3]*1E3)).toLocaleString()));f.length>=5&&f[4]&&h.append($("<span>").text(", complete on "+(new Date(f[4]*1E3)).toLocaleString()))}else f.length>=4&&f[2]!=f[3]?
"0 0.5em")).append($("<span>").text(f[3])):h.append($("<span>").text(f[2]));var i=$("<td>").append($("<button>").text(g=="Automatic"?"Remove":"Stop").click(function(){if(confirm("Are you sure you want to "+$(this).text().toLowerCase()+" this push?\n"+f[1]+" to "+f[2])){var a=$(this).closest("tr");a.html($("<td colspan=99>").html($("<span>").addClass("red").text(g=="Automatic"?"Removing..":"Stopping..")));if(g=="Automatic"){var c=f.slice(1);mist.send(function(){a.remove()},{push_auto_remove:[c]})}else mist.send(function(){b([f[0]])}, h.append($("<span>").text(f[2])).append($("<span>").html("&#187").addClass("unit").css("margin","0 0.5em")).append($("<span>").text(f[3])):h.append($("<span>").text(f[2]));var i=$("<td>").append($("<button>").text(g=="Automatic"?"Remove":"Stop").click(function(){if(confirm("Are you sure you want to "+$(this).text().toLowerCase()+" this push?\n"+f[1]+" to "+f[2])){var a=$(this).closest("tr");a.html($("<td colspan=99>").html($("<span>").addClass("red").text(g=="Automatic"?"Removing..":"Stopping..")));
{push_stop:[f[0]]})}}));if(g=="Automatic"){i.prepend($("<button>").text("Edit").click(function(){UI.navto("Start Push","auto_"+($(this).closest("tr").index()-1))}));i.append($("<button>").text("Stop pushes").click(function(){if(confirm('Are you sure you want to stop all pushes matching \n"'+f[1]+" to "+f[2]+'"?'+(d.wait!=0?"\n\nRetrying is enabled. You'll probably want to set that to 0.":""))){var c=$(this);c.text("Stopping pushes..");var g=[],h;for(h in a.push_list)if(f[1]==a.push_list[h][1]&&f[2]== if(g=="Automatic"){var c=f.slice(1);mist.send(function(){a.remove()},{push_auto_remove:[c]})}else mist.send(function(){b([f[0]])},{push_stop:[f[0]]})}}));if(g=="Automatic"){i.prepend($("<button>").text("Edit").click(function(){UI.navto("Start Push","auto_"+($(this).closest("tr").index()-1))}));i.append($("<button>").text("Stop pushes").click(function(){if(confirm('Are you sure you want to stop all pushes matching \n"'+f[1]+" to "+f[2]+'"?'+(d.wait!=0?"\n\nRetrying is enabled. You'll probably want to set that to 0.":
a.push_list[h][2]){g.push(a.push_list[h][0]);e.find("tr[data-pushid="+a.push_list[h][0]+"]").html($("<td colspan=99>").html($("<span>").addClass("red").text("Stopping..")))}mist.send(function(){c.text("Stop pushes");b(g)},{push_stop:g,push_settings:{wait:0}})}}))}return $("<tr>").attr("data-pushid",f[0]).append($("<td>").text(f[1])).append($("<td>").append(h.children())).append(i)}B.html("");var d=a.push_settings;d||(d={});B.append(UI.buildUI([{type:"help",help:"You can push streams to files or other servers, allowing them to broadcast your stream as well."}, ""))){var c=$(this);c.text("Stopping pushes..");var g=[],h;for(h in a.push_list)if(f[1]==a.push_list[h][1]&&f[2]==a.push_list[h][2]){g.push(a.push_list[h][0]);e.find("tr[data-pushid="+a.push_list[h][0]+"]").html($("<td colspan=99>").html($("<span>").addClass("red").text("Stopping..")))}mist.send(function(){c.text("Stop pushes");b(g)},{push_stop:g,push_settings:{wait:0}})}}))}return $("<tr>").attr("data-pushid",f[0]).append($("<td>").text(f[1])).append($("<td>").append(h.children())).append(i)}B.html("");
$("<h3>").text("Settings"),{label:"Delay before retry",unit:"s",type:"int",min:0,help:"How long the delay should be before MistServer retries an automatic push.<br>If set to 0, it does not retry.","default":0,pointer:{main:d,index:"wait"},LTSonly:1},{label:"Maximum retries",unit:"/s",type:"int",min:0,help:"The maximum amount of retries per second (for all automatic pushes).<br>If set to 0, there is no limit.","default":0,pointer:{main:d,index:"maxspeed"},LTSonly:1},{type:"buttons",buttons:[{type:"save", var d=a.push_settings;d||(d={});B.append(UI.buildUI([{type:"help",help:"You can push streams to files or other servers, allowing them to broadcast your stream as well."},$("<h3>").text("Settings"),{label:"Delay before retry",unit:"s",type:"int",min:0,help:"How long the delay should be before MistServer retries an automatic push.<br>If set to 0, it does not retry.","default":0,pointer:{main:d,index:"wait"},LTSonly:1},{label:"Maximum retries",unit:"/s",type:"int",min:0,help:"The maximum amount of retries per second (for all automatic pushes).<br>If set to 0, there is no limit.",
label:"Save","function":function(){mist.send(function(){UI.navto("Push")},{push_settings:d})}}]}]));var e=$("<table>").append($("<tr>").append($("<th>").text("Stream")).append($("<th>").text("Target")).append($("<th>"))),f=e.clone();if("push_list"in a)for(var g in a.push_list)e.append(c(a.push_list[g],"Manual"));if("push_auto_list"in a)for(g in a.push_auto_list){var h=a.push_auto_list[g].slice();h.unshift(-1);f.append(c(h,"Automatic"))}B.append($("<h3>").text("Automatic pushes")).append($("<button>").text("Add an automatic push").click(function(){UI.navto("Start Push", "default":0,pointer:{main:d,index:"maxspeed"},LTSonly:1},{type:"buttons",buttons:[{type:"save",label:"Save","function":function(){mist.send(function(){UI.navto("Push")},{push_settings:d})}}]}]));var e=$("<table>").append($("<tr>").append($("<th>").text("Stream")).append($("<th>").text("Target")).append($("<th>"))),f=e.clone();if("push_list"in a)for(var g in a.push_list)e.append(c(a.push_list[g],"Manual"));if("push_auto_list"in a)for(g in a.push_auto_list){var h=a.push_auto_list[g].slice();h.unshift(-1);
"auto")}));f.find("tr").length==1?B.append($("<div>").text("No automatic pushes have been configured.").addClass("text").css("margin-top","0.5em")):B.append(f);B.append($("<h3>").text("Pushes")).append($("<button>").text("Start a push").click(function(){UI.navto("Start Push")}));if(e.find("tr").length==1)B.append($("<div>").text("No pushes are active.").addClass("text").css("margin-top","0.5em"));else{var f=[],h=[],i=$("<select>").css("margin-left","0.5em").append($("<option>").text("Any stream").val("")), f.append(c(h,"Automatic"))}B.append($("<h3>").text("Automatic pushes")).append($("<button>").text("Add an automatic push").click(function(){UI.navto("Start Push","auto")}));f.find("tr").length==1?B.append($("<div>").text("No automatic pushes have been configured.").addClass("text").css("margin-top","0.5em")):B.append(f);B.append($("<h3>").text("Pushes")).append($("<button>").text("Start a push").click(function(){UI.navto("Start Push")}));if(e.find("tr").length==1)B.append($("<div>").text("No pushes are active.").addClass("text").css("margin-top",
j=$("<select>").css("margin-left","0.5em").append($("<option>").text("Any target").val(""));for(g in a.push_list){f.indexOf(a.push_list[g][1])==-1&&f.push(a.push_list[g][1]);h.indexOf(a.push_list[g][2])==-1&&h.push(a.push_list[g][2])}f.sort();h.sort();for(g in f)i.append($("<option>").text(f[g]));for(g in h)j.append($("<option>").text(h[g]));B.append($("<button>").text("Stop all pushes").click(function(){var c=[],d;for(d in a.push_list)c.push(a.push_list[d][0]);if(c.length!=0&&confirm("Are you sure you want to stop all pushes?")){mist.send(function(){b(c)}, "0.5em"));else{var f=[],h=[],i=$("<select>").css("margin-left","0.5em").append($("<option>").text("Any stream").val("")),j=$("<select>").css("margin-left","0.5em").append($("<option>").text("Any target").val(""));for(g in a.push_list){f.indexOf(a.push_list[g][1])==-1&&f.push(a.push_list[g][1]);h.indexOf(a.push_list[g][2])==-1&&h.push(a.push_list[g][2])}f.sort();h.sort();for(g in f)i.append($("<option>").text(f[g]));for(g in h)j.append($("<option>").text(h[g]));B.append($("<button>").text("Stop all pushes").click(function(){var c=
{push_stop:c});e.find("tr:not(:first-child)").html($("<td colspan=99>").append($("<span>").addClass("red").text("Stopping..")));$(this).remove()}})).append($("<label>").css("margin-left","1em").append($("<span>").text("Stop all pushes that match: ").css("font-size","0.9em")).append(i).append($("<span>").css("margin-left","0.5em").text("and").css("font-size","0.9em")).append(j).append($("<button>").css("margin-left","0.5em").text("Apply").click(function(){var c=i.val(),d=j.val();if(c==""&&d=="")return alert("Looks like you want to stop all pushes. Maybe you should use that button?"); [],d;for(d in a.push_list)c.push(a.push_list[d][0]);if(c.length!=0&&confirm("Are you sure you want to stop all pushes?")){mist.send(function(){b(c)},{push_stop:c});e.find("tr:not(:first-child)").html($("<td colspan=99>").append($("<span>").addClass("red").text("Stopping..")));$(this).remove()}})).append($("<label>").css("margin-left","1em").append($("<span>").text("Stop all pushes that match: ").css("font-size","0.9em")).append(i).append($("<span>").css("margin-left","0.5em").text("and").css("font-size",
var f={},g;for(g in a.push_list)if((c==""||a.push_list[g][1]==c)&&(d==""||a.push_list[g][2]==d))f[a.push_list[g][0]]=a.push_list[g];if(Object.keys(f).length==0)return alert("No matching pushes.");c="Are you sure you want to stop these pushes?\n\n";for(g in f)c=c+(f[g][1]+" to "+f[g][2]+"\n");if(confirm(c)){f=Object.keys(f);mist.send(function(){b(f)},{push_stop:f});for(g in f)e.find("tr[data-pushid="+f[g]+"]").html($("<td colspan=99>").html($("<span>").addClass("red").text("Stopping..")))}}))).append(e)}}, "0.9em")).append(j).append($("<button>").css("margin-left","0.5em").text("Apply").click(function(){var c=i.val(),d=j.val();if(c==""&&d=="")return alert("Looks like you want to stop all pushes. Maybe you should use that button?");var f={},g;for(g in a.push_list)if((c==""||a.push_list[g][1]==c)&&(d==""||a.push_list[g][2]==d))f[a.push_list[g][0]]=a.push_list[g];if(Object.keys(f).length==0)return alert("No matching pushes.");c="Are you sure you want to stop these pushes?\n\n";for(g in f)c=c+(f[g][1]+
{push_settings:1,push_list:1,push_auto_list:1});break;case "Start Push":if(!("capabilities"in mist.data)){d.append("Loading Mist capabilities..");mist.send(function(){UI.navto("Start Push",c)},{capabilities:1});return}var t,V=function(a){var b=false,f=c.split("_");c=f[0];f.length==2&&(b=f[1]);if(b!==false&&typeof a=="undefined")mist.send(function(a){V(a.push_auto_list[b])},{push_auto_list:1});else{var e=[],g;for(g in mist.data.capabilities.connectors){f=mist.data.capabilities.connectors[g];"push_urls"in " to "+f[g][2]+"\n");if(confirm(c)){f=Object.keys(f);mist.send(function(){b(f)},{push_stop:f});for(g in f)e.find("tr[data-pushid="+f[g]+"]").html($("<td colspan=99>").html($("<span>").addClass("red").text("Stopping..")))}}))).append(e)}},{push_settings:1,push_list:1,push_auto_list:1});break;case "Start Push":if(!("capabilities"in mist.data)){d.append("Loading Mist capabilities..");mist.send(function(){UI.navto("Start Push",c)},{capabilities:1});return}var t,V=function(a){var b=false,f=c.split("_");
f&&(e=e.concat(f.push_urls))}c=="auto"&&d.find("h2").text("Add automatic push");var h={};if(c=="auto"&&typeof a!="undefined"){h={stream:a[0],target:a[1]};if(a.length>=3)h.scheduletime=a[2];if(a.length>=4)h.completetime=a[3];if(h.target.indexOf("recstartunix=")>-1){g=h.target.split("recstartunix=")[1];h.recstartunix=g.split("&")[0];h.target=h.target.replace("recstartunix="+h.recstartunix,"").replace("?&","?").replace("&&","&");if(h.target[h.target.length-1]=="?")h.target=h.target.slice(0,-1)}}g=[{label:"Stream name", c=f[0];f.length==2&&(b=f[1]);if(b!==false&&typeof a=="undefined")mist.send(function(a){V(a.push_auto_list[b])},{push_auto_list:1});else{var e=[],g;for(g in mist.data.capabilities.connectors){f=mist.data.capabilities.connectors[g];"push_urls"in f&&(e=e.concat(f.push_urls))}c=="auto"&&d.find("h2").text("Add automatic push");var h={};if(c=="auto"&&typeof a!="undefined"){h={stream:a[0],target:a[1]};if(a.length>=3)h.scheduletime=a[2];if(a.length>=4)h.completetime=a[3];if(h.target.indexOf("recstartunix=")>
type:"str",help:"This may either be a full stream name, a partial wildcard stream name, or a full wildcard stream name.<br>For example, given the stream <i>a</i> you can use:<ul><li><i>a</i>: the stream configured as <i>a</i></li><li><i>a+</i>: all streams configured as <i>a</i> with a wildcard behind it, but not <i>a</i> itself</li><li><i>a+b</i>: only the version of stream <i>a</i> that has wildcard <i>b</i></li></ul>",pointer:{main:h,index:"stream"},validate:["required",function(a){a=a.split("+"); -1){g=h.target.split("recstartunix=")[1];h.recstartunix=g.split("&")[0];h.target=h.target.replace("recstartunix="+h.recstartunix,"").replace("?&","?").replace("&&","&");if(h.target[h.target.length-1]=="?")h.target=h.target.slice(0,-1)}}g=[{label:"Stream name",type:"str",help:"This may either be a full stream name, a partial wildcard stream name, or a full wildcard stream name.<br>For example, given the stream <i>a</i> you can use:<ul><li><i>a</i>: the stream configured as <i>a</i></li><li><i>a+</i>: all streams configured as <i>a</i> with a wildcard behind it, but not <i>a</i> itself</li><li><i>a+b</i>: only the version of stream <i>a</i> that has wildcard <i>b</i></li></ul>",
a=a[0];return a in mist.data.streams?false:{msg:"'"+a+"' is not a stream name.",classes:["orange"],"break":false}}],datalist:t,LTSonly:1},{label:"Target",type:"str",help:"Where the stream will be pushed to.<br>Valid formats:<ul><li>"+e.join("</li><li>")+"</li></ul> Valid text replacements:<ul><li>$stream - inserts the stream name used to push to MistServer</li><li>$day - inserts the current day number</li><li>$month - inserts the current month number</li><li>$year - inserts the current year number</li><li>$hour - inserts the hour timestamp when stream was received</li><li>$minute - inserts the minute timestamp the stream was received</li><li>$seconds - inserts the seconds timestamp when the stream was received</li><li>$datetime - inserts $year.$month.$day.$hour.$minute.$seconds timestamp when the stream was received</li>", pointer:{main:h,index:"stream"},validate:["required",function(a){a=a.split("+");a=a[0];return a in mist.data.streams?false:{msg:"'"+a+"' is not a stream name.",classes:["orange"],"break":false}}],datalist:t,LTSonly:1},{label:"Target",type:"str",help:"Where the stream will be pushed to.<br>Valid formats:<ul><li>"+e.join("</li><li>")+"</li></ul> Valid text replacements:<ul><li>$stream - inserts the stream name used to push to MistServer</li><li>$day - inserts the current day number</li><li>$month - inserts the current month number</li><li>$year - inserts the current year number</li><li>$hour - inserts the hour timestamp when stream was received</li><li>$minute - inserts the minute timestamp the stream was received</li><li>$seconds - inserts the seconds timestamp when the stream was received</li><li>$datetime - inserts $year.$month.$day.$hour.$minute.$seconds timestamp when the stream was received</li>",
pointer:{main:h,index:"target"},validate:["required",function(a){for(var b in e)if(mist.inputMatch(e[b],a))return false;return{msg:"Does not match a valid target.<br>Valid formats:<ul><li>"+e.join("</li><li>")+"</li></ul>",classes:["red"]}}],LTSonly:1}];c=="auto"&&g.push($("<h4>").text("Optional parameters"),{type:"unix",label:"Schedule time",min:0,help:"The time where the push will become active. The default is to start immediately.",pointer:{main:h,index:"scheduletime"}},{type:"unix",label:"Recording start time", pointer:{main:h,index:"target"},validate:["required",function(a){for(var b in e)if(mist.inputMatch(e[b],a))return false;return{msg:"Does not match a valid target.<br>Valid formats:<ul><li>"+e.join("</li><li>")+"</li></ul>",classes:["red"]}}],LTSonly:1}];c=="auto"&&g.push($("<h4>").text("Optional parameters"),{type:"unix",label:"Schedule time",min:0,help:"The time where the push will become active. The default is to start immediately.",pointer:{main:h,index:"scheduletime"}},{type:"unix",label:"Recording start time",
min:0,help:"Where in the media buffer the recording will start. Defaults to the most recently received keyframe.<br>Only makes sense for live streams.",pointer:{main:h,index:"recstartunix"}},{type:"unix",label:"Complete time",min:0,help:"The time where the push will stop. Defaults to never stop automatically.<br>Only makes sense for live streams.",pointer:{main:h,index:"completetime"}});g.push({type:"buttons",buttons:[{type:"cancel",label:"Cancel","function":function(){UI.navto("Push")}},{type:"save", min:0,help:"Where in the media buffer the recording will start. Defaults to the most recently received keyframe.<br>Only makes sense for live streams.",pointer:{main:h,index:"recstartunix"}},{type:"unix",label:"Complete time",min:0,help:"The time where the push will stop. Defaults to never stop automatically.<br>Only makes sense for live streams.",pointer:{main:h,index:"completetime"}});g.push({type:"buttons",buttons:[{type:"cancel",label:"Cancel","function":function(){UI.navto("Push")}},{type:"save",
label:"Save","function":function(){var b={};h.recstartunix?b.recstartunix="recstartunix="+h.recstartunix:h.scheduletime&&(b.recstartunix="recstartunix="+h.scheduletime);delete h.recstartunix;if(Object.keys(b).length){var d="?",f=h.target.split("?");if(f.length>1){var d="&",f=f[f.length-1],f=f.split("&"),e;for(e in f){var g=f[e].split("=")[0];g in b&&delete b[g]}}if(Object.keys(b).length){d=d+Object.values(b).join("&");h.target=h.target+d}}b={};b[c=="auto"?"push_auto_add":"push_start"]=h;if(typeof a!= label:"Save","function":function(){var b={};h.recstartunix?b.recstartunix="recstartunix="+h.recstartunix:h.scheduletime&&(b.recstartunix="recstartunix="+h.scheduletime);delete h.recstartunix;if(Object.keys(b).length){var d="?",f=h.target.split("?");if(f.length>1){var d="&",f=f[f.length-1],f=f.split("&"),e;for(e in f){var g=f[e].split("=")[0];g in b&&delete b[g]}}if(Object.keys(b).length){d=d+Object.values(b).join("&");h.target=h.target+d}}b={};b[c=="auto"?"push_auto_add":"push_start"]=h;if(typeof a!=

View file

@ -4490,12 +4490,18 @@ var UI = {
if ((type == "Automatic") && (push.length >= 4)) { if ((type == "Automatic") && (push.length >= 4)) {
$target.append( $target.append(
$('<span>').text(push[2]) $('<span>').text(push[2])
).append( );
if (push[3]) {
$target.append(
$('<span>').text(', schedule on '+(new Date(push[3]*1e3)).toLocaleString()) $('<span>').text(', schedule on '+(new Date(push[3]*1e3)).toLocaleString())
).append( );
}
if ((push.length >= 5) && (push[4])) {
$target.append(
$('<span>').text(", complete on "+(new Date(push[4]*1e3)).toLocaleString()) $('<span>').text(", complete on "+(new Date(push[4]*1e3)).toLocaleString())
); );
} }
}
else if ((push.length >= 4) && (push[2] != push[3])) { else if ((push.length >= 4) && (push[2] != push[3])) {
$target.append( $target.append(
$('<span>').text(push[2]) $('<span>').text(push[2])