2015-06-05 13:57:01 -04:00
|
|
|
// Remove body class for any previous theme, re-add current one
|
2015-06-05 15:50:36 -04:00
|
|
|
$('body').removeClass('<%= Gitlab::Themes.body_classes %>')
|
2015-06-05 15:53:57 -04:00
|
|
|
$('body').addClass('<%= user_application_theme %>')
|
2015-06-10 17:08:10 -04:00
|
|
|
|
2015-10-05 11:22:47 -04:00
|
|
|
// Toggle container-fluid class
|
2015-10-05 12:09:05 -04:00
|
|
|
if ('<%= current_user.layout %>' === 'fluid') {
|
2015-10-05 11:22:47 -04:00
|
|
|
$('.content-wrapper').find('.container-fluid').removeClass('container-limited')
|
|
|
|
} else {
|
|
|
|
$('.content-wrapper').find('.container-fluid').addClass('container-limited')
|
|
|
|
}
|
|
|
|
|
2015-06-10 17:08:10 -04:00
|
|
|
// Re-enable the "Save" button
|
|
|
|
$('input[type=submit]').enable()
|
|
|
|
|
|
|
|
// Show the notice flash message
|
2015-06-05 18:01:45 -04:00
|
|
|
new Flash('<%= flash.discard(:notice) %>', 'notice')
|