cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Woghiren (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-1933) Using comma in button labels
Date Fri, 15 Feb 2013 20:41:13 GMT

    [ https://issues.apache.org/jira/browse/CB-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13579489#comment-13579489
] 

Max Woghiren commented on CB-1933:
----------------------------------

Here's a set of pull requests to deal with this issue.

https://github.com/apache/cordova-android/pull/12
https://github.com/apache/cordova-ios/pull/16
https://github.com/apache/cordova-js/pull/11
https://github.com/apache/cordova-mobile-spec/pull/6

The Android and iOS commits change the button label parameter in Notification.confirm from
a comma-separated String to an array.

The js commit determines the platform, and if it's Android or iOS, processes the given button
labels into an array.  If it's another platform, it processes them into a comma-separated
string.  (This relies on the Android and JS pull requests.)

The mobile-spec commit adds a second manual confirm test that uses an array of strings to
specify the button labels, one of which has a comma.

Other platforms need to support the array format for button labels.  As this is done, the
js needs to be updated to massage the data correctly (ie. the list of platforms for which
to ensure the button labels are in array form needs to be updated).

Since the string format is deprecated, we can eventually clean this up more when we only support
the array format.  Namely, platform specific stuff in the js can be removed, along with the
irrelevant mobile-spec test.  Upon release, the documentation will need to be updated as well.

---

If there's a better approach to making this change, please let me know.  This is an externally-facing
change that can't really be accomplished without changing the API.  The gradual per-platform
implementation stuff is sort of annoying though, and I'm not sure if there's a better way
to go about it.
                
> Using comma in button labels
> ----------------------------
>
>                 Key: CB-1933
>                 URL: https://issues.apache.org/jira/browse/CB-1933
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Android, CordovaJS
>            Reporter: Ingo Bürk
>            Assignee: Max Woghiren
>            Priority: Minor
>
> It's currently not possible to use comma in button labels when creating confirm dialogs.
This would be useful for buttons like "Yes, Delete".
> Probably a good idea for implementation would be allowing an array as the buttonLabels
argument, e.g.
>  
> {code}navigator.notification.confirm('Alert!', function(){}, function(){}, 'Title', ['Yes,
Do It', 'No']);{code}
> For compatibility it shouldn't be a problem to detect whether a string or an array has
been passed and act accordingly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message