debian-mirror-gitlab/app/views/profiles/preferences/update.js.erb

21 lines
702 B
Text
Raw Normal View History

2018-03-17 18:26:18 +05:30
// Remove body class for any previous theme, re-add current one
$('body').removeClass('<%= Gitlab::Themes.body_classes %>')
$('body').addClass('<%= user_application_theme %>')
2015-10-24 18:46:33 +05:30
// Toggle container-fluid class
if ('<%= current_user.layout %>' === 'fluid') {
2016-11-03 12:29:30 +05:30
$('.content-wrapper .container-fluid').removeClass('container-limited')
2015-10-24 18:46:33 +05:30
} else {
2016-11-03 12:29:30 +05:30
$('.content-wrapper .container-fluid').addClass('container-limited')
2015-10-24 18:46:33 +05:30
}
2015-09-11 14:41:01 +05:30
// Re-enable the "Save" button
$('input[type=submit]').enable()
2020-03-13 15:44:24 +05:30
// Show flash messages
<% if flash.notice %>
2020-11-24 15:15:51 +05:30
new Flash({ message: '<%= flash.discard(:notice) %>', type: 'notice'})
2020-03-13 15:44:24 +05:30
<% elsif flash.alert %>
2020-11-24 15:15:51 +05:30
new Flash({ message: '<%= flash.discard(:alert) %>', type: 'alert'})
2020-03-13 15:44:24 +05:30
<% end %>