Commit Graph

51 Commits

Author SHA1 Message Date
Phil Hughes 60ce5155c8
fixed bug with tabs not switching correctly
clears all tmp files after cancelling edit mode
2017-10-23 10:46:27 +01:00
Phil Hughes 10dcaea1c3
failing spec fixes 2017-10-23 10:45:44 +01:00
Phil Hughes fd67a20e2c
changed adding temp files/directories code to match new structure
this uses the new data structure of adding into the different arrays
which makes the code a lot easier to work with.

Some changes need to be made around commiting & changing the content.

[ci skip]
2017-10-23 10:45:43 +01:00
Phil Hughes caee9d5882
Add new files & directories in the multi-file editor
Closes #38614
2017-10-23 10:45:19 +01:00
Filipa Lacerda e1122c9f6d Merge branch 'multi-file-editor-submodules' into 'master'
Added submodule support in multi-file editor

See merge request gitlab-org/gitlab-ce!14971
2017-10-20 19:30:05 +00:00
Toon Claes d8d7faf68c URI decode Page-Title header to preserve UTF-8 characters 2017-10-20 16:44:29 +00:00
Phil Hughes 741233321d
Added submodule support in multi-file editor 2017-10-20 11:31:57 +01:00
Phil Hughes c3dec96e83
Fixed bug when clicking file link causing user to navigate away
Adds a test for flattenedFiles
Changes the data method to not be an arrow method
Various other review fixes
2017-10-17 11:03:12 +01:00
Phil Hughes ddc0f837a0
made serializing generic
fixed previous directory showing when it shouldnt
2017-10-16 14:19:22 +01:00
Phil Hughes fa9e729aba
fixed rendering bugs
fixed eslint
2017-10-16 11:29:31 +01:00
Phil Hughes b1b91aa065
Refactored multi-file data structure
This moves away from storing in a single array just to render the table.
It now stores in a multi-dimensional array/object type where each entry
in the array can have its own tree. This makes storing the data for
future feature a little easier as there is only one way to store the
data.

Previously to insert a directory the code had to insert the directory
& then the file at the right point in the array. Now the directory
can be inserted anywhere & then a file can be quickly added into this
directory.

The rendering is still done with a single array, but this is handled
through underscore. Underscore takes the array & then goes through
each item to flatten it into one. It is done this way to save changing
the markup away from table, keeping it as a table keeps it semantically
correct.
2017-10-16 11:29:30 +01:00
Phil Hughes fa2af5e0f5
Flash is now a ES6 module
Reduced the technical debt around our JS flash function by making it a
module that is imported rather than relying on the global function.
The global function still exists mainly for technical debt with how
some requests are being completed, but new JS should import the module
directly.

Also reduces some tech debt in the file by removing the need for jQuery.
Instead Flash is now 100% vanilla JS.
2017-10-10 10:14:22 +01:00
Tim Zallmann e58c8413d4 Fixed Back Button for files + line number jumping for preview and editor 2017-10-04 17:27:56 +02:00
Jacob Schatz 5307844c9a Merge branch 'dm-json-page-title' into 'master'
Use backend-provided page title in repo editor

Closes #36029

See merge request gitlab-org/gitlab-ce!13763
2017-09-29 13:22:27 +00:00
Tim Zallmann 705a840d2e Not the Test will also work with other tests before 2017-09-29 12:02:43 +02:00
Tim Zallmann 0647484c61 Added Test for PageTitle / Removed Gitlab Part from TItle 2017-09-29 09:59:09 +02:00
Fatih Acet c25e83b536 RepoEditor: Prevent extra network call for already opened files. 2017-09-27 23:19:02 +03:00
Tim Zallmann e441279904 Added Page Title setting for files + directories 2017-09-26 17:31:48 +02:00
Fatih Acet 98b17bc6de RepoEditor: Fix reopening the existing file on refresh. 2017-09-22 18:00:32 +03:00
Jacob Schatz 2024198da7 Many Repo Fixes 2017-08-15 19:53:41 +00:00
Bryce Johnson 8551997753 Repo Editor Fixes 2017-08-15 18:16:42 +00:00
Eric Eastwood 5bf22c8607 Add shared getFileExtension helper method
Fix
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12198#note_37146854
2017-08-14 11:11:01 -05:00
Eric Eastwood fd8388d85b Remove unused repo store keys
Fix
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12198#note_37147332
2017-08-14 11:11:01 -05:00
Eric Eastwood d15b5c7f5d Scroll total scroll width instead of fixed value
Fixed value could potentially be not enough

