diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-08-08 16:15:16 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-08-08 16:15:16 +0100 |
commit | 23334ac0a151a60ada07b643f703dd0a75223094 (patch) | |
tree | c4e5271de7a5d4842b83179eb7899f9da479b39e /app/assets/javascripts/dispatcher.js | |
parent | 15441f0ef564e87f2ffb672452b0fb9d7bd1d44e (diff) | |
parent | 6a6a1e5b9e0a82735f786ffedeacc7cbc33ed7cd (diff) | |
download | gitlab-ce-23334ac0a151a60ada07b643f703dd0a75223094.tar.gz |
Merge branch 'master' into issue-discussions-refactor
* master: (481 commits)
Make sure that we have author and committer
disable file upload button while uploading
Fix bar chart does not display label at hour 0
Fixed activity not loading on project homepage
Expose noteable_iid in Note
Fix fly-out width when it has long items
Add a test to show that threshold 40 would corrupt
Add changelog entry
Raise encoding confidence threshold to 50
Fix the /projects/:id/repository/commits endpoint to handle dots in the ref name when the project full path contains a `/`
Fix the /projects/:id/repository/tags endpoint to handle dots in the tag name when the project full path contains a `/`
Add Italian translations of Pipeline Schedules
Restrict InlineJavaScript for haml_lint to dev and test environment
Incorporate Gitaly's CommitService.FindCommit RPC
Move `deltas` and `diff_from_parents` logic to Gitlab::Git::Commit
fix repo_edit_button_spec.js
fix test failures in repo_preview_spec.js
fix repo_loading_file_spec tests
Refactor Gitlab::Git::Commit to include a repository
use 100vh instead of flip flopping between the two - works on all suported browsers
...
Diffstat (limited to 'app/assets/javascripts/dispatcher.js')
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index d1aa9a84292..de3c30772d2 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -75,6 +75,7 @@ import initNotes from './init_notes'; import initLegacyFilters from './init_legacy_filters'; import initIssuableSidebar from './init_issuable_sidebar'; import GpgBadges from './gpg_badges'; +import UserFeatureHelper from './helpers/user_feature_helper'; (function() { var Dispatcher; @@ -92,6 +93,7 @@ import GpgBadges from './gpg_badges'; if (!page) { return false; } + path = page.split(':'); shortcut_handler = null; @@ -331,19 +333,16 @@ import GpgBadges from './gpg_badges'; break; 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(); new NotificationsForm(); - if ($('#tree-slider').length) { - new TreeView(); - } - if ($('.blob-viewer').length) { - new BlobViewer(); - } + + if ($('#tree-slider').length) new TreeView(); + if ($('.blob-viewer').length) new BlobViewer(); + if ($('.project-show-activity').length) new gl.Activities(); break; case 'projects:edit': setupProjectEdit(); @@ -407,6 +406,9 @@ import GpgBadges from './gpg_badges'; break; case 'projects:tree:show': shortcut_handler = new ShortcutsNavigation(); + + if (UserFeatureHelper.isNewRepo()) break; + new TreeView(); new BlobViewer(); new NewCommitForm($('.js-create-dir-form')); @@ -425,6 +427,7 @@ import GpgBadges from './gpg_badges'; shortcut_handler = true; break; case 'projects:blob:show': + if (UserFeatureHelper.isNewRepo()) break; new BlobViewer(); initBlob(); break; @@ -577,7 +580,6 @@ 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(); |