mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 21:49:18 +00:00
chore: fix linting issues
This commit is contained in:
@@ -27,10 +27,10 @@ window.get_product_list = function() {
|
||||
}
|
||||
|
||||
window.render_product_list = function(data) {
|
||||
var table = $("#search-list .table");
|
||||
let table = $("#search-list .table");
|
||||
if(data.length) {
|
||||
if(!table.length)
|
||||
var table = $("<table class='table'>").appendTo("#search-list");
|
||||
table = $("<table class='table'>").appendTo("#search-list");
|
||||
|
||||
$.each(data, function(i, d) {
|
||||
$(d).appendTo(table);
|
||||
@@ -38,11 +38,13 @@ window.render_product_list = function(data) {
|
||||
}
|
||||
if(data.length < 10) {
|
||||
if(!table) {
|
||||
let message = __("No products found.");
|
||||
$(".more-btn")
|
||||
.replaceWith("<div class='alert alert-warning'>{{ _("No products found.") }}</div>");
|
||||
.replaceWith(`<div class='alert alert-warning'>{{ ${message} }}</div>`);
|
||||
} else {
|
||||
let message = __("Nothing more to show.");
|
||||
$(".more-btn")
|
||||
.replaceWith("<div class='text-muted'>{{ _("Nothing more to show.") }}</div>");
|
||||
.replaceWith(`<div class='text-muted'>{{ ${message} }}</div>`);
|
||||
}
|
||||
} else {
|
||||
$(".more-btn").toggle(true)
|
||||
|
||||
@@ -72,7 +72,7 @@ frappe.ready(function() {
|
||||
|
||||
var more_items = function(item, item_status){
|
||||
if(item_status) {
|
||||
var item_status = $('.project-'+ item +'-section .btn-group .bold').hasClass('btn-completed-'+ item)
|
||||
item_status = $('.project-'+ item +'-section .btn-group .bold').hasClass('btn-completed-'+ item)
|
||||
? 'completed' : 'open';
|
||||
}
|
||||
$.ajax({
|
||||
|
||||
Reference in New Issue
Block a user