gitlab-org--gitlab-foss/app/assets/javascripts/pages/profiles/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
712 B
JavaScript
Raw Normal View History

import $ from 'jquery';
2018-02-23 16:18:24 +00:00
import '~/profile/gl_crop';
import Profile from '~/profile/profile';
import initSearchSettings from '~/search_settings';
import initPasswordPrompt from './password_prompt';
import { initTimezoneDropdown } from './init_timezone_dropdown';
2018-02-23 16:18:24 +00:00
// eslint-disable-next-line func-names
$(document).on('input.ssh_key', '#key_key', function () {
const $title = $('#key_title');
const comment = $(this)
.val()
.match(/^\S+ \S+ (.+)\n?$/);
2018-02-23 16:18:24 +00:00
// Extract the SSH Key title from its comment
if (comment && comment.length > 1) {
$title.val(comment[1]).change();
}
});
2018-02-23 16:18:24 +00:00
new Profile(); // eslint-disable-line no-new
initSearchSettings();
initPasswordPrompt();
initTimezoneDropdown();