Commit Graph
87 Commits
Author SHA1 Message Date
Jacob Schatz ed8256a28b Adds comment about event listener 2016-01-26 00:28:27 -05:00
Jacob Schatz 55e031a0d0 Adds feature: Ajax Close/Open updates discussion automatically
Triggers jQuery event
Fixes #5544
2016-01-26 00:25:41 -05:00
Rémy Coutable dfdf189135 Fix indentation of methods chaining in Coffee
[ci skip]
2016-01-20 23:24:13 +01:00
Rémy Coutable 12da27090f Address some JS coding-style and HTML semantic issues
- Replace 'rel' attributes with 'data' or 'id' attributes
- Style jQuery methods chaining according to Jacob's guidelines
- Rename a method
2016-01-20 22:39:32 +01:00
Rémy Coutable 491c2248c0 Fix diff comments loaded by AJAX to load comment with diff in discussion tab
This commits also fixes two minor issues:
- Ensure notes that the current user is not allowed to see are not
  returned in the AJAX notes loading
- Ensure the notes counter badge is decremented of 1 instead of 2
2016-01-19 18:22:01 +01:00
Robert Speicher 6754caed3c Autosize the textarea in showEditForm
[ci skip]
2016-01-16 22:17:57 -05:00
Jacob Schatz daf60957d9 Fix javascript error with deleting messages in issue or merge request
Elements searched for by jQuery no longer existed in the DOM.
Javascript was also unnecessarily complex, for using jQuery
Fixes #8109
2016-01-14 19:09:46 -05:00
Dmitriy Zaporozhets fc9a2a3e70 Merge remote-tracking branch 'origin/rs-autosize' 2016-01-14 16:19:16 +01:00
Jacob Schatz 1eb3e8acb6 fixes bug with commenting on merge requests 2016-01-13 16:57:46 -05:00
Robert Speicher 5987e88306 Fix missing autosize require 2016-01-13 16:13:34 -05:00
Robert Speicher 552c179acd Autosize textareas 2016-01-13 14:51:07 -05:00
Jacob Schatz 5a997a02a2 removes commented out code. 2015-12-30 06:29:56 -05:00
Jacob Schatz 8e74460534 adds ajax to bottom discussion buttons. Now submits issue and closes via ajax. 2015-12-29 12:53:21 -05:00
Valery Sizov a48dd40a92 base implementation of emoji picker [ci skip] 2015-12-22 23:12:23 +02:00
Robert Speicher 48eccdb2fc Merge branch 'fix-delete-notes-on-merge-request-diff' into 'master'
Fix delete notes on merge request diff

Fixes #3971

See merge request !2061
2015-12-11 12:49:55 -05:00
Grzegorz Bizon d1211e0ada Fix award-emojis alert flash message
This adds a new feature to `Flash` that allows to pin it after a
specified selector. This removes a fixed position from such award-emoji
alert, and makes it responsive by design of selector that this alert is
pinned to.

Closes #3996
2015-12-11 13:50:14 +01:00
Douglas Barbosa Alexandre 1f893022fd Remove note from MR discussion when deleting it in the changes tab 2015-12-10 22:07:25 -02:00
Douglas Barbosa Alexandre 429932a8b4 Ensure new notes are highlighted properly on a merge request diff 2015-12-09 12:17:00 -02:00
Douglas Barbosa Alexandre 9e5ac7285c Ensure notes are replaced on a merge request diff when they're updated 2015-12-09 11:30:21 -02:00
Dmitriy Zaporozhets bdb4945dcf Fix random failing test - delete attachment
Make sure we wait for AJAX request to finish before end test and cleanup
database

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-12-07 23:40:17 +01:00
Grzegorz Bizon bfe91b692a Remove space before exclamation mark in award alert
[ci skip]
2015-12-05 22:18:13 +01:00
Grzegorz Bizon 7af67f619a Combine new javascript Flash methods into one 2015-12-03 13:39:00 +01:00
Grzegorz Bizon 554f468462 Pin flash message to top if award note is invalid 2015-12-03 13:39:00 +01:00
Grzegorz Bizon 6fc1b94856 Show flash message instead of alert when note is invalid 2015-12-03 13:39:00 +01:00
Grzegorz Bizon a527f5c27f Notify user when award-emoji comment is invalid 2015-12-03 13:38:59 +01:00
Grzegorz Bizon c92b6e66dc Scroll to awards after adding emoji-award comment
This makes it more intuitive, as user can see that something actually
happened after adding emoji-only comment in long discussions.
2015-12-03 13:38:59 +01:00
Valery Sizov 23df515fd0 Emoji: fix image of emoji when it is submitted via comment 2015-11-19 01:26:00 +02:00
Valery Sizov 36d0442e83 replace emoji references from class name to data [ci skip] 2015-11-19 01:25:59 +02:00
Valery Sizov fd2c0fe446 award emoji 2015-11-19 01:25:27 +02:00
Robert Speicher c8e53d4467 Revert "Merge pull request #9820 from huacnlee/avoid-render-form-in-notes-list"
This reverts commit 63144cd062, reversing
changes made to 8ab5df9d87.
2015-11-16 13:08:08 -05:00
Jason Lee 1974087114 Avoid render edit_form in each notes.
Use RJS to render edit note feature.

