-
-
Save bkcsoft/4b655d32f969ff905926bfedfb5f6f97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/public/js/index.js b/public/js/index.js | |
index 80d9486f..7516b7b1 100644 | |
--- a/public/js/index.js | |
+++ b/public/js/index.js | |
@@ -189,12 +189,6 @@ function initCommentForm() { | |
var $list = $('.ui' + select_id + '.list'); | |
var hasUpdateAction = $menu.data('action') == 'update'; | |
- $(select_id).dropdown('setting', 'onHide', function(){ | |
- if (hasUpdateAction) { | |
- location.reload(); | |
- } | |
- }); | |
- | |
$menu.find('.item:not(.no-select)').click(function () { | |
$(this).parent().find('.item').each(function () { | |
$(this).removeClass('selected active') | |
@@ -204,10 +198,13 @@ function initCommentForm() { | |
if (hasUpdateAction) { | |
updateIssuesMeta( | |
$menu.data('update-url'), | |
- "", | |
+ $menu.data('action'), | |
$menu.data('issue-id'), | |
- $(this).data('id') | |
- ); | |
+ $(this).data('id'), | |
+ function() { | |
+ window.reload(); | |
+ } | |
+ ); | |
} | |
switch (input_id) { | |
case '#milestone_id': | |
@@ -221,24 +218,30 @@ function initCommentForm() { | |
} | |
$('.ui' + select_id + '.list .no-select').addClass('hide'); | |
$(input_id).val($(this).data('id')); | |
+ return false; | |
}); | |
$menu.find('.no-select.item').click(function () { | |
$(this).parent().find('.item:not(.no-select)').each(function () { | |
$(this).removeClass('selected active') | |
}); | |
- if (hasUpdateAction) { | |
+ $list.find('.selected').html(''); | |
+ $list.find('.no-select').removeClass('hide'); | |
+ $(input_id).val(''); | |
+ | |
+ if (hasUpdateAction) { | |
updateIssuesMeta( | |
$menu.data('update-url'), | |
- "", | |
+ $menu.data('action'), | |
$menu.data('issue-id'), | |
- $(this).data('id') | |
+ $(this).data('id'), | |
+ function() { | |
+ window.reload(); | |
+ } | |
); | |
} | |
- $list.find('.selected').html(''); | |
- $list.find('.no-select').removeClass('hide'); | |
- $(input_id).val(''); | |
+ return false; | |
}); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
window.reload()
=>window.location.reload()
🙄 (I'm not a frontend person 😂 )