From 4f02193f050666ff70821a6d8ef2ac2a744ef3fd Mon Sep 17 00:00:00 2001 From: David Reyna Date: Fri, 14 Mar 2014 00:26:32 -0700 Subject: bitbake: toaster: warn new filter replaces existing filter If the user pop-ups a filter dialog when another filter is already active, warn the user that the new filter would replace the previous filter. [YOCTO #5960] (Bitbake rev: 6be58123fcdb0ff20de2a88315e1e3012effd1d3) Signed-off-by: David Reyna Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/static/css/default.css | 1 + bitbake/lib/toaster/toastergui/templates/filtersnippet.html | 5 +++++ bitbake/lib/toaster/toastergui/templatetags/projecttags.py | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css b/bitbake/lib/toaster/toastergui/static/css/default.css index 53a3fee19f..d960f4bd83 100644 --- a/bitbake/lib/toaster/toastergui/static/css/default.css +++ b/bitbake/lib/toaster/toastergui/static/css/default.css @@ -105,6 +105,7 @@ select { width: auto; } .no-results { margin: 10px 0; } .task-name { margin-left: 7px; } .icon-hand-right {color: #ccccc; } +.help-inline { margin: 5px; } diff --git a/bitbake/lib/toaster/toastergui/templates/filtersnippet.html b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html index e0e1181878..a72eeaa125 100644 --- a/bitbake/lib/toaster/toastergui/templates/filtersnippet.html +++ b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html @@ -28,6 +28,11 @@ diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py index e7b23cbff2..39e92ce776 100644 --- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py +++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py @@ -188,6 +188,12 @@ def string_slice(strvar,slicevar): else: return strvar[int(first):int(last)] +@register.filter +def string_remove_regex(value,ex): + """ remove sub-string of string that matches regex + """ + return re.sub(ex, '', value) + @register.filter def filtered_installedsize(size, installed_size): """If package.installed_size not null and not empty return it, -- cgit v1.2.3-54-g00ecf