Commit Graph

848 Commits

Author SHA1 Message Date
Robert Speicher e59aad6e83 Refactor LineHighlighter 2015-06-19 04:31:24 -04:00
Robert Speicher 32366d1811 Rename BlobView to LineHighlighter 2015-06-19 04:31:24 -04:00
Robert Speicher 15582293b9 Use `pushState` instead of the temporary div hack 2015-06-19 04:31:24 -04:00
Robert Speicher b3f9be0639 Refactor and spec BlobView JS 2015-06-19 04:31:23 -04:00
Robert Speicher ce20400628 Extract MergeRequest tab behavior to its own JS class 2015-06-17 16:59:50 -04:00
Robert Speicher 2efb0b6e93 Remove duplicate `timeago` call 2015-06-17 16:37:10 -04:00
Stan Hu a7932fe2fd Support commenting on a diff in side-by-side view
Closes https://github.com/gitlabhq/gitlabhq/issues/9283
2015-06-16 06:11:59 -07:00
Robert Speicher 6de3958364 Account for RootController for dashboard navigation and Dispatch JS 2015-06-13 17:59:11 -04:00
Robert Speicher 0e21436aaf Simplify the javascript behavior for Preference updating 2015-06-13 17:58:17 -04:00
Robert Speicher 0c0c31ff34 Move the "Design" templates and logic to Preferences 2015-06-13 17:58:16 -04:00
Dmitriy Zaporozhets 21a62bb995 Merge branch 'refactor-mr-widget' into 'master'
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
2015-06-12 08:22:13 +00:00
Dmitriy Zaporozhets b63ef1a077 Merge branch 'fix-graph-width' into 'master'
Fix graph width on different screen sizes

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !802
2015-06-12 08:11:47 +00:00
Dmitriy Zaporozhets aa38dfe938
Fix graph width on different screen sizes
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-11 23:00:38 +02:00
Dmitriy Zaporozhets f06f438044
Make commit calendar size depend on window size
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-11 22:52:21 +02:00
Dmitriy Zaporozhets 15cfa5ca20
Fix automerge
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-11 18:49:34 +02:00
Dmitriy Zaporozhets 00600a592b
Extract merge request widget JS to separate class
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-11 18:27:03 +02:00
Dmitriy Zaporozhets d2d8037b1a
Refactor merge request widget step 2
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-11 15:14:50 +02:00
Nicolas a68eabd212 Make submit hotkey available to all notes forms.
Addresses #2221.
2015-06-09 05:31:21 +02:00
Douwe Maan 5256b5cc06 Prefer jQuery on to bind, and don't use .js class. 2015-06-05 12:13:02 +02:00
Douwe Maan 4ae67fcaef Show warning when a comment will add 10 or more people to the discussion. 2015-06-05 12:07:13 +02:00
Robert Speicher 29626b0885 Remove unused `showAndHide`, `simpleFormat`, and `linkify` functions
Also removes redundant `unbind` call
2015-06-02 20:32:07 -04:00
Robert Speicher 4560954404 Move jQuery enable/disable extensions to extensions/jquery
Removes redundant enableButton/disableButton extensions, and adds specs
for the jQuery extensions.
2015-06-02 20:32:07 -04:00
Robert Speicher f76a3f3db7 Add ZenMode javascript specs 2015-06-02 20:32:07 -04:00
Dmitriy Zaporozhets 01f6ae2351
improve navbar collapse for mobile views
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-01 17:55:20 +02:00
Dmitriy Zaporozhets aa97325dea Merge branch 'rs-merge-request-tabs-the-third' into 'master'
Include location.search and location.hash in URL for replaceState

Forgot these 😊

See merge request !740
2015-05-29 10:23:33 +00:00
Robert Speicher 7f529ef0f7 Include location.search and location.hash in URL for replaceState 2015-05-29 05:15:09 -04:00
Dmitriy Zaporozhets acb7721fe8 Merge branch 'rs-teaspoon' into 'master'
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
2015-05-29 09:10:46 +00:00
Robert Speicher 3f156ed482 Improve MergeRequest tab-persisting behavior
Now uses the path instead of the hash.

