diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-08-01 17:45:20 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-08-01 17:45:20 +0100 |
commit | 335d4a535f737f19ef4959ec4027681d97d1002b (patch) | |
tree | 0d80d58b8f66c2770698d842866ac497d56f9756 /app/assets/javascripts/dispatcher.js | |
parent | 95f9d6d83bcb7a9f45601f828c34301e536fc195 (diff) | |
parent | 4c77c30fbfb3734fd893f7cfe540fa595ea6539c (diff) | |
download | gitlab-ce-335d4a535f737f19ef4959ec4027681d97d1002b.tar.gz |
Merge branch 'master' into issue-discussions-refactor
* master: (76 commits)
Add code review guidelines related to Build [CI skip].
Make time span dropdown style on cycle analytics page consistent
Add 204. Remove duplicated method.
Make sure we didn't commit conflicts
Fix bug in blob test
Always fetch branches before finding the merge base, otherwise we could find an outdated merge base
Fixes dropdown margin in sidebar
Docs add blog articles
Inline script cleanup globals and easy
Add option to use CommitLanguages RPC
CI fixes for gitaly-ruby
fix
Allow logged in users to read user list under public restriction
Small refactor in LegacyNamespace and moved back send_update_instructions
Rename ensure_dir_exist -> ensure_storage_path_exist
Added some extra TODOs for the Legacy Storage refactor
Make disk_path keyword argument and optional
Rename more path_with_namespace -> full_path or disk_path
Rename path_with_namespace -> disk_path when dealing with the filesystem
Rename many path_with_namespace -> full_path
...
Diffstat (limited to 'app/assets/javascripts/dispatcher.js')
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 43 |
1 files changed, 38 insertions, 5 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 9d706b5ba59..a2664c0301e 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -8,6 +8,8 @@ /* global LabelsSelect */ /* global MilestoneSelect */ /* global Commit */ +/* global CommitsList */ +/* global NewBranchForm */ /* global NotificationsForm */ /* global NotificationsDropdown */ /* global GroupAvatar */ @@ -18,15 +20,20 @@ /* global Search */ /* global Admin */ /* global NamespaceSelects */ +/* global NewCommitForm */ +/* global NewBranchForm */ /* global Project */ /* global ProjectAvatar */ /* global MergeRequest */ /* global Compare */ /* global CompareAutocomplete */ +/* global ProjectFindFile */ /* global ProjectNew */ /* global ProjectShow */ +/* global ProjectImport */ /* global Labels */ /* global Shortcuts */ +/* global ShortcutsFindFile */ /* global Sidebar */ /* global ShortcutsWiki */ @@ -194,7 +201,6 @@ import GpgBadges from './gpg_badges'; break; case 'explore:groups:index': new GroupsList(); - const landingElement = document.querySelector('.js-explore-groups-landing'); if (!landingElement) break; const exploreGroupsLanding = new Landing( @@ -217,6 +223,10 @@ import GpgBadges from './gpg_badges'; case 'projects:compare:show': new gl.Diff(); break; + case 'projects:branches:new': + case 'projects:branches:create': + new NewBranchForm($('.js-create-branch-form'), JSON.parse(document.getElementById('availableRefs').innerHTML)); + break; case 'projects:branches:index': gl.AjaxLoadingSpinner.init(); new DeleteModal(); @@ -258,7 +268,7 @@ import GpgBadges from './gpg_badges'; case 'projects:tags:new': new ZenMode(); new gl.GLForm($('.tag-form'), true); - new RefSelectDropdown($('.js-branch-select'), window.gl.availableRefs); + new RefSelectDropdown($('.js-branch-select')); break; case 'projects:snippets:show': initNotes(); @@ -304,18 +314,23 @@ import GpgBadges from './gpg_badges'; container: '.js-commit-pipeline-graph', }).bindEvents(); initNotes(); + $('.commit-info.branches').load(document.querySelector('.js-commit-box').dataset.commitPath); break; case 'projects:commit:pipelines': new MiniPipelineGraph({ container: '.js-commit-pipeline-graph', }).bindEvents(); + $('.commit-info.branches').load(document.querySelector('.js-commit-box').dataset.commitPath); break; - case 'projects:commits:show': + case 'projects:activity': + new gl.Activities(); shortcut_handler = new ShortcutsNavigation(); - GpgBadges.fetch(); break; - case 'projects:activity': + case 'projects:commits:show': + CommitsList.init(document.querySelector('.js-project-commits-show').dataset.commitsLimit); + new gl.Activities(); shortcut_handler = new ShortcutsNavigation(); + GpgBadges.fetch(); break; case 'projects:show': shortcut_handler = new ShortcutsNavigation(); @@ -330,6 +345,12 @@ import GpgBadges from './gpg_badges'; case 'projects:edit': setupProjectEdit(); break; + case 'projects:imports:show': + new ProjectImport(); + break; + case 'projects:pipelines:new': + new NewBranchForm($('.js-new-pipeline-form')); + break; case 'projects:pipelines:builds': case 'projects:pipelines:failures': case 'projects:pipelines:show': @@ -383,8 +404,19 @@ import GpgBadges from './gpg_badges'; shortcut_handler = new ShortcutsNavigation(); new TreeView(); new BlobViewer(); + new NewCommitForm($('.js-create-dir-form')); + $('#tree-slider').waitForImages(function() { + gl.utils.ajaxGet(document.querySelector('.js-tree-content').dataset.logsPath); + }); break; case 'projects:find_file:show': + const findElement = document.querySelector('.js-file-finder'); + const projectFindFile = new ProjectFindFile($(".file-finder-holder"), { + url: findElement.dataset.fileFindUrl, + treeUrl: findElement.dataset.findTreeUrl, + blobUrlTemplate: findElement.dataset.blobUrlTemplate, + }); + new ShortcutsFindFile(projectFindFile); shortcut_handler = true; break; case 'projects:blob:show': @@ -540,6 +572,7 @@ import GpgBadges from './gpg_badges'; shortcut_handler = new ShortcutsWiki(); new ZenMode(); new gl.GLForm($('.wiki-form'), true); + new Sidebar(); break; case 'snippets': shortcut_handler = new ShortcutsNavigation(); |