Changed pin icon for re-dos to be a circular arrow that is not clickable to make it clear it is a redo action and cannot be cleared.
This commit is contained in:
parent
3a6d8f1030
commit
0684a221cd
|
@ -2643,7 +2643,7 @@ def actionredo():
|
||||||
|
|
||||||
|
|
||||||
# Send sequences to UI for selection
|
# Send sequences to UI for selection
|
||||||
genout = [[item['Text'], True] for item in vars.actions_metadata[len(vars.actions)]['Alternative Text'] if (item["Previous Selection"]==True)]
|
genout = [[item['Text'], "redo"] for item in vars.actions_metadata[len(vars.actions)]['Alternative Text'] if (item["Previous Selection"]==True)]
|
||||||
emit('from_server', {'cmd': 'genseqs', 'data': genout}, broadcast=True)
|
emit('from_server', {'cmd': 'genseqs', 'data': genout}, broadcast=True)
|
||||||
else:
|
else:
|
||||||
emit('from_server', {'cmd': 'popuperror', 'data': "There's nothing to undo"}, broadcast=True)
|
emit('from_server', {'cmd': 'popuperror', 'data': "There's nothing to undo"}, broadcast=True)
|
||||||
|
@ -3082,7 +3082,7 @@ def genselect(genout):
|
||||||
# Store sequences in memory until selection is made
|
# Store sequences in memory until selection is made
|
||||||
vars.genseqs = genout
|
vars.genseqs = genout
|
||||||
|
|
||||||
genout = [[item['Text'], item['Pinned']] for item in vars.actions_metadata[len(vars.actions)]['Alternative Text'] if (item["Previous Selection"]==False) and (item["Edited"]==False)]
|
genout = [[item['Text'], "pinned" if item['Pinned'] else "normal"] for item in vars.actions_metadata[len(vars.actions)]['Alternative Text'] if (item["Previous Selection"]==False) and (item["Edited"]==False)]
|
||||||
|
|
||||||
# Send sequences to UI for selection
|
# Send sequences to UI for selection
|
||||||
emit('from_server', {'cmd': 'genseqs', 'data': genout}, broadcast=True)
|
emit('from_server', {'cmd': 'genseqs', 'data': genout}, broadcast=True)
|
||||||
|
|
|
@ -1163,27 +1163,41 @@ function parsegenseqs(seqs) {
|
||||||
seqselcontents.html("");
|
seqselcontents.html("");
|
||||||
var i;
|
var i;
|
||||||
for(i=0; i<seqs.length; i++) {
|
for(i=0; i<seqs.length; i++) {
|
||||||
if (seqs[i][1]) {
|
//setup selection data
|
||||||
color = "white"
|
text_data = "<table><tr><td width=100%><div class=\"seqselitem\" id=\"seqsel"+i+"\" n=\""+i+"\">"+seqs[i][0]+"</div></td><td width=10>"
|
||||||
|
|
||||||
|
//Now do the icon (pin/redo)
|
||||||
|
|
||||||
|
if (seqs[i][1] == "redo") {
|
||||||
|
text_data = text_data + "<span style=\"color: white\" class=\"oi oi-loop-circular\" title=\"Redo\" aria-hidden=\"true\" id=\"seqselpin"+i+"\" n=\""+i+"\"></span>"
|
||||||
|
} else if (seqs[i][1] == "pinned") {
|
||||||
|
text_data = text_data + "<span style=\"color: white\" class=\"oi oi-pin\" title=\"Pin\" aria-hidden=\"true\" id=\"seqselpin"+i+"\" n=\""+i+"\"></span>"
|
||||||
} else {
|
} else {
|
||||||
color = "grey"
|
text_data = text_data + "<span style=\"color: grey\" class=\"oi oi-pin\" title=\"Pin\" aria-hidden=\"true\" id=\"seqselpin"+i+"\" n=\""+i+"\"></span>"
|
||||||
}
|
}
|
||||||
seqselcontents.append("<table><tr><td width=100%><div class=\"seqselitem\" id=\"seqsel"+i+"\" n=\""+i+"\">"+seqs[i][0]+"</div></td><td width=10><span style=\"color: "+color+"\" class=\"oi oi-pin\" title=\"Pin\" aria-hidden=\"true\" id=\"seqselpin"+i+"\" n=\""+i+"\"></span></td></tr></table>");
|
text_data = text_data + "</td></tr></table>"
|
||||||
|
seqselcontents.append(text_data);
|
||||||
|
|
||||||
|
//setup on-click actions
|
||||||
$("#seqsel"+i).on("click", function () {
|
$("#seqsel"+i).on("click", function () {
|
||||||
socket.send({'cmd': 'seqsel', 'data': $(this).attr("n")});
|
socket.send({'cmd': 'seqsel', 'data': $(this).attr("n")});
|
||||||
});
|
});
|
||||||
$("#seqselpin"+i).on("click", function () {
|
|
||||||
socket.send({'cmd': 'seqpin', 'data': $(this).attr("n")});
|
//onclick for pin only
|
||||||
if ($(this).attr("style") == "color: grey") {
|
if (seqs[i][1] != "redo") {
|
||||||
console.log($(this).attr("style"));
|
$("#seqselpin"+i).on("click", function () {
|
||||||
$(this).css({"color": "white"});
|
socket.send({'cmd': 'seqpin', 'data': $(this).attr("n")});
|
||||||
console.log($(this).attr("style"));
|
if ($(this).attr("style") == "color: grey") {
|
||||||
} else {
|
console.log($(this).attr("style"));
|
||||||
console.log($(this).attr("style"));
|
$(this).css({"color": "white"});
|
||||||
$(this).css({"color": "grey"});
|
console.log($(this).attr("style"));
|
||||||
console.log($(this).attr("style"));
|
} else {
|
||||||
}
|
console.log($(this).attr("style"));
|
||||||
});
|
$(this).css({"color": "grey"});
|
||||||
|
console.log($(this).attr("style"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$('#seqselmenu').slideDown("slow");
|
$('#seqselmenu').slideDown("slow");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue