Merge pull request #14252 from rohitwaghchaure/leaderboard_translation_issue

[Fix] Translation issue in leaderboard
This commit is contained in:
rohitwaghchaure 2018-05-28 15:51:00 +05:30 committed by GitHub
commit a8c6ec27c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,7 +85,7 @@ frappe.Leaderboard = Class.extend({
this.$sidebar_list.on('click', 'li', function(e) {
let $li = $(this);
let doctype = $li.find('span').html();
let doctype = $li.find('span').attr("doctype-value");
me.options.selected_company = frappe.defaults.get_default('company');
me.options.selected_doctype = doctype;
@ -172,7 +172,7 @@ frappe.Leaderboard = Class.extend({
$container.find(".leaderboard-list").html(me.render_list_view(res.message));
} else {
me.$graph_area.hide();
me.message = "No items found.";
me.message = __("No items found.");
$container.find(".leaderboard-list").html(me.render_list_view());
}
},
@ -301,7 +301,7 @@ frappe.Leaderboard = Class.extend({
get_sidebar_item: function(item) {
return $(`<li class="strong module-sidebar-item">
<a class="module-link">
<span>${ item }</span></a>
<span doctype-value="${item}">${ __(item) }</span></a>
</li>`);
}
});