Commit Graph

63 Commits

Author SHA1 Message Date
Robert Speicher 76ed2afcfc Change `js-quick-submit` behavior to expect the class on the form
Now it will work on any field inside that form, and it's easier to scope
new behavior, which is what we're adding next!
2016-03-02 15:11:15 -05:00
Phil Hughes b724f0871a Project dropdown test span -> i 2016-02-05 20:08:28 +00:00
Phil Hughes 0a094cb1df Changed the project switcher dropdown toggle
Moved the positioning of the dropdown to be more aligned with the title

Closes #13219 and #13214
2016-02-05 18:56:37 +00:00
Jacob Schatz c4c919e59d Merge branch 'title-projects-dropdown' into 'master'
Added dropdown to list all projects on project header

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/4212

When clicking the current project name, it shows a dropdown menu with a list of all projects for that group or user.

When closed:

![Screen_Shot_2016-01-14_at_19.17.44](/uploads/a7258ba388dba238fc2f0468711fc729/Screen_Shot_2016-01-14_at_19.17.44.png)

When open:

![Screen_Shot_2016-01-14_at_19.17.51](/uploads/716533d9eb44b123c5fdff36a4740489/Screen_Shot_2016-01-14_at_19.17.51.png)


cc. @jschatz1

See merge request !2438
2016-02-02 22:15:40 +00:00
Robert Speicher 933834c4a6 Allow manual resize of js-autosize textareas
First, the autosize library was being too controlling and removed the
`resize` property from any elements to which it was attached, removing
the drag handle.

Second, we detect when the user manually resizes an autosize textarea,
and then remove the autosize behavior from it and increase its
max-height.

This should allow for the best of both worlds.

Closes #12832
2016-02-01 17:00:03 -05:00
Phil Hughes 56b0c46bf6 added tests 2016-01-30 16:01:50 +00:00
Jacob Schatz 63363e47f4 reverting more MR ajax files, will appear in different commit 2016-01-12 14:55:54 -05:00
Jacob Schatz f2edb26a1e fixes conflicts 2016-01-11 18:06:15 -05:00
Robert Speicher 89ca4f04f6 Refactor ZenMode
- No longer depends on the "hidden checkbox".
- No longer depends on manually storing/restoring the scroll position.
  Instead, we take advantage of jquery.scrollTo.
- Event-based.
- Simplifies the state-based styling.
2016-01-08 23:36:09 -05:00
Jacob Schatz 8f6ca70055 fixes ajax issue with issue spec 2016-01-07 12:27:01 -05:00
Jacob Schatz f71642017e adds tests (and passes them) for ajax open and close merge requests. 2016-01-06 07:33:50 -05:00
Robert Speicher 98f77d2edc Merge branch 'close-open-ajax-issue' into 'master'
open and close issue via ajax request. With tests

Close and Reopen issues with ajax request.

See merge request !2164
2015-12-25 21:00:16 +00:00
Douwe Maan 93b5ea6f0e Fix NewBranchForm spec 2015-12-24 15:09:29 +01:00
Jacob Schatz 00e967a07f removes unused `alert` from issue spec. Requires flash in the *implementation* instead of the spec. 2015-12-23 20:57:16 -05:00
Jacob Schatz e11ee5ff01 adds test for issue close/reopen failure 2015-12-23 17:41:05 -05:00
Jacob Schatz 7e43fa6709 fixes tests to work with jasmine/jquery 2015-12-23 16:56:36 -05:00
Douglas Barbosa Alexandre 3657eb76c2 Add helper methods to JS validation spec for invalid branch names 2015-12-22 15:32:57 -02:00
Douglas Barbosa Alexandre 23b436dc93 Fix minor stylistic complaints 2015-12-21 22:21:10 -02:00
Jacob Schatz 453479143d adds alerts for when http request errors out in some way. 2015-12-21 17:03:28 -05:00
Jacob Schatz 3e7e7ae0ac clarifies tests with methods like `toBeVisible()` etc. 2015-12-21 16:35:03 -05:00
Jacob Schatz fec7c99e2f updates tests style for four-phase-testing as per: https://robots.thoughtbot.com/four-phase-test 2015-12-21 16:27:52 -05:00
Jacob Schatz 70dfa3a721 open and close issue via ajax request. With tests 2015-12-21 13:06:09 -05:00
Douglas Barbosa Alexandre 4163eb56d9 Add specs for JS validation for invalid characters in branch name 2015-12-17 19:45:43 -02:00
Douwe Maan 79c90821ac Rename .issuable-details to .detail-page (and -header and -description) 2015-12-16 16:13:22 +01:00
Robert Speicher ebee5077f2 Make tab target selectors less naive
Prior, any of the specified IDs could have been hijacked by a table of
contents header, breaking the tab functionality. For example, a `##
Notes` header would get the id `notes` and prevent the Discussion tab
from being activated.

