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 7548410A7E for ; Fri, 5 Dec 2014 01:29:03 +0000 (UTC) Received: (qmail 2236 invoked by uid 500); 5 Dec 2014 01:28:57 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 2195 invoked by uid 500); 5 Dec 2014 01:28:57 -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 2183 invoked by uid 99); 5 Dec 2014 01:28:57 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Dec 2014 01:28:57 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 07BB0A1D8DE; Fri, 5 Dec 2014 01:28:57 +0000 (UTC) From: MMrko To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org Message-ID: Subject: [GitHub] cordova-lib pull request: CB-8043 CB-6462 CB-6105 Refactor orienta... Content-Type: text/plain Date: Fri, 5 Dec 2014 01:28:57 +0000 (UTC) GitHub user MMrko opened a pull request: https://github.com/apache/cordova-lib/pull/128 CB-8043 CB-6462 CB-6105 Refactor orientation preference support Fixes [CB-8043](https://issues.apache.org/jira/browse/CB-8043), [CB-6462](https://issues.apache.org/jira/browse/CB-6462) and [CB-6105](https://issues.apache.org/jira/browse/CB-6105). Touches [CB-6182](https://issues.apache.org/jira/browse/CB-6182). Adds support for the global & platform-specific orientation preference (iOS, WP8 and Firefox). Android and Amazon Fire OS already had this functionality. Additionally, platform-specific orientation preference now accepts user-defined values (e.g. `reverseLandscape` for Android or `UIInterfaceOrientationPortraitUpsideDown` for iOS). If need be I'd be happy to update the [docs](http://cordova.apache.org/docs/en/4.0.0/config_ref_index.md.html). Both iOS and WP8 APIs allow the developer to define an initial orientation as well as a set of supported orientations. For now, the platform-specific parsers for iOS and WP8 keep it simple and don't support defining the supported orientations (see [ios_parser.js](/MMrko/cordova-lib/tree/fix-orientation-pref/cordova-lib/src/cordova/metadata/ios_parser.js#L78-L102) & [wp8_parser.js](/MMrko/cordova-lib/tree/fix-orientation-pref/cordova-lib/src/cordova/metadata/wp8_parser.js#L62-L84)). As a future improvement the orientation preference could/should offer such granularity. Meanwhile, developers can resort to a custom approach in their builds. To help keep the code maintainable I added a [cordova-lib/src/configparser/supportedPreferences.json](/MMrko/cordova-lib/tree/fix-orientation-pref/cordova-lib/src/configparser/supportedPreferences.json) that lists the supported preferences and their values for each platform. Maintainer input would be appreciated on this since I wonder if the approach I took here is OK. Nevertheless, a central config for preferences seems necessary. Tested on OS X Mavericks & Windows 8 running VS 2013. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MMrko/cordova-lib fix-orientation-pref Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-lib/pull/128.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #128 ---- commit 3ab3c824fe2b67fede6bf75fa1731599152f3090 Author: Marko Raatikka Date: 2014-12-02T23:04:59Z CB-8043 CB-6462 CB-6105 Refactor orientation preference support (adds iOS, WP8 & Firefox OS) ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org For additional commands, e-mail: dev-help@cordova.apache.org