Before:

```
Rendered projects/notes/_note.html.haml (27.9ms)
Rendered projects/_zen.html.haml (0.3ms)
Rendered projects/notes/_hints.html.haml (0.7ms)
Rendered projects/_md_preview.html.haml (3.9ms)
Rendered projects/notes/_edit_form.html.haml (6.9ms)
Rendered projects/notes/_note.html.haml (17.7ms)
Rendered projects/_zen.html.haml (0.3ms)
Rendered projects/notes/_hints.html.haml (0.6ms)
Rendered projects/_md_preview.html.haml (3.4ms)
Rendered projects/notes/_edit_form.html.haml (7.0ms)
```

After:

```
Rendered projects/notes/_note.html.haml (13.8ms)
Rendered projects/notes/_note.html.haml (7.1ms)
Rendered projects/notes/_note.html.haml (9.5ms)
Rendered projects/notes/_note.html.haml (8.5ms)
```

This change reduce at least 6ms * N ('N' - number of notes).
2015-11-12 13:16:35 +08:00
Robert Speicher 2ed5a5b70d Remove "quick submit" behavior specific to the Notes JS 2015-10-07 15:23:42 -04:00
Robert Speicher 7c20f30f05 Ensure notes are highlighted properly when they're updated 2015-09-30 16:58:35 -04:00
Robert Speicher 19c0bf2723 Simplify syntax highlighting of new notes 2015-09-10 15:38:25 -04:00
Robert Speicher cc22a2640f Add syntax highlight scheme to notes rendered client-side 2015-09-04 17:07:24 -04:00
Stan Hu dfe7807653 Fix live notes refresh in relative URL deployments 2015-07-26 09:54:53 -07:00
Daniel Gerhardt 7825001586 Fix file upload dialog for comment editing
This fixes the file upload dialog which currently works for new comments
but not for comment editing. The cause for this is a missing DOM class
which causes traversal to the dropzone to fail.

This is fixed by adding the expected `gfm-form` class to the edit form.
It has to be added dynamically since adding it to the form template
would break the form's layout and comment saving.
2015-07-17 21:15:52 +02: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
Nicolas a68eabd212 Make submit hotkey available to all notes forms.
Addresses #2221.
2015-06-09 05:31:21 +02:00
Robert Speicher 73440b0364 Javascripts don't need to require jquery or bootstrap explicitly 2015-05-28 18:22:32 -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 d5ee54df16 More JS dependency requirements 2015-05-06 15:31:08 -04:00
Robert Speicher 968c281f40 Make notes JS require its dependencies 2015-05-06 13:00:14 -04:00
Robert Speicher 922497560e Update task list behavior for Notes 2015-05-06 12:58:27 -04: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
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 1f711fd93d Remove upvotes js logic since it does not work as expected anyway 2015-03-20 12:34:21 -07:00
Douwe Maan ab401a6132 Remove note attachment file selector. 2015-02-17 22:23:31 +01:00