BigW Consortium Gitlab

update.js.erb 581 Bytes
Newer Older
1
// Remove body class for any previous theme, re-add current one
2
$('body').removeClass('<%= Gitlab::Themes.body_classes %>')
3
$('body').addClass('<%= user_application_theme %>')
4

5
// Toggle container-fluid class
6
if ('<%= current_user.layout %>' === 'fluid') {
7 8 9 10 11
  $('.content-wrapper').find('.container-fluid').removeClass('container-limited')
} else {
  $('.content-wrapper').find('.container-fluid').addClass('container-limited')
}

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

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