Closes #3908
2015-12-08 14:47:28 -05:00
Dmitriy Zaporozhets a0a488ed13
Apply new design to files page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-13 16:41:48 +02:00
Robert Speicher dbf9ccbcfe Check originalEvent.repeat *and* event.repeat
phantomjs < 2.0 doesn't support creating `KeyboardEvent` so the tests
were failing on CI
2015-10-07 17:59:10 -04:00
Robert Speicher fcf99d0d09 Check originalEvent.repeat 2015-10-07 15:23:42 -04:00
Robert Speicher 01d0926bc1 Add "Quick Submit" JS behavior 2015-10-07 15:23:41 -04:00
Robert Speicher 38fbfb9fe6 Require jquery.turbolinks in all JS specs
Side-effect: This simplifies the requiresInput handler
2015-10-07 15:23:41 -04:00
Robert Speicher 404a01ab14 Add specs for syntax_highlight JS
Also makes it work when given a parent element containing a
`.js-syntax-highlight` element so for dynamically-added things like
notes or Markdown previews, we can more accurately target just the
element we care about.
2015-09-10 15:38:24 -04:00
Robert Speicher 38f1d571fe Remove style attribute from textarea during ZenMode activation
Closes internal https://dev.gitlab.org/gitlab/gitlabhq/issues/2466
2015-09-04 18:01:36 -04:00
Stan Hu ae3f869fd1 Fix the "Reload with full diff" URL button
On the first load, the merge request tabs would be requested in JSON format to render
the HTML. This would cause the "Reload with full diff" button to create a link to diff.json.

Closes #2041
2015-07-23 12:53:54 -07:00
Robert Speicher dd6daf4656 Add test case for clicking line number anchor icon 2015-07-17 20:40:56 -04:00
Robert Speicher f6503f71f9 Remove disableButtonIf[Any]EmptyField calls from forms
These have been replaced by the "requiresInput" behavior.
2015-06-26 22:07:59 -04:00
Robert Speicher e4472cee78 Add "Requires Input" JS behavior 2015-06-26 22:06:42 -04:00
Dmitriy Zaporozhets b9fa82daee
Update tests and use js-issuable class for context form
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-26 15:05:30 +02:00
Dmitriy Zaporozhets 29b6d465a7 Merge branch 'rs-dev-issue-2355' into 'master'
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
2015-06-22 09:48:49 +00:00
Robert Speicher e17020b907 Add MergeRequestTabs specs 2015-06-21 22:57:32 -04:00
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 b3f9be0639 Refactor and spec BlobView JS 2015-06-19 04:31:23 -04:00
Robert Speicher 39d5a4878f Add JS specs for Array extensions 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
Robert Speicher d2256c18f4 Stub ajax in JS specs 2015-05-28 18:22:32 -04:00
Robert Speicher c9788bd9d8 Remove jasmine-fixture, use teaspoon fixtures 2015-05-28 18:22:32 -04:00
Robert Speicher d850a57ff4 teaspoon install 2015-05-28 18:22:32 -04:00
Robert Speicher 05aa71ccd9 Remove jasmine-rails; add teaspoon 2015-05-28 18:22:32 -04:00
Douwe Maan a9e2686139 Update specs. 2015-05-25 16:31:20 +02:00