From 5dafb02cbfa795c9fbffde8dd95930805c1332f0 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Wed, 14 Mar 2018 23:58:26 +0300 Subject: [PATCH] Resize checkboxes only when they are visible --- code/html/custom.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/code/html/custom.js b/code/html/custom.js index d423a801..577b4029 100644 --- a/code/html/custom.js +++ b/code/html/custom.js @@ -559,9 +559,9 @@ function toggleMenu() { function showPanel() { $(".panel").hide(); - $("#" + $(this).attr("data")).show(); if ($("#layout").hasClass("active")) { toggleMenu(); } - $("input[type='checkbox']"). + $("#" + $(this).attr("data")).show(). + find("input[type='checkbox']"). iphoneStyle("calculateDimensions"). iphoneStyle("refresh"); } @@ -674,9 +674,13 @@ function addSchedule(event) { }); $(line).find(".button-del-schedule").on("click", delSchedule); $(line).find(".button-more-schedule").on("click", moreSchedule); - var ena = $(line).find(":checkbox"); - ena.prop("checked", false).iphoneStyle("refresh"); line.appendTo("#schedules"); + + $(line).find("input[type='checkbox']"). + prop("checked", false). + iphoneStyle("calculateDimensions"). + iphoneStyle("refresh"); + return line; }