Skip to content

Commit

Permalink
OTWO-7263 Fix conflicting css class (#1791)
Browse files Browse the repository at this point in the history
  • Loading branch information
Priya5 authored Jul 25, 2024
1 parent 2ecde26 commit 9cda888
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions app/assets/javascripts/admin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var AdminDashboard = {
init: function() {
$('input[name="radio"]').attr("autocomplete", "off");
$('.account').hide().filter('#three_months').show();
$('.account_admin_view').hide().filter('#three_months').show();
$('input[name="options"]').change( function() {
AdminDashboard.update_chart($('input[name="radio"]').filter(':checked').val());
})
Expand All @@ -12,12 +12,12 @@ var AdminDashboard = {
update_chart: function(filter) {
if(filter == 'weekly') {
var contClass = $('input[name="options"]').filter(':checked').data('div');
$('.account').hide().filter('#' + contClass).show();
$('.account_admin_view').hide().filter('#' + contClass).show();
}
else if(filter == 'monthly'){
var contClass = $('input[name="options"]').filter(':checked').data('div');
$('.account').hide().filter('#' + contClass + '_monthly').show();
$('.account_admin_view').hide().filter('#' + contClass + '_monthly').show();
}
}
}
setTimeout("AdminDashboard.init()", 900);
setTimeout("AdminDashboard.init()", 900);
2 changes: 1 addition & 1 deletion app/helpers/stacks_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ def stack_similar_project_list(projects)
def stack_country_flag(code)
return '' unless code && code.size == 2

haml_tag 'img', src: "/assets/flags/#{code.downcase}.gif"
haml_tag 'img', src: asset_url("flags/#{code.downcase}.gif")
end
end
12 changes: 6 additions & 6 deletions app/views/oh_admin/dashboard/_accounts_trend_graph.html.haml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
:ruby
chart_path = charts_oh_admin_accounts_path.to_s

#three_months.account
#three_months.account_admin_view
%h1 3 Months Accounts Creation Trend
.chart{ 'datasrc' => chart_path + '?period=3' + '&filter_by=weekly' }

#six_months.account
#six_months.account_admin_view
%h1 6 Months Accounts Creation Trend
.chart{ 'datasrc' => chart_path + '?period=6' + '&filter_by=weekly'}

#one_year.account
#one_year.account_admin_view
%h1 1 Year Accounts Creation Trend
.chart{ 'datasrc' => chart_path + '?period=12' + '&filter_by=weekly'}

#three_months_monthly.account
#three_months_monthly.account_admin_view
%h1 3 Months Accounts Creation Trend
.chart{ 'datasrc' => chart_path + '?period=3' + '&filter_by=monthly'}

#six_months_monthly.account
#six_months_monthly.account_admin_view
%h1 6 Months Accounts Creation Trend
.chart{ 'datasrc' => chart_path + '?period=6' + '&filter_by=monthly'}

#one_year_monthly.account
#one_year_monthly.account_admin_view
%h1 1 Year Accounts Creation Trend
.chart{ 'datasrc' => chart_path + '?period=12' + '&filter_by=monthly'}

0 comments on commit 9cda888

Please sign in to comment.