Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 3A578E00826; Mon, 27 Feb 2017 17:25:57 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [192.55.52.120 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id D3FDFE004D2 for ; Mon, 27 Feb 2017 17:25:55 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2017 17:25:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,216,1484035200"; d="scan'208";a="938780762" Received: from skhalsa-mobl1.amr.corp.intel.com (HELO jalamego-MOBL2.amr.corp.intel.com) ([10.254.178.181]) by orsmga003.jf.intel.com with ESMTP; 27 Feb 2017 17:25:55 -0800 From: Jose Lamego To: yocto@yoctoproject.org Date: Mon, 27 Feb 2017 19:25:35 -0600 Message-Id: <1488245135-7709-4-git-send-email-jose.a.lamego@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488245135-7709-1-git-send-email-jose.a.lamego@linux.intel.com> References: <1488245135-7709-1-git-send-email-jose.a.lamego@linux.intel.com> Subject: [patchwork][PATCH 3/3] series.js: add patch-selection-checkbox control functions X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2017 01:25:57 -0000 This change adds control functions for individual and multiple selection checkboxes. [YOCTO #10822] Signed-off-by: Jose Lamego --- htdocs/js/series.js | 145 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 125 insertions(+), 20 deletions(-) diff --git a/htdocs/js/series.js b/htdocs/js/series.js index bd75790..c4bbb0e 100644 --- a/htdocs/js/series.js +++ b/htdocs/js/series.js @@ -1,27 +1,47 @@ $(document).ready(function(){ $('[data-toggle="tooltip"]').tooltip() revTab=document.getElementById('revs-list') - coverView=document.getElementById('cover-letter-view'), - patchView=document.getElementById('patch-view'), + coverView=document.getElementById('cover-letter-view') + patchView=document.getElementById('patch-view') patchList=document.getElementById('patches-list') - + patchesInput=$( "input[name^='patches']" ) + seriesForms=document.getElementById('seriesForm') + var patches = new Array() + if ($( patchesInput[0] ).value){ + patches=json_decode($( patchesInput[0] ).value, true) + } + else{ + patches=[] + } revTab.style.border='none' revTab.style.background='transparent' revTab.style.padding='15px' coverView.style.display='block' patchView.style.display='none' patchList.style.display='none' + seriesForms.style.display='none' document.getElementById('cover-letter-tab').onclick=function(){ coverView.style.display='block' patchView.style.display='none' patchList.style.display='none' + patches=[] + for (i=0; i') + }) + }) + + $( "input[name^='patch_id']" ).change(function(){ + patchView.style.display="none" + uncheck_allSel() + var p_id=$(this).attr('name').replace('patch_id:', '') + if ($(this).prop('checked')){ + insert_patchId(p_id) + for (i=0; i