Commit: b46a291baa6c4fd8d4915454c0634277d8e9ecfc Author: Anatol Belski <a...@php.net> Fri, 11 Nov 2016 19:45:01 +0100 Parents: 50ef2f610f4443f17318bed25cab115bdff36768 Branches: master
Link: http://git.php.net/?p=web/qa.git;a=commitdiff;h=b46a291baa6c4fd8d4915454c0634277d8e9ecfc Log: if labels dialog was changed but not pushed, still preserve the values Changed paths: M pulls/pullrequests.js Diff: diff --git a/pulls/pullrequests.js b/pulls/pullrequests.js index 6e20c6d..0ba0692 100644 --- a/pulls/pullrequests.js +++ b/pulls/pullrequests.js @@ -163,17 +163,18 @@ function loadRepo(repo, url) { var ul_el = $("dd", dia).append('<ul style="list-style: none;">'); for (var i in repo_labels.data) { - var li_el, input_html; + var li_el, input_html, was_checked; li_el = ul_el.append('<li style="display: block;">') $('[id="pr-' + that.data("number") + '-label-' + repo_labels.data[i].name + '"]').each(function(i, v) { - $(v).remove(); + was_checked = v.checked; + $(v).remove(); }); input_html ='<input type="checkbox" id="pr-' + that.data("number") + '-label-' + repo_labels.data[i].name + '"'; for (var k in issue_labels.data) { - if (repo_labels.data[i].id == issue_labels.data[k].id) { + if (repo_labels.data[i].id == issue_labels.data[k].id || was_checked) { input_html += ' checked="checked"'; break; } -- PHP Quality Assurance Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php