See discussion in #728.
2015-05-29 00:27:56 -04:00
Robert Speicher 73440b0364 Javascripts don't need to require jquery or bootstrap explicitly 2015-05-28 18:22:32 -04:00
Robert Speicher 5c52eaa9d2 Persist current merge request tab selection via URL
Closes internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2350
2015-05-27 22:39:11 -04:00
Douwe Maan 97f9d601cc Merge branch 'fix-safari-clone-url' into 'master'
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
2015-05-27 12:26:41 +00:00
Douwe Maan 106cb511de Merge branch 'support-file-attachments-milestones' into 'master'
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
2015-05-27 12:17:34 +00:00
Dmitriy Zaporozhets 2cd1cee639 Merge branch 'commit-graphs-by-email' into 'master'
Group project contributions by both name and email.

See https://twitter.com/Argorain/status/598751646143897600.

We now group by both name and email, so that "Douwe Maan - douwe@gitlab.com", "Douwe Maan - me@douwe.me" and "Douwe M. - me@douwe.me" are all combined into one graph.

Fixes internal issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2328.

See merge request !700
2015-05-27 11:45:53 +00:00
Jeroen van Baarsen aa36a19613 Merge pull request #9319 from jvanbaarsen/validate-wiki-page-creation
Validate wiki page creation
2015-05-26 20:05:25 +02:00
Robert Schilling 5c2acc51e2 Merge branch 'fix-escape-key-in-zen-mode' into 'master'
Fix Zen Mode not closing with ESC key

### What does this MR do?

This MR fixes the ESC key not leaving Zen Mode (fullscreen).

### Why was this MR needed?

This has been broken since GitLab v7.8. The `change` event for `zen-toggle-comment` was never fired. See:

http://stackoverflow.com/questions/19505011/checkbox-checked-with-prop-does-not-fire-events-attached-to-change?answertab=votes#tab-top

### What are the relevant issue numbers?

* Closes #1025
* Closes https://github.com/gitlabhq/gitlabhq/issues/9018

