[Kimchi-devel] [PATCH] Bug 499 Fix: Disable download button of debug report when mobile
huoyuxin at linux.vnet.ibm.com
huoyuxin at linux.vnet.ibm.com
Mon Dec 8 07:47:26 UTC 2014
From: Yu Xin Huo <huoyuxin at linux.vnet.ibm.com>
Signed-off-by: Yu Xin Huo <huoyuxin at linux.vnet.ibm.com>
---
ui/js/src/kimchi.host.js | 2 +-
ui/js/src/kimchi.main.js | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/ui/js/src/kimchi.host.js b/ui/js/src/kimchi.host.js
index b75b9e4..295e4cc 100644
--- a/ui/js/src/kimchi.host.js
+++ b/ui/js/src/kimchi.host.js
@@ -290,7 +290,7 @@ kimchi.host_main = function() {
$(kimchi.substitute(buttonID, {
grid: reportGridID,
btn: n
- })).prop('disabled', !toEnable);
+ })).prop('disabled', (n=="download"&&kimchi.isMobile)||!toEnable);
});
};
var initReportGrid = function(reports) {
diff --git a/ui/js/src/kimchi.main.js b/ui/js/src/kimchi.main.js
index 1424827..3f08d82 100644
--- a/ui/js/src/kimchi.main.js
+++ b/ui/js/src/kimchi.main.js
@@ -27,6 +27,8 @@ kimchi.getCapabilities(function(result) {
kimchi.capabilities = {};
});
+kimchi.isMobile = /android|iphone|ipad/i.test(navigator.userAgent);
+
kimchi.main = function() {
kimchi.isLoggingOut = false;
kimchi.popable();
--
1.7.1
More information about the Kimchi-devel
mailing list