Reorder MergeRequestTabs constructor
The tab was being activated before we set the `[commits|diffs]Loaded`
variable, so even when the `/diffs` route is accessed directly, like
from the "Side-by-side" link, the tab was being loaded from its default
source.
Fixes#1887
See merge request !892
The tab was being activated before we set the `[commits|diffs]Loaded`
variable, so even when the `/diffs` route is accessed directly, like
from the "Side-by-side" link, the tab was being loaded from its default
source.
Fixes#1887
MergeRequest#show performance improvements
This is a first pass on improving the performance of the `MergeRequests#show` page. Notable changes:
- The "Commits" tab is loaded lazily, so the initial page load should be much faster for MRs with many commits.
- Relative timestamps via `timeago` are only initialized once per load instead of `O(n^2)`. This greatly improves frontend rendering times for a large number of commits.
- Refactored `User.find_for_commit` to use a single ARel-generated SQL query instead of the old method which resulted in one query, and could result in up to three.
See merge request !838
Refactor accept merge request widget
* make each case a simple view
* separate merge request JS from merge request accept widget JS
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
See merge request !799
Add Teaspoon for Javascript testing
Looking to expand our Javascript unit tests, and this gem makes things a bit better in that respect.
See https://github.com/modeset/teaspoon
See merge request !715
Fix clone URL losing selection after a single click in Safari and Chrome
### What does this MR do?
This MR deactivates the mouseup event in the `git clone` URL to prevent the text from being deselected after a single click.
### Why was this MR needed?
In Safari and Chrome 43.0.2357.65 (42.0.2311.152 worked fine), the URL would lose selection after a single click. To reproduce:
1. Go to https://gitlab.com/gitlab-org/gitlab-ce
2. Click on the URL in the repository (HTTP is selected by default).
3. Click on the SSH button.
4. Click on the URL again.
The URL selection should be selected automatically, but it is deselected immediately.
It appears that 92544df changed the selection event from `click` to `focusin` to make copy & paste work in X11. This Stack Overflow article discusses the deselection issue in detail:
http://stackoverflow.com/questions/3380458/looking-for-a-better-workaround-to-chrome-select-on-focus-bug
### What are the relevant issue numbers?
Closes https://github.com/gitlabhq/gitlabhq/issues/9326
See merge request !698
Add file attachment support in Milestone description
### What does this MR do?
This MR adds support for attaching files to Milestone descriptions.
### Why was this MR needed?
Dropzone support should be in every Markdown area. It seems that this one was overlooked.
### What are the relevant issue numbers?
Closes#1648
See merge request !712