See merge request !710
2015-05-26 17:26:28 +00:00
Jeroen van Baarsen b16aad9dd1 Validate wiki page creation
**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>
2015-05-26 19:01:11 +02:00
Stan Hu 8c3c5afba2 Add file attachment support in Milestone description
Closes #1648
2015-05-25 21:41:47 -07:00
Stan Hu ae552ec315 Fix Markdown preview not working in Edit Milestone page
Closes #1687
Closes https://github.com/gitlabhq/gitlabhq/issues/9325
2015-05-25 21:03:55 -07:00
Stan Hu 710627fbd8 Fix Zen Mode not closing with ESC key
Closes #1025
2015-05-25 20:27:20 -07:00
Douwe Maan 2fa5c7513e Group project contributions by both name and email. 2015-05-25 15:43:22 +02:00
Stan Hu 310e08dc2c Fix clone URL losing selection after a single click in Safari and Chrome
Closes #9326
2015-05-24 20:19:26 -04:00
Douwe Maan cbcc5f8544 Workaround that doesn't add unwanted newline. 2015-05-21 11:22:21 +02:00
Robert Speicher 8e40d594a2 Work around a Chrome 43 bug preventing note editing 2015-05-20 12:53:35 -04:00
Robert Speicher bd85e8ea5a Fix default tooltip placement 2015-05-17 18:13:27 -04:00
Dmitriy Zaporozhets 15bbb4ee1a Merge pull request #9244 from dreis2211/firefox_issuable_filter_patch
Fix Firefox problems when it wants to render issuable component
2015-05-08 22:24:51 +03:00
Robert Speicher d5ee54df16 More JS dependency requirements 2015-05-06 15:31:08 -04:00
Robert Speicher c96c7cbfb1 Make issue JS require its dependencies 2015-05-06 13:00:14 -04:00
Robert Speicher 968c281f40 Make notes JS require its dependencies 2015-05-06 13:00:14 -04:00
Robert Speicher ce29e5cd8f Update task list behavior for Merge Requests 2015-05-06 12:58:27 -04:00
Robert Speicher 922497560e Update task list behavior for Notes 2015-05-06 12:58:27 -04:00
Robert Speicher a3d55db910 Update task list behavior for Issues 2015-05-06 12:58:27 -04:00
Robert Speicher 18baf550e1 Add task_list JS 2015-05-06 12:58:27 -04:00
Robert Speicher 5ef8bd33d0 Remove taskable.js 2015-05-06 12:58:27 -04:00
dreis a1152e19d1 Fix Firefox problems when it wants to render issuable component 2015-05-05 21:52:06 +02:00
Douwe Maan 92fd3ccee0 Add helpers for header title and sidebar, and move setting those from controllers to layouts. 2015-05-01 10:39:16 +02:00
Robert Speicher 1e1785cc16 Place the logo's tooltip dynamically
When collapsed it's on the right like everything else, when expanded
it's on the bottom.
2015-04-25 16:03:18 -04:00
Robert Speicher d30ceda7de Add collapsed navbar links to the default tooltip selector 2015-04-25 16:00:30 -04:00
Robert Speicher e8faf9178a Remove the `has_bottom_tooltip` class
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.
2015-04-25 14:03:40 -04:00
Robert Speicher 85bbb91476 Fix GfmAutoComplete for jquery-atwho 1.0 2015-04-23 13:08:16 -04:00
Dmitriy Zaporozhets 71f6143552
Merge branch 'master' into new-sidebar
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	app/controllers/snippets_controller.rb
2015-04-23 12:08:03 +03:00
Dmitriy Zaporozhets a22f3139f3 Merge branch 'rs-reply-hotkey' into 'master'
"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
2015-04-22 19:57:40 +00:00
Dmitriy Zaporozhets 4860c4dc07
Fix toggle of sidebar
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-04-22 16:48:39 +03:00
Douwe Maan 2400181a3a Merge branch 'fix-cannot-move-project-error' into 'master'
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".

