summaryrefslogtreecommitdiff
path: root/app/views/profiles/preferences/update.js.erb
blob: 8966dd3fd862fe8bc3dd4c4c20a6fcb84375fa86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Remove body class for any previous theme, re-add current one
$('body').removeClass('<%= Gitlab::Themes.body_classes %>')
$('body').addClass('<%= user_application_theme %>')

// Toggle container-fluid class
if ('<%= current_user.layout %>' === 'fluid') {
  $('.content-wrapper .container-fluid').removeClass('container-limited')
} else {
  $('.content-wrapper .container-fluid').addClass('container-limited')
}

// Re-enable the "Save" button
$('input[type=submit]').enable()

// Show the notice flash message
new Flash('<%= flash.discard(:notice) %>', 'notice')