From 648e9c4dc892cdf9c93730355d954a665a3e76a0 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 4 Dec 2015 14:44:34 -0500 Subject: [PATCH] fix #3889 --- public/src/admin/appearance/skins.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/public/src/admin/appearance/skins.js b/public/src/admin/appearance/skins.js index b057c740c8..8f838ca8c2 100644 --- a/public/src/admin/appearance/skins.js +++ b/public/src/admin/appearance/skins.js @@ -10,8 +10,13 @@ define('admin/appearance/skins', function() { $('body').append(scriptEl); $('#skins').on('click', function(e){ - var target = $(e.target), - action = target.attr('data-action'); + var target = $(e.target); + + if (!target.attr('data-action')) { + target = target.parents('[data-action]'); + } + + var action = target.attr('data-action'); if (action && action === 'use') { var parentEl = target.parents('[data-theme]'), @@ -19,6 +24,7 @@ define('admin/appearance/skins', function() { cssSrc = parentEl.attr('data-css'), themeId = parentEl.attr('data-theme'); + socket.emit('admin.themes.set', { type: themeType, id: themeId,