![image](https://gitlab.com/stanhu/gitlab-ce/uploads/0c9f61294291514e0c2a48c204b6a1aa/image.png)

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
2015-04-21 09:29:17 +00:00
Stan Hu 6fb1e80a26 Fix "Cannot move project" error message from popping up after a successful project transfer
Multiple event handlers were firing, causing multiple form submissions.

Closes #1448 and #1128
2015-04-20 12:46:02 -07:00
Leo Antunes f2a817f040 do not prepend relative_url_root to avatar
The commit.author.icon variable contains a full URL, which gets broken
when prepended by the relative_url_root setting (generating hrefs like
"/gitlabhttps://...".
2015-04-20 09:52:03 +02:00
Robert Speicher 4d1878253e Typo: Issueable -> Issuable 2015-04-18 15:20:15 -04:00
Robert Speicher 8e6fa2555e Add JS specs for replyWithSelectedText 2015-04-18 15:17:26 -04:00
Robert Speicher ca5d0c8250 Add hotkey for "reply with selected text" to Issueable 2015-04-18 15:17:26 -04:00
Robert Speicher 662bdfbeb1 Make StatGraph JS explicitly require its dependencies
This allows us to test them in a bit more isolation.
2015-04-18 15:17:25 -04:00
Robert Speicher 7d5fefb780 Fix 'merge_reuests' typo 2015-04-18 15:17:24 -04:00
Robert Speicher 269aee790c Let Bootstrap's tab JS handle history
Closes #2219
2015-04-17 16:42:38 -04:00
Dmitry Medvinsky 92544df8da Fix auto-selection of URL field with X11 selection
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).
2015-04-17 10:16:18 +03:00
Douwe Maan 87dd3f215f Let members be invited from Add members pane. 2015-04-14 12:08:10 +02:00
Stan Hu 3d2c387840 Move current user to the top of the list in author/assignee filters
Closes #1321
2015-04-09 01:04:53 -07:00
Robert Speicher f7190e428f Typo -- findAndollowLink -> findAndFollowLink 2015-04-07 11:03:48 -04:00
Drew Blessing aedc12547a Merge branch 'issue-sidebar-size' into 'master'
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
2015-04-03 13:23:11 +00:00
Stan Hu dfd256f29e Support configurable attachment size via Application Settings
Fix bug where error messages from Dropzone would not be displayed on the issues page

Closes #1258
2015-04-02 00:04:08 -07:00
Dmitriy Zaporozhets c14c03a88f Merge branch 'rs-issue-1340' into 'master'
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
2015-04-01 01:33:03 +00:00
Dmitriy Zaporozhets 0622b87537 Merge branch 'admin-user-projects' into 'master'
Fix admin user projects lists.

The admin user personal projects lists wasn't being rendered anymore.

cc @marin

See merge request !442
2015-04-01 00:44:09 +00:00
Robert Speicher 085f12288d Unbind task item checkbox events and then rebind them
Fixes #1340
2015-03-31 17:45:11 -04:00
Douwe Maan 2d5f4458a0 Fix admin user projects lists. 2015-03-31 09:19:08 +02:00
Dmitriy Zaporozhets 0191857fac Better legend for contribution calendar pt2 :) 2015-03-31 05:57:36 +03:00
Dmitriy Zaporozhets 549e6c100b Better legend for contribution calendar 2015-03-31 05:50:10 +03:00
Dmitriy Zaporozhets 38dd6bcaae Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-03-29 17:23:09 -07:00
Dmitriy Zaporozhets 40c3675372 Merge branch 'clear-note-form-on-succcess' into 'master'
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
2015-03-29 10:58:34 +00:00
Dmitriy Zaporozhets 0a634f3481 Merge pull request #9040 from tsigo/rs-refactor-nav-collapse
Refactor sidebar JS logic
2015-03-29 03:36:28 -07:00
Robert Speicher 65c4dc19f7 Simplify toggle-nav-collapse JS 2015-03-27 15:16:20 -04:00
Douwe Maan 7a70fb123c Prevent holding Control-Enter or Command-Enter from posting comment multiple times. 2015-03-27 16:55:18 +01:00
Douwe Maan 351e61f4b2 Prevent note form from being cleared when submitting failed. 2015-03-27 12:52:07 +01:00
Dmitriy Zaporozhets d6c8eefb5d Big refactoring of issues filters
* 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
2015-03-26 19:13:49 -07:00
Dmitriy Zaporozhets 1c2711f7e3 Refactor UsersSelect to use internal gitlab autocomplete controller 2015-03-26 19:13:38 -07:00
Phil Hughes 81ff63d684 Changes the width of sidebar in issues and MRs when affix event fires 2015-03-26 21:23:31 +00:00
Dmitriy Zaporozhets 7842a81569 Merge branch 'capitalize-js-class' into 'master'
Capitalize js class name

See merge request !457
2015-03-26 15:40:34 +00:00
Dmitriy Zaporozhets 3a11165648 Improve protected branches page UX 2015-03-25 22:45:58 -07:00
Dmitriy Zaporozhets 429a43ca6a Dont bind all checkboxes when you need only protected branches 2015-03-25 22:32:08 -07:00
Dmitriy Zaporozhets 80fd8f2de1 Capitalize js class name 2015-03-25 22:22:10 -07:00
Dmitriy Zaporozhets 12430b65d4 Merge branch 'fix-compare-diff-unfold' into 'master'
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
2015-03-26 01:17:35 +00:00
Dmitriy Zaporozhets f2ea9d9f3f Improve sticky headers in diffs
* disable sticky headers in discussion
* enable sticky header on mr page with you click changes tab
2015-03-24 19:00:00 -07:00
Dmitriy Zaporozhets 35ec08a6e2 Change merge request button color based on CI status 2015-03-24 16:13:29 -07:00
Douwe Maan 515e9d51df Make sure issue assignee is properly reset. 2015-03-24 16:52:02 +01:00