Fix
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12198#note_37145886
2017-08-14 11:11:00 -05:00
Eric Eastwood bff7c00778 Switch single fa icon generation to inline
Fix
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12198#note_37145729
2017-08-14 11:11:00 -05:00
Eric Eastwood 1e593a405b Remove duplicate setting of variable
Fix
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12198#note_37145640
2017-08-14 11:10:59 -05:00
Eric Eastwood ecb7c534f6 Use promise syntax with Helper.getContent
Fix
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12198#note_37143217
2017-08-14 11:09:20 -05:00
Eric Eastwood 06c330954e Use v-else instead of duplicating logic
Fix
http://192.168.1.135:3000/gitlab-org/gitlab-ce/blob/master/app/assets/javascripts/broadcast_message.js
2017-08-14 11:00:06 -05:00
Mike Greiling 868dcfd16a fix eslint violations 2017-08-07 18:00:16 -05:00
Jacob Schatz 069f4c592b Merge branch 'ide' of gitlab.com:gitlab-org/gitlab-ce into ide 2017-08-07 17:59:37 -04:00
Jacob Schatz bc39218b4e Show warning for big files. 2017-08-07 17:56:07 -04:00
Mike Greiling 1d5a306596 resolve eslint violations 2017-08-07 15:10:09 -05:00
Jacob Schatz 7435c5d463 Fix loading. 2017-08-07 14:55:54 -04:00
Jacob Schatz 499cc826bc Remove console log :|. Move to one liner. 2017-08-06 12:01:36 -04:00
Jacob Schatz 40347b7807 Change name to user feature helper. 2017-08-06 10:42:25 -04:00
Jacob Schatz 417ec30282 Split more consistently. 2017-08-05 16:24:06 -04:00
Jacob Schatz 4b934feabd Remove Loading ellipsis. 2017-08-05 16:08:51 -04:00
Luke "Jared" Bennett 4c45f8ba4b
Remove console.log 2017-08-04 13:18:05 +01:00
Luke "Jared" Bennett e9dd333307
eslint-fix 2017-08-04 13:13:32 +01:00
Jacob Schatz f9372f70ea Remove and fix permalinks. 2017-08-04 07:27:41 -04:00
Jacob Schatz 6708ce2519 Fix editor not working. 2017-08-03 16:31:49 -04:00
Luke "Jared" Bennett 1530b1e6b9
Add plain property to active file if not set already 2017-08-03 19:52:18 +01:00
Jacob Schatz b1f30151ae Merge branch 'ide' of gitlab.com:gitlab-org/gitlab-ce into ide 2017-08-03 14:09:04 -04:00
Jacob Schatz 82292316f2 Change to given paths 2017-08-03 14:05:24 -04:00
Luke "Jared" Bennett 2fce0c86e5
[ci skip] WIP start to fix file raw state 2017-08-03 19:01:48 +01:00
Luke "Jared" Bennett e361ed1e31
[ci skip] formalise repo_preview component and logic 2017-08-03 18:30:25 +01:00
Luke "Jared" Bennett 07a23e8685
[ci skip] WIP Remove unneeded data.binary setting in getContent branches 2017-08-03 17:37:16 +01:00
Luke "Jared" Bennett 5c9eacd8f9
[ci skip] WIP getRaw on editor mount or getContent when in edit mode 2017-08-03 17:21:45 +01:00
Luke "Jared" Bennett b6770b3d9a
[ci skip] WIP dynamically switch between preview and repo-editor, disable edit button and editor for binary files 2017-08-03 16:59:38 +01:00
Jacob Schatz 0c4b369c30 Load raw data for text view. 2017-08-03 10:31:05 -04:00