[bitbake-devel] [PATCH 22/27] toaster: All Machines fix reset search link
Alex DAMIAN
alexandru.damian at intel.com
Mon Feb 9 18:01:52 UTC 2015
From: Michael Wood <michael.g.wood at intel.com>
In firefox this link wasn't valid as it was inside a button element.
Remove this and add a click handler for the button.
Signed-off-by: Michael Wood <michael.g.wood at intel.com>
---
lib/toaster/toastergui/static/js/machines.js | 5 +++++
lib/toaster/toastergui/templates/machines.html | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/toaster/toastergui/static/js/machines.js b/lib/toaster/toastergui/static/js/machines.js
index 1b7ea36..ee8c980 100644
--- a/lib/toaster/toastergui/static/js/machines.js
+++ b/lib/toaster/toastergui/static/js/machines.js
@@ -90,4 +90,9 @@ function machinesPageInit (ctx) {
window.location.replace(ctx.projectPageUrl);
}, null);
});
+
+ $("#show-all-btn").click(function(){
+ $("#search").val("")
+ $("#searchform").submit();
+ });
}
diff --git a/lib/toaster/toastergui/templates/machines.html b/lib/toaster/toastergui/templates/machines.html
index 9930a94..f63e897 100644
--- a/lib/toaster/toastergui/templates/machines.html
+++ b/lib/toaster/toastergui/templates/machines.html
@@ -34,7 +34,7 @@
{% if objects.paginator.count != 0 %}
{{objects.paginator.count}} machines found
{% else %}
- No Machines found
+ No machines found
{% endif %}
{% else %}
@@ -54,7 +54,7 @@
<input type="hidden" name="orderby" value="">
<input type="hidden" name="page" value="1">
<button class="btn" type="submit" value="Search">Search</button>
- <button type="submit" class="btn btn-link"><a href="{%url 'machines' %}">Show all machines</a></button>
+ <button type="submit" class="btn btn-link" id="show-all-btn">Show all machines</button>
</form>
</div>
{% else %}
--
1.9.1
More information about the bitbake-devel
mailing list