From 7fbeb0afeed24fb975eed1e532ede8ee9695d206 Mon Sep 17 00:00:00 2001 From: Saurabh Date: Wed, 24 Jan 2018 19:25:42 +0530 Subject: [PATCH 1/2] [fix] check for exact label match to avoid duplication --- frappe/public/js/frappe/ui/page.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frappe/public/js/frappe/ui/page.js b/frappe/public/js/frappe/ui/page.js index 076b443e32..038d0eb27b 100644 --- a/frappe/public/js/frappe/ui/page.js +++ b/frappe/public/js/frappe/ui/page.js @@ -263,7 +263,7 @@ frappe.ui.Page = Class.extend({ var $li = $('
  • '+ label +'
  • '), $link = $li.find("a").on("click", click); - if (this.is_in_group_button_dropdown(parent, `${item_selector}:contains('${label}')`, label)) return; + if (this.is_in_group_button_dropdown(parent, item_selector, label)) return; if(standard===true) { $li.appendTo(parent); @@ -289,7 +289,10 @@ frappe.ui.Page = Class.extend({ if (!label || !parent) return false; - const result = $(parent).find(`${selector}:contains('${label}')`); + const result = $(parent).find(`${selector}:contains('${label}')`) + .filter(function() { + return $(this).text() === label; + }); return result.length > 0; }, From cb6342a565dcac2ca6d5c37a1452e663bb82a32a Mon Sep 17 00:00:00 2001 From: Saurabh Date: Wed, 24 Jan 2018 20:05:01 +0600 Subject: [PATCH 2/2] bumped to version 10.0.15 --- frappe/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/__init__.py b/frappe/__init__.py index b79a3460cf..188eca0fd8 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -14,7 +14,7 @@ import os, sys, importlib, inspect, json from .exceptions import * from .utils.jinja import get_jenv, get_template, render_template, get_email_from_template -__version__ = '10.0.14' +__version__ = '10.0.15' __title__ = "Frappe Framework" local = Local()