Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-08-08 18:15:16 +0300
committerFilipa Lacerda <filipa@gitlab.com>2017-08-08 18:15:16 +0300
commit23334ac0a151a60ada07b643f703dd0a75223094 (patch)
treec4e5271de7a5d4842b83179eb7899f9da479b39e /app/assets/javascripts/project.js
parent15441f0ef564e87f2ffb672452b0fb9d7bd1d44e (diff)
parent6a6a1e5b9e0a82735f786ffedeacc7cbc33ed7cd (diff)
Merge branch 'master' into issue-discussions-refactor
* master: (481 commits) Make sure that we have author and committer disable file upload button while uploading Fix bar chart does not display label at hour 0 Fixed activity not loading on project homepage Expose noteable_iid in Note Fix fly-out width when it has long items Add a test to show that threshold 40 would corrupt Add changelog entry Raise encoding confidence threshold to 50 Fix the /projects/:id/repository/commits endpoint to handle dots in the ref name when the project full path contains a `/` Fix the /projects/:id/repository/tags endpoint to handle dots in the tag name when the project full path contains a `/` Add Italian translations of Pipeline Schedules Restrict InlineJavaScript for haml_lint to dev and test environment Incorporate Gitaly's CommitService.FindCommit RPC Move `deltas` and `diff_from_parents` logic to Gitlab::Git::Commit fix repo_edit_button_spec.js fix test failures in repo_preview_spec.js fix repo_loading_file_spec tests Refactor Gitlab::Git::Commit to include a repository use 100vh instead of flip flopping between the two - works on all suported browsers ...
Diffstat (limited to 'app/assets/javascripts/project.js')
-rw-r--r--app/assets/javascripts/project.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/project.js b/app/assets/javascripts/project.js
index 6e1744e8e72..1c2100a1c25 100644
--- a/app/assets/javascripts/project.js
+++ b/app/assets/javascripts/project.js
@@ -90,6 +90,7 @@ import Cookies from 'js-cookie';
filterable: true,
filterRemote: true,
filterByText: true,
+ inputFieldName: $dropdown.data('input-field-name'),
fieldName: $dropdown.data('field-name'),
renderRow: function(ref) {
var li = refListItem.cloneNode(false);
@@ -123,9 +124,14 @@ import Cookies from 'js-cookie';
e.preventDefault();
if ($('input[name="ref"]').length) {
var $form = $dropdown.closest('form');
+
+ var $visit = $dropdown.data('visit');
+ var shouldVisit = typeof $visit === 'undefined' ? true : $visit;
var action = $form.attr('action');
var divider = action.indexOf('?') === -1 ? '?' : '&';
- gl.utils.visitUrl(action + '' + divider + '' + $form.serialize());
+ if (shouldVisit) {
+ gl.utils.visitUrl(action + '' + divider + '' + $form.serialize());
+ }
}
}
});