Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C7E3BEB5D for ; Tue, 12 Mar 2013 18:59:16 +0000 (UTC) Received: (qmail 52500 invoked by uid 500); 12 Mar 2013 18:59:16 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 52471 invoked by uid 500); 12 Mar 2013 18:59:16 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 52463 invoked by uid 99); 12 Mar 2013 18:59:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Mar 2013 18:59:16 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of shazron@gmail.com designates 209.85.216.172 as permitted sender) Received: from [209.85.216.172] (HELO mail-qc0-f172.google.com) (209.85.216.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Mar 2013 18:59:09 +0000 Received: by mail-qc0-f172.google.com with SMTP id b25so82669qca.31 for ; Tue, 12 Mar 2013 11:58:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=3+mFV8W1ufB3cNQDIWjAerxJvPCcugwx5WiFGqGzm/Y=; b=PcRhpbW7aAknjlayWOg+V3c4Yxgg2ckOuC7yzlTDC9qqupWUaWMs1Ix5YYfVbYrKXY eze4tD21rvzJYVhW9hEqULFqgLlp7s8+cIYoJ+N6vOVc7fErVQ0VmHut1vfmQNHV2Csh vD/SiFABSU1zDQWr+U3Q4fR0af2QdKZEKiLTYsNRAq93h2J8rZN5Dnc87gCM+ZtQb9Fo aahNw3ALP6KESVBuTl5+EzVVeLkQ0nBWrOgIACnM7/dRhJ3nehr0Gtt85V4Yg3H0pbc4 qGReqj8UJYTqmNy0x7EYaEMvj9gEkSA1o1g6w1l3HoH7jAj8Fiml5YZrvBghh3hXmp7l iyHw== X-Received: by 10.229.206.89 with SMTP id ft25mr5686086qcb.27.1363114728965; Tue, 12 Mar 2013 11:58:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.49.34.138 with HTTP; Tue, 12 Mar 2013 11:58:08 -0700 (PDT) In-Reply-To: References: From: Shazron Date: Tue, 12 Mar 2013 11:58:08 -0700 Message-ID: Subject: Re: prompt dialog for the Notification API? To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=0016e6d3862f35b34304d7bee161 X-Virus-Checked: Checked by ClamAV on apache.org --0016e6d3862f35b34304d7bee161 Content-Type: text/plain; charset=ISO-8859-1 +1 go for it (echoing Michal) On Mon, Mar 11, 2013 at 2:04 PM, James Jong wrote: > I was looking at the Notification API and noticed that we have existing > support for alert and confirm dialogs but do not have one for prompt. I > think it would good to add this missing function to the Notification API. > It seems a natural fit alongside the alert and confirm methods. > > To mirror the current dialogs in the Notification API, the js method would > look something like: > navigator.notification.prompt(message, promptCallback, [title], > [buttonLabels]) > message: Dialog message to display (String) > promptCallback: Callback to invoke with index of button pressed (1 or 2). > (Function) > title: Dialog title (String) (Optional, Default: "Prompt") > buttonLabels: Comma separated string with button labels (String) > (Optional, Default: "OK,Cancel") > > The goal would be to have this across all our supported platforms. I > would like to create a JIRA item and have sub-tasks for each platform. I > plan on contributing the code for iOS and Android. I also will update > mobile-spec tests and write the API documentation. > > My questions are: > (1) Is this a reasonable addition to the Notification API? > (2a) If so, can we initially have support for a few platforms and add more > as we go along? > (2b) Can we go ahead and publicly document the API or wait until we have > support across the platforms? > > If we agree this is good to have, here's the summary of tasks I plan to > proceed with: > create a JIRA issue with sub-tasks for each platform > contribute the code for iOS and Android > add prompt tests to mobile-spec > create the prompt API documentation > > Thoughts or comments? > > -James Jong --0016e6d3862f35b34304d7bee161--