diff --git a/README.rdoc b/README.rdoc index 3923debd..60929591 100644 --- a/README.rdoc +++ b/README.rdoc @@ -110,9 +110,9 @@ For more information on features, please refer to the user guide rake redmine:plugins:migrate NAME=redmine_wktime VERSION=0 RAILS_ENV=production -=== Release Notes for v4.8 +=== Release Notes for v4.8.1 - - Redmine 6.0 compatibility. + - Sidebar-white theme related changes === Customization diff --git a/app/controllers/wkgltransaction_controller.rb b/app/controllers/wkgltransaction_controller.rb index 404359cf..d2b30677 100644 --- a/app/controllers/wkgltransaction_controller.rb +++ b/app/controllers/wkgltransaction_controller.rb @@ -107,12 +107,11 @@ def index end dup_summary = sort_direction == "desc" ? @summaryHash.to_a.reverse.to_h : @summaryHash + @summaryHashFirstKey = dup_summary.keys.first dup_summary.each do |key, value| getSummeryamount(key, value) @summaryHash[key][:CB] = @closeBal end - @summaryHashFirstKey = dup_summary.keys.first - else formPagination(transaction.reorder(sort_clause)) isSubCr = isSubtractCr(@selectedLedger.ledger_type) diff --git a/app/lib/send_patch/timelog_controller_patch.rb b/app/lib/send_patch/timelog_controller_patch.rb index 3398b217..3c43ef71 100644 --- a/app/lib/send_patch/timelog_controller_patch.rb +++ b/app/lib/send_patch/timelog_controller_patch.rb @@ -497,8 +497,8 @@ def find_time_entries @time_entries = WkMaterialEntry.where(:id => params[:id] || params[:ids]) raise ActiveRecord::RecordNotFound if @time_entries.empty? # =================================== - @projects = @time_entries.filter_map(&:project).uniq end + @projects = @time_entries.filter_map(&:project).uniq @project = @projects.first if @projects.size == 1 rescue ActiveRecord::RecordNotFound render_404 diff --git a/app/lib/wkdashboard/graph001_clock_in_users_over_time.rb b/app/lib/wkdashboard/graph001_clock_in_users_over_time.rb index 8968f656..4d034d66 100644 --- a/app/lib/wkdashboard/graph001_clock_in_users_over_time.rb +++ b/app/lib/wkdashboard/graph001_clock_in_users_over_time.rb @@ -22,7 +22,7 @@ def getDetailReport(param={}) entries = entries.group(:user_id, :start_time, :end_time).select("wk_attendances.user_id, start_time, end_time") entries = entries.where("group_id IN (?)", param[:group_id]) if param[:group_id].present? header = {user: l(:field_user), date: l(:field_start_date), clockin: l(:label_clock_in), clockout: l(:label_clock_out)} - data = entries.map{|e| { user_id: e.user.name, date: e&.start_time&.localtime&.to_date, clockin: e&.start_time&.localtime&.to_s(:time), clockout: e&.end_time&.localtime&.to_s(:time) }} + data = entries.map{|e| { user_id: e.user.name, date: e&.start_time&.localtime&.to_date, clockin: e&.start_time&.localtime&.strftime('%R') || '', clockout: e&.end_time&.localtime&.strftime('%R') || '' }} return {header: header, data: data} end diff --git a/app/views/settings/_tab_attendance.html.erb b/app/views/settings/_tab_attendance.html.erb index cca807c9..4c27256d 100644 --- a/app/views/settings/_tab_attendance.html.erb +++ b/app/views/settings/_tab_attendance.html.erb @@ -46,7 +46,7 @@ lblYear = "<%=l(:label_year) %>"; %> <%= select_tag('settings[wktime_break_time]', - options_for_select(breakTime, :selected => 'settings[wktime_break_time]'), :multiple=> true, :style => "width:200px; height:100px;")%> + options_for_select(breakTime, :selected => 'settings[wktime_break_time]'), :multiple=> true, :style => "width:200px; height:100px;", class: 'multi-row')%>
@@ -251,7 +251,7 @@ lblYear = "<%=l(:label_year) %>";
diff --git a/app/views/settings/_tab_purchase.html.erb b/app/views/settings/_tab_purchase.html.erb index fdc1cb11..22cf5833 100644 --- a/app/views/settings/_tab_purchase.html.erb +++ b/app/views/settings/_tab_purchase.html.erb @@ -62,7 +62,7 @@ %> <%= select_tag('settings[wktime_quote_components]', - options_for_select(invComps, :selected => 'settings[wktime_quote_components]'), :multiple=> true, :style => "min-width:140px; height:100px;")%> + options_for_select(invComps, :selected => 'settings[wktime_quote_components]'), :multiple=> true, :style => "min-width:140px; height:100px;", class: 'multi-row')%>
@@ -92,7 +92,7 @@ %> <%= select_tag('settings[wktime_po_components]', - options_for_select(invComps, :selected => 'settings[wktime_po_components]'), :multiple=> true, :style => "min-width:140px; height:100px;")%> + options_for_select(invComps, :selected => 'settings[wktime_po_components]'), :multiple=> true, :style => "min-width:140px; height:100px;", class: 'multi-row')%>
@@ -122,7 +122,7 @@ %> <%= select_tag('settings[wktime_si_components]', - options_for_select(invComps, :selected => 'settings[wktime_si_components]'), :multiple=> true, :style => "min-width:140px; height:100px;")%> + options_for_select(invComps, :selected => 'settings[wktime_si_components]'), :multiple=> true, :style => "min-width:140px; height:100px;", class: 'multi-row')%>
diff --git a/app/views/wkattendance/leavesettings.html.erb b/app/views/wkattendance/leavesettings.html.erb index 181e061d..dab985d3 100644 --- a/app/views/wkattendance/leavesettings.html.erb +++ b/app/views/wkattendance/leavesettings.html.erb @@ -53,7 +53,7 @@
<%= select_tag('settings[leave_settings]', - options_for_select(leave, :selected => 'settings[leave_settings]'), :multiple=> true, :style => "min-width:200px; height:100px;")%> + options_for_select(leave, :selected => 'settings[leave_settings]'), :multiple=> true, :style => "min-width:200px; height:100px;", class: 'multi-row')%>
diff --git a/app/views/wkbase/_base_header.html.erb b/app/views/wkbase/_base_header.html.erb index 8c26f890..63f7a371 100644 --- a/app/views/wkbase/_base_header.html.erb +++ b/app/views/wkbase/_base_header.html.erb @@ -5,17 +5,18 @@ <%= hidden_field_tag 'getspenttype_url', url_for(:controller => 'wklogmaterial', :action => 'loadSpentType') %> -<% if Setting.ui_theme.to_s.downcase == "sidebar" %> +<% if Setting.ui_theme.to_s.downcase == "sidebar" || (["sidebar_white", "sidebar-white"].include?(Setting.ui_theme.to_s.downcase)) %> <%= stylesheet_link_tag 'sidebar', :plugin => "redmine_wktime" %> <%= javascript_tag do %> $(function() { - $("#top-menu .wkdashboard").attr("title", "ERPmine"); + $("#top-menu .wkdashboard").prop("title", "ERPmine"); var topMenus = []; $("#top-menu ul li a").each(function() { - var classNames = ($(this).attr('class')).split(" "); + var classNames = $(this).prop('class'); + classNames = (classNames || "").split(" "); var menuItem = classNames[0]; if(menuItem == "wkdashboard" && $("#main-menu ul").children("li").length > 0) { - var firstMenu =$("#main-menu ul").children("li").find("a").first().attr("href"); + var firstMenu =$("#main-menu ul").children("li").find("a").first().prop("href"); if(firstMenu.match("^/wk") || firstMenu.match("^/rm")) { $("."+menuItem).parent('li').addClass("active"); } diff --git a/app/views/wkdocument/_links.html.erb b/app/views/wkdocument/_links.html.erb index 2e889e4e..66f562b5 100644 --- a/app/views/wkdocument/_links.html.erb +++ b/app/views/wkdocument/_links.html.erb @@ -1,11 +1,5 @@