[Kimchi-devel] [PATCH] Bug 499 Fix: Disable download button of debug report when mobile

Aline Manera alinefm at linux.vnet.ibm.com
Mon Dec 8 12:11:10 UTC 2014


Why should we disable Download debug reports on mobile browsers?

On 12/08/2014 05:47 AM, huoyuxin at linux.vnet.ibm.com wrote:
> 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();




More information about the Kimchi-devel mailing list