diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-03-02 12:55:22 +0000 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-03-02 15:07:58 +0000 |
commit | 1fbc4886684b904f2de9e5f726f9e8c0baa76352 (patch) | |
tree | 682998be62311898c9ef4e672ccad2b0e6f4c51b /app | |
parent | ddfd09c09cb904529df567e5606d76c467ed856f (diff) | |
download | gitlab-ce-1fbc4886684b904f2de9e5f726f9e8c0baa76352.tar.gz |
Corrected JS for new master js build updates [ci skip]
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/application.js | 1 | ||||
-rw-r--r-- | app/assets/javascripts/behaviors/bind_in_out.js.es6 | 6 | ||||
-rw-r--r-- | app/assets/javascripts/dispatcher.js.es6 | 6 | ||||
-rw-r--r-- | app/views/shared/_group_form.html.haml | 2 |
4 files changed, 8 insertions, 7 deletions
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index c51860d1604..d6aed79fc0b 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -47,6 +47,7 @@ require('./behaviors/details_behavior'); require('./behaviors/quick_submit'); require('./behaviors/requires_input'); require('./behaviors/toggler_behavior'); +require('./behaviors/bind_in_out'); // blob require('./blob/blob_ci_yaml'); diff --git a/app/assets/javascripts/behaviors/bind_in_out.js.es6 b/app/assets/javascripts/behaviors/bind_in_out.js.es6 index 3cb892451e3..1cc0fc750b5 100644 --- a/app/assets/javascripts/behaviors/bind_in_out.js.es6 +++ b/app/assets/javascripts/behaviors/bind_in_out.js.es6 @@ -41,8 +41,4 @@ class BindInOut { } } -const global = window.gl || (window.gl = {}); - -global.BindInOut = BindInOut; - -module.exports = BindInOut; +export default BindInOut; diff --git a/app/assets/javascripts/dispatcher.js.es6 b/app/assets/javascripts/dispatcher.js.es6 index d0b8474f2cc..2852417b1c9 100644 --- a/app/assets/javascripts/dispatcher.js.es6 +++ b/app/assets/javascripts/dispatcher.js.es6 @@ -35,6 +35,8 @@ /* global Labels */ /* global Shortcuts */ +import BindInOut from './behaviors/bind_in_out.js.es6'; + const ShortcutsBlob = require('./shortcuts_blob'); const UserCallout = require('./user_callout'); @@ -217,7 +219,9 @@ const UserCallout = require('./user_callout'); break; case 'groups:new': case 'admin:groups:new': - gl.BindInOut.initAll(); + case 'groups:create': + case 'admin:groups:create': + BindInOut.initAll(); case 'groups:new': case 'admin:groups:new': case 'groups:edit': diff --git a/app/views/shared/_group_form.html.haml b/app/views/shared/_group_form.html.haml index 5b8c9a66205..c2d9ac87b20 100644 --- a/app/views/shared/_group_form.html.haml +++ b/app/views/shared/_group_form.html.haml @@ -17,7 +17,7 @@ %strong= parent.full_path + '/' = f.text_field :path, placeholder: 'open-source', class: 'form-control', autofocus: local_assigns[:autofocus] || false, required: true, - pattern: Gitlab::Regex::NAMESPACE_REGEX_STR_SIMPLE, + pattern: Gitlab::Regex::NAMESPACE_REGEX_STR_JS, title: 'Please choose a group name with no special characters.', "data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}" - if parent |