Commit 1fbc4886 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Corrected JS for new master js build updates [ci skip]

parent ddfd09c0
...@@ -47,6 +47,7 @@ require('./behaviors/details_behavior'); ...@@ -47,6 +47,7 @@ require('./behaviors/details_behavior');
require('./behaviors/quick_submit'); require('./behaviors/quick_submit');
require('./behaviors/requires_input'); require('./behaviors/requires_input');
require('./behaviors/toggler_behavior'); require('./behaviors/toggler_behavior');
require('./behaviors/bind_in_out');
// blob // blob
require('./blob/blob_ci_yaml'); require('./blob/blob_ci_yaml');
......
...@@ -41,8 +41,4 @@ class BindInOut { ...@@ -41,8 +41,4 @@ class BindInOut {
} }
} }
const global = window.gl || (window.gl = {}); export default BindInOut;
global.BindInOut = BindInOut;
module.exports = BindInOut;
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
/* global Labels */ /* global Labels */
/* global Shortcuts */ /* global Shortcuts */
import BindInOut from './behaviors/bind_in_out.js.es6';
const ShortcutsBlob = require('./shortcuts_blob'); const ShortcutsBlob = require('./shortcuts_blob');
const UserCallout = require('./user_callout'); const UserCallout = require('./user_callout');
...@@ -217,7 +219,9 @@ const UserCallout = require('./user_callout'); ...@@ -217,7 +219,9 @@ const UserCallout = require('./user_callout');
break; break;
case 'groups:new': case 'groups:new':
case 'admin:groups:new': case 'admin:groups:new':
gl.BindInOut.initAll(); case 'groups:create':
case 'admin:groups:create':
BindInOut.initAll();
case 'groups:new': case 'groups:new':
case 'admin:groups:new': case 'admin:groups:new':
case 'groups:edit': case 'groups:edit':
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
%strong= parent.full_path + '/' %strong= parent.full_path + '/'
= f.text_field :path, placeholder: 'open-source', class: 'form-control', = f.text_field :path, placeholder: 'open-source', class: 'form-control',
autofocus: local_assigns[:autofocus] || false, required: true, 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.', title: 'Please choose a group name with no special characters.',
"data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}" "data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}"
- if parent - if parent
......
const BindInOut = require('~/behaviors/bind_in_out'); import BindInOut from '~/behaviors/bind_in_out.js.es6';
const ClassSpecHelper = require('../helpers/class_spec_helper'); import ClassSpecHelper from '../helpers/class_spec_helper.js.es6';
describe('BindInOut', function () { describe('BindInOut', function () {
describe('.constructor', function () { describe('.constructor', function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment