diff options
Diffstat (limited to 'app/views/settings/preferences/update.js.erb')
-rw-r--r-- | app/views/settings/preferences/update.js.erb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/views/settings/preferences/update.js.erb b/app/views/settings/preferences/update.js.erb new file mode 100644 index 00000000000..8966dd3fd86 --- /dev/null +++ b/app/views/settings/preferences/update.js.erb @@ -0,0 +1,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') |