From e92c130386d09a34f16a9835cda36ee0e434d9fb Mon Sep 17 00:00:00 2001 From: PhilW Date: Sat, 24 Feb 2018 17:50:40 +0000 Subject: [PATCH] check for valid values in data-hidden attr --- skins/elastic/ui.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js index d52896230..84c6beaf7 100644 --- a/skins/elastic/ui.js +++ b/skins/elastic/ui.js @@ -268,9 +268,10 @@ function rcube_elastic_ui() // buttons that should be hidden on small screen devices $('[data-hidden]').each(function() { var parent = $(this).parent('li'), - sizes = $(this).data('hidden').split(','); + re = /(large|big|small|phone)/g, m; - $(parent.length ? parent : this).addClass('hidden-' + sizes.join(' hidden-')); + while (m = re.exec($(this).data('hidden'))) + $(parent.length ? parent : this).addClass('hidden-' + m[1]); }); // Modify normal checkboxes on lists so they are different