summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/dispatcher.js
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-13 15:08:52 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-04-13 15:08:52 +0200
commita8231ea1befd803fb5892ea3e6679219f5d7d8e5 (patch)
treea5bfe0cec13735bb36ba010c7dbacfaf13ba135f /app/assets/javascripts/dispatcher.js
parent57f8f2d7ff851fc4f5d1c81a28a023855f1985b7 (diff)
parent37ab389139a21a8ab10ddbbddec1b61f720b27ab (diff)
downloadgitlab-ce-a8231ea1befd803fb5892ea3e6679219f5d7d8e5.tar.gz
Merge branch 'master' into feature/gb/manual-actions-protected-branches-permissions
* master: (641 commits) Revert "Fix registry for projects with uppercases in path" Fix registry for projects with uppercases in path Move event icons into events_helper Reset New branch button when issue state changes Add link to environments on kubernetes.md Indent system notes on desktop screens Improve webpack-dev-server compatibility with non-localhost setups. Add changelog entry Fix recent searches icon alignment in Safari Use preload to avoid Rails using JOIN Fix NUMBER_OF_TRUNCATED_DIFF_LINES re-definition error Prepare for zero downtime migrations Fix filtered search input width for IE Fix the `gitlab:gitlab_shell:check` task Fixed random failures with Poll spec Include CONTRIBUTING.md file when importing .gitlab-ci.yml templates Let uses hide verbose output by default Separate examples for each other Collapse similar sibling scenarios Use empty_project for resources that are independent of the repo ... Conflicts: app/views/projects/ci/builds/_build.html.haml
Diffstat (limited to 'app/assets/javascripts/dispatcher.js')
-rw-r--r--app/assets/javascripts/dispatcher.js20
1 files changed, 16 insertions, 4 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js
index 9c7acc903d1..f277e1dddc7 100644
--- a/app/assets/javascripts/dispatcher.js
+++ b/app/assets/javascripts/dispatcher.js
@@ -24,7 +24,6 @@
/* global Search */
/* global Admin */
/* global NamespaceSelects */
-/* global ShortcutsDashboardNavigation */
/* global Project */
/* global ProjectAvatar */
/* global CompareAutocomplete */
@@ -38,12 +37,15 @@
import Issue from './issue';
import BindInOut from './behaviors/bind_in_out';
+import Group from './group';
import GroupName from './group_name';
import GroupsList from './groups_list';
import ProjectsList from './projects_list';
import MiniPipelineGraph from './mini_pipeline_graph_dropdown';
import BlobLinePermalinkUpdater from './blob/blob_line_permalink_updater';
+import BlobForkSuggestion from './blob/blob_fork_suggestion';
import UserCallout from './user_callout';
+import { ProtectedTagCreate, ProtectedTagEditList } from './protected_tags';
const ShortcutsBlob = require('./shortcuts_blob');
@@ -86,6 +88,12 @@ const ShortcutsBlob = require('./shortcuts_blob');
skipResetBindings: true,
fileBlobPermalinkUrl,
});
+
+ new BlobForkSuggestion(
+ document.querySelector('.js-edit-blob-link-fork-toggler'),
+ document.querySelector('.js-cancel-fork-suggestion'),
+ document.querySelector('.js-file-fork-suggestion-section'),
+ );
}
switch (page) {
@@ -264,8 +272,9 @@ const ShortcutsBlob = require('./shortcuts_blob');
case 'groups:create':
case 'admin:groups:create':
BindInOut.initAll();
- case 'groups:new':
- case 'admin:groups:new':
+ new Group();
+ new GroupAvatar();
+ break;
case 'groups:edit':
case 'admin:groups:edit':
new GroupAvatar();
@@ -323,8 +332,12 @@ const ShortcutsBlob = require('./shortcuts_blob');
new Search();
break;
case 'projects:repository:show':
+ // Initialize Protected Branch Settings
new gl.ProtectedBranchCreate();
new gl.ProtectedBranchEditList();
+ // Initialize Protected Tag Settings
+ new ProtectedTagCreate();
+ new ProtectedTagEditList();
break;
case 'projects:ci_cd:show':
new gl.ProjectVariables();
@@ -371,7 +384,6 @@ const ShortcutsBlob = require('./shortcuts_blob');
break;
case 'dashboard':
case 'root':
- shortcut_handler = new ShortcutsDashboardNavigation();
new UserCallout();
break;
case 'groups':