From nobody Sun Dec 22 14:01:13 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1556795900; cv=none; d=zoho.com; s=zohoarc; b=n6PQ7RiSeZOxam3WWvaTmmKp+iUdTYbWcBw6JpViIUjbph0l5+GouppayMYt19d28RZKlMBoIIaZ8DOAkJ3ruUT5A9RyXUt9xBzgpoytYXUM71QDfqgDM57GViZi2wwqxPlcpa8hUZ2XyIqjBhEyqgpiwnhUOuP1jZ9aFL1Bjmw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556795900; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=tgDRw5nnf2gZERDOvv1+ZPHPPerd+OkeXdovZ15grbk=; b=cnI8N9WXVmBwqGuC0/h5/0DvoCO3FFlhBP/n0Lr33hLPB0ZQ/Y1Mv7UBien+dh6tMP50GhSUxp/3dJhoBnLdzqm2aIWkqaB2ubrPm6bUYRHOLn80J+rtsyqAuSbDPX0csIlAbf/kg58daheLsShOWXCxvKomiX0c9Qsf1AKmymE= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1556795900695829.6454915906943; Thu, 2 May 2019 04:18:20 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 731F899C1D; Thu, 2 May 2019 11:18:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 67E351001E85; Thu, 2 May 2019 11:18:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5EAD13FB11; Thu, 2 May 2019 11:18:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x42BIHtg008995 for ; Thu, 2 May 2019 07:18:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9D078827A9; Thu, 2 May 2019 11:18:17 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 97D72827A8 for ; Thu, 2 May 2019 11:18:17 +0000 (UTC) Received: from mail-ot1-f68.google.com (mail-ot1-f68.google.com [209.85.210.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 43C32C00735C for ; Thu, 2 May 2019 11:18:10 +0000 (UTC) Received: by mail-ot1-f68.google.com with SMTP id s11so1711988otp.0 for ; Thu, 02 May 2019 04:18:10 -0700 (PDT) Received: from localhost.localdomain ([198.59.53.9]) by smtp.gmail.com with ESMTPSA id o1sm19095697otj.11.2019.05.02.04.18.08 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 May 2019 04:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DjPFPwZzGn4PTpbYkocaTXzwf3A035UsD1wjxc8kRqc=; b=OO9IjPnsIllk5ZS0ieX3lTrIKuT19NVfs/07zWnFQVqeCl/JA9IWFu/rFulrjDiwVI H3tU/W86g25btF0Pod2PRzKO02Lk8fjbQ6lS6/nMiiLsLiLYfpgkzuvvpWmLXVgkEgfM j/mUWjdvx3inX9hCxA9wnpoBF6s6lU3DFmwx4FgOKjvx/xR7kkiA/zD+eEiD/4Dfpb2E F/tFJnEYRcyV2sU5ux1roV6r+fLB1joihfZ5yAyzwvH5cXg0raZutkDk//AwbHJgIuDM sFRjUvoUEJ4mWUz4DJ/lLWYKoroLhoh7lHeiktafhHdrylb3ENq9nui1njv9EgiLb6za XiKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=DjPFPwZzGn4PTpbYkocaTXzwf3A035UsD1wjxc8kRqc=; b=IlhLUfx28k1GDS47S8zSEZPC4G9UfniyGqm8ZWsJ/UBYa7oEAam/5So9usfRg+JtsQ DNxyeIOmUuuAdDhLmNeWjNUnT4vl6CwFmnAiUFcyGFHy/YNlDNzhwNW1zUfXYarumWLF OLYNR+LnjVCpw8UDYgx58RXsKZ5G02KpGRaMGrEajrCtF2zaz5OOZKFNYuVLyjDWhbeH CdTVk409LxczoL0W2Mhm7nDZoEwbyg3bXS0fTTHfdGNrAyVIFwxO7LhFNJ5Y2bc9hQwY wSIHfhXvT0fjO0IVrdbbY1SVNeZiXeTJ1LEup47iTwbehmF1tUR65dokhK0Xb8wnqNKU QykA== X-Gm-Message-State: APjAAAXVKVpRMPgX+7kcYi1BtuA60TQbuOvvmu2qK/QuFb6VosA6P6yt SQmVtN66uvop9Ft6CSZh2nloSO9NBSE= X-Google-Smtp-Source: APXvYqyImCkMzbpX60OI8kdeQowDGfzwemfdD79hLx8cwv9t9TqxpM+vg5XLu+0r5VKniQwOwNKGnw== X-Received: by 2002:a9d:5c03:: with SMTP id o3mr1980434otk.184.1556795889421; Thu, 02 May 2019 04:18:09 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Thu, 2 May 2019 05:17:52 -0600 Message-Id: <20190502111804.15843-6-pbonzini@redhat.com> In-Reply-To: <20190502111804.15843-1-pbonzini@redhat.com> References: <20190502111804.15843-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 02 May 2019 11:18:10 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 02 May 2019 11:18:10 +0000 (UTC) for IP:'209.85.210.68' DOMAIN:'mail-ot1-f68.google.com' HELO:'mail-ot1-f68.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.117 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.210.68 mail-ot1-f68.google.com 209.85.210.68 mail-ot1-f68.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 05/17] mods: use classes instead of ids X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 02 May 2019 11:18:19 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" ids should be unique, avoid duplicating them. Signed-off-by: Paolo Bonzini --- mod.py | 12 ++++++------ static/js/config-editor.js | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/mod.py b/mod.py index 7184211..7d43715 100644 --- a/mod.py +++ b/mod.py @@ -260,7 +260,7 @@ TMPL_ENUM =3D """ {% endif %} {% endfor %} -
+
{% for opt, desc in schema.enums.items %} {% if opt =3D=3D value %} """ + TMPL_ENUM_DESC + """ @@ -268,7 +268,7 @@ TMPL_ENUM =3D """ {% endfor %}
{% for opt, desc in schema.enums.items %} -
+
""" + TMPL_ENUM_DESC + """
{% endfor %} @@ -276,7 +276,7 @@ TMPL_ENUM =3D """ """ =20 TMPL_ARRAY =3D """ - + {% for schema in members %} {{ schema }} {% endfor %} @@ -293,8 +293,8 @@ TMPL_MAP_ITEM =3D """
{{ item_schema.title }} - {{ item.name }} - + {{ item.name }} +
{{ item.html }} @@ -310,7 +310,7 @@ TMPL_MAP_ITEM =3D """ =20 TMPL_MAP =3D """
-
diff --git a/static/js/config-editor.js b/static/js/config-editor.js index f8c9454..56d0781 100644 --- a/static/js/config-editor.js +++ b/static/js/config-editor.js @@ -17,7 +17,7 @@ function save_done(btn, succeeded, error) { } =20 function collect_properties(btn, check_required) { - prefix =3D $(btn).parent().parent().find("#property-prefix").val(); + prefix =3D $(btn).parent().parent().find(".property-prefix").val(); properties =3D {}; $(btn).parent().parent().find(".project-property").each(function () { if (check_required && this.required && !this.value) { @@ -89,16 +89,16 @@ function map_add_item(btn) { return; } container =3D $(btn).parent().parent(); - tmpl =3D container.find("#item-template").html(); + tmpl =3D container.find(".item-template").html(); nt =3D $(tmpl) - nt.find("#item-name").html(name); - old =3D nt.find("#property-prefix").val(); - nt.find("#property-prefix").val(old + name + "."); + nt.find(".item-name").html(name); + old =3D nt.find(".property-prefix").val(); + nt.find(".property-prefix").val(old + name + "."); container.find(".items").append(nt); } function map_delete_item(btn) { - name =3D $(btn).parent().parent().parent().find("#item-name").html(); - prefix =3D $(btn).parent().parent().parent().find("#prefix").val(); + name =3D $(btn).parent().parent().parent().find(".item-name").html(); + prefix =3D $(btn).parent().parent().parent().find(".prefix").val(); if (!window.confirm("Really delete '" + name +"'?")) { return; } --=20 2.21.0 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel