From 10a8d6a563d1efd44cb730e53dc4117a7ec3db86 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Fri, 22 Feb 2019 12:16:48 +0100 Subject: [PATCH] Implemented parsing share string --- view/theme/frio/templates/theme_settings.tpl | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/view/theme/frio/templates/theme_settings.tpl b/view/theme/frio/templates/theme_settings.tpl index 9f780471ec..1e1485586c 100644 --- a/view/theme/frio/templates/theme_settings.tpl +++ b/view/theme/frio/templates/theme_settings.tpl @@ -77,6 +77,37 @@ window.setInterval(GenerateShareString, 500); GenerateShareString(); + $(document).on("keyup", "#id_frio_share_string", function() { + theme = JSON.parse($("#id_frio_share_string").val()); + + if ($("#id_frio_nav_bg").length) { + $("#id_frio_nav_bg").val(theme.nav_bg); + } + + if ($("#id_frio_nav_icon_color").length) { + $("#id_frio_nav_icon_color").val(theme.nav_icon_color); + } + + if ($("#id_frio_link_color").length) { + $("#id_frio_link_color").val(theme.link_color); + } + + if ($("#id_frio_background_color").length) { + $("#id_frio_background_color").val(theme.background_color); + } + + if ($("#frio_contentbg_transp").length) { + $("#frio_contentbg_transp").val(theme.contentbg_transp); + } + + if ($("#id_frio_login_bg_image").length) { + $("#id_frio_login_bg_image").val(theme.login_bg_image); + } + + if ($("#id_frio_login_bg_color").length) { + $("#id_frio_login_bg_color").val(theme.login_bg_color); + } + }); // Create colorpickers $("#frio_nav_bg, #frio_nav_icon_color, #frio_background_color, #frio_link_color, #frio_login_bg_color").colorpicker({format: 'hex', align: 'left'});