Remove tooltips settings for user

This commit is contained in:
Urban Rotnik 2020-04-28 12:37:57 +02:00
parent 8fa024ed10
commit 5c72200801
6 changed files with 1 additions and 45 deletions

View file

@ -76,19 +76,6 @@
);
}
// Initialize tooltips settings form
function tooltipSettings() {
var toggleInput = $('[name="tooltips_enabled"]');
toggleInput
.checkboxpicker({ onActiveCls: 'btn-toggle', offActiveCls: 'btn-toggle' });
if (toggleInput.attr('value') === 'true') {
toggleInput.prop('checked', true);
} else {
toggleInput.prop('checked', false);
}
}
// triggers submit action when the user clicks
function initTogglableSettingsForm() {
$('#togglable-settings-panel')
@ -148,6 +135,5 @@
initTimeZoneSelector();
initDateFormatSelector();
notificationsSettings();
tooltipSettings();
initTogglableSettingsForm();
})();

View file

@ -43,9 +43,6 @@ module Users
read_from_params(:system_message_notification_email) do |val|
@user.system_message_email_notification = val
end
read_from_params(:tooltips_enabled) do |val|
@user.settings[:tooltips_enabled] = val
end
if @user.save
respond_to do |format|
format.json do

View file

@ -43,8 +43,7 @@ class User < ApplicationRecord
recent: true,
recent_email: false,
system_message_email: false
},
tooltips_enabled: true
}
)
store_accessor :variables, :export_vars

View file

@ -37,7 +37,6 @@
data-atwho-repositories-url="<%= atwho_repositories_team_path(current_team) %>"
data-atwho-rep-items-url="<%= atwho_rep_items_team_path(current_team) %>"
data-atwho-menu-items="<%= atwho_menu_items_team_path(current_team) %>"
data-tooltips-enabled="<%= current_user.settings[:tooltips_enabled] %>"
<% end %>
>

View file

@ -127,26 +127,6 @@
</div>
</div>
</div>
<hr>
<div class="preferences-settings-container">
<h4><%= t('users.settings.account.preferences.edit.tips.title') %></h4>
<div class="row">
<div class="col-sm-2">
</div>
<div class="col-sm-10">
<p><%=t 'users.settings.account.preferences.edit.tips.text1' %></p>
<p><%=t 'users.settings.account.preferences.edit.tips.text2' %></p>
<div class="row">
<div class="col-sm-4">
<%=t 'users.settings.account.preferences.edit.tips.toggle' %>
</div>
<div class="col-sm-8">
<%= check_box_tag :tooltips_enabled, @user.settings[:tooltips_enabled] %>
</div>
</div>
</div>
</div>
</div>
<% end %>
<br>
</div>

View file

@ -1576,11 +1576,6 @@ en:
date_format_label: "Date format"
date_format_sublabel: "Date format setting affects all date display throughout application."
date_format_title: "Date format"
tips:
title: "Help Tips"
text1: "When you place your mouse cursor on a certain element in SciNote and hold it for a bit, a short and helpful description will appear."
text2: "If you feel confident in SciNote already, you can turn off these Help Tips."
toggle: "Show Help Tips"
update_flash: "Preferences successfully updated."
addons:
head_title: "Settings | Add-ons"