Minor UI tweaks (#5980)

* Remove all CommitStatus when a repo is deleted

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Minor UI tweaks (#5782)
Added 'No License' option
Added link and octicon change for external issue trackers
Reset password now notifies right away if the code is invalid

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* More UI tweaks
More info in PR

* Generate stylesheet for arc-green

* Make gofmt work

* Change PR integration since the button is changed

* Rebase

* Generate stylesheet

* UI updates
Made the PR button a "basic" button
Vertically centered the issue checkboxes
Labels will update only once after modal is closed

* Commit to reference related issues
Resolves #5782
Resolves #5861
Addresses original question in #5993

* Change the comment wording since PR button is no longer little and green.

* Revert changes that made Windows work

* Regenerate stylesheet

* Regenerate stylesheets

* make generate-stylesheets

* Update integration again, changed button style

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Added ID to PR button
Changed integration to use the ID to avoid breaking in the future

* Added missing semi-colons

* Added back distinction between issue actions and filters (overlooked it before)
Moved action button over next to other action dropdowns

* Remove extra tab formatting in list.tmpl

* Remove more formatting from GoLand

* Replace hardcoded "No License" with i18n license helper.
This commit is contained in:
John Olheiser 2019-02-19 17:09:47 -06:00 committed by techknowlogick
parent 2982413f8d
commit d26d249748
15 changed files with 115 additions and 53 deletions

View file

@ -380,10 +380,22 @@ function initCommentForm() {
var $noSelect = $list.find('.no-select');
var $listMenu = $('.' + selector + ' .menu');
var hasLabelUpdateAction = $listMenu.data('action') == 'update';
var labels = {};
$('.' + selector).dropdown('setting', 'onHide', function(){
hasLabelUpdateAction = $listMenu.data('action') == 'update'; // Update the var
if (hasLabelUpdateAction) {
for (var elementId in labels) {
if (labels.hasOwnProperty(elementId)) {
var label = labels[elementId];
updateIssuesMeta(
label["update-url"],
label["action"],
label["issue-id"],
elementId
);
}
}
location.reload();
}
});
@ -417,23 +429,29 @@ function initCommentForm() {
$(this).removeClass('checked');
$(this).find('.octicon').removeClass('octicon-check');
if (hasLabelUpdateAction) {
updateIssuesMeta(
$listMenu.data('update-url'),
"detach",
$listMenu.data('issue-id'),
$(this).data('id')
);
if (!($(this).data('id') in labels)) {
labels[$(this).data('id')] = {
"update-url": $listMenu.data('update-url'),
"action": "detach",
"issue-id": $listMenu.data('issue-id'),
};
} else {
delete labels[$(this).data('id')];
}
}
} else {
$(this).addClass('checked');
$(this).find('.octicon').addClass('octicon-check');
if (hasLabelUpdateAction) {
updateIssuesMeta(
$listMenu.data('update-url'),
"attach",
$listMenu.data('issue-id'),
$(this).data('id')
);
if (!($(this).data('id') in labels)) {
labels[$(this).data('id')] = {
"update-url": $listMenu.data('update-url'),
"action": "attach",
"issue-id": $listMenu.data('issue-id'),
};
} else {
delete labels[$(this).data('id')];
}
}
}
@ -2040,11 +2058,11 @@ $(document).ready(function () {
$('.issue-checkbox').click(function() {
var numChecked = $('.issue-checkbox').children('input:checked').length;
if (numChecked > 0) {
$('#issue-filters').hide();
$('#issue-actions').show();
$('#issue-filters').addClass("hide");
$('#issue-actions').removeClass("hide");
} else {
$('#issue-filters').show();
$('#issue-actions').hide();
$('#issue-filters').removeClass("hide");
$('#issue-actions').addClass("hide");
}
});