2017-09-11 15:44:42 +00:00
|
|
|
// Remove body class for any previous theme, re-add current one
|
|
|
|
$('body').removeClass('<%= Gitlab::Themes.body_classes %>')
|
|
|
|
$('body').addClass('<%= user_application_theme %>')
|
|
|
|
|
2015-10-05 15:22:47 +00:00
|
|
|
// Toggle container-fluid class
|
2015-10-05 16:09:05 +00:00
|
|
|
if ('<%= current_user.layout %>' === 'fluid') {
|
2016-09-19 23:02:52 +00:00
|
|
|
$('.content-wrapper .container-fluid').removeClass('container-limited')
|
2015-10-05 15:22:47 +00:00
|
|
|
} else {
|
2016-09-19 23:02:52 +00:00
|
|
|
$('.content-wrapper .container-fluid').addClass('container-limited')
|
2015-10-05 15:22:47 +00:00
|
|
|
}
|
|
|
|
|
2015-06-10 21:08:10 +00:00
|
|
|
// Re-enable the "Save" button
|
|
|
|
$('input[type=submit]').enable()
|
|
|
|
|
2020-02-06 12:10:29 +00:00
|
|
|
// Show flash messages
|
|
|
|
<% if flash.notice %>
|
|
|
|
new Flash('<%= flash.discard(:notice) %>', 'notice')
|
|
|
|
<% elsif flash.alert %>
|
|
|
|
new Flash('<%= flash.discard(:alert) %>', 'alert')
|
|
|
|
<% end %>
|