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
**What does this do?**
It adds validation to the creation of a wiki page, that way the user gets real
feedback instead of just a 404 page if the name of the wiki page was invalid
**Why is this needed?**
There are a lot of characters that are not allowed in the creation of a wiki
page, there is even a small text that is saying: Please don't use spaces.
Although we have that text there, we don't actually validate on this. This
commit adds validation on the title and gives the user actual feedback.
**What issues does this fix?**
Fixes http://github.com/gitlabhq/gitlabhq/issues/5357
Fixes https://github.com/gitlabhq/gitlabhq/issues/8565
Fixes https://github.com/gitlabhq/gitlabhq/issues/3913
Fixes https://github.com/gitlabhq/gitlabhq/issues/8166
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Bootstrap's tooltip JS can read the placement from a `data-placement`
attribute.
Further, when we supply the `selector` option to `tooltip`, tooltips
will be added to any dynamically-added elements matching the selector,
without us having to re-call the `tooltip` method.
"Reply quoting selected text" shortcut/hotkey
Adds the <kbd>r</kbd> hotkey for quoting selected text on Issuable forms.
This MR also updates the jasmine gem and adds jasmine-rails to let us use the asset pipeline (and Coffeescript) in JS specs.
See merge request !1775
Fix "Cannot move project" error message from popping up after a successful transfer
The JavaScript click handlers were never being removed, leading to duplicate requests when attempting to transfer a project to another namespace. The first transfer would succeed but the subsequent ones would fail, leading to the error message saying, "Cannot move project".

I attempted to write a unit test for this, but it was taking me too long to get it right.
Closes#1448 and #1128
See merge request !548
The commit.author.icon variable contains a full URL, which gets broken
when prepended by the relative_url_root setting (generating hrefs like
"/gitlabhttps://...".
We use `focusin` event instead of `click` because when using the latter,
when the selection is created it isn't put into X11 PRIMARY selection.
And as a Linux user I'm very used to such behaviour that when something
gets selected, it's ready for pasting, which is the primary purpose of
the clone URL field.
When `focusin` is used, the selection is copied to X11 buffer
automatically, so it works as expected (tested in Firefox and Chrome).
Changes the width of sidebar in issues and MRs when affix event fires
Fixes#1320
Width is set when Bootstraps affix event is fired and then removed when it reaches the top or bottom.
See merge request !464
Unbind task item checkbox events and then rebind them
Fixes#1340
This issue was caused by this line: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/views/projects/issues/update.js.haml#L17
`new Issue()` gets called on every JS-based issue update, and all the binds in the constructor get re-applied without first unbinding the existing ones. Right now my fix is *only* for the checkbox events, and I suspect there are similar issues still present for other events.
See merge request !478
Prevent note form from being cleared when submitting failed.
When you try to submit a comment while you're not connected to the internet or while your connection is having trouble, the AJAX request would fail and the note would be deleted 😢
See merge request !468
* Squash project users selectbox and users selectbox into one class
* Move from API autocomplete to GitLab internal one
* Smarter filter for project/group/all issues
* Use selectbox with searchbox for assignee/author/milestone/label
* Switch to ajax filter for issue author/assignee
Fix code unfold not working on Compare commits page
### What does this MR do?
The code unfold buttons (`...`) don't work when you go to Commits -> Compare mode. This MR fixes that.
### Are there points in the code the reviewer needs to double check?
Check to make sure all the right initializers are run in the `projects:compare:xxx` case. I'm also not sure if there are other cases where a diff is shown but the code unfolding is not activated.
### What are the relevant issue numbers / [Feature requests](http://feedback.gitlab.com/)?
Closes#1274
See merge request !434