cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [1/2] cordova-lib git commit: CB-6462 CB-6026 - Orientation preference now updates `UISupportedInterfaceOrientations~ipad` too.
Date Fri, 08 May 2015 01:40:16 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/master d6f2b1141 -> 76ecfd182


CB-6462 CB-6026 - Orientation preference now updates `UISupportedInterfaceOrientations~ipad`
too.

Also deleting iPad orientation values


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/93ab6b61
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/93ab6b61
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/93ab6b61

Branch: refs/heads/master
Commit: 93ab6b6174b579130efcd56f4a5c0fcebb93296f
Parents: d6f2b11
Author: Rachel Carvalho <rachel.carvalho@gmail.com>
Authored: Mon Apr 13 14:27:15 2015 -0400
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Thu May 7 16:56:28 2015 -0700

----------------------------------------------------------------------
 cordova-lib/spec-cordova/metadata/ios_parser.spec.js | 3 +++
 cordova-lib/src/cordova/metadata/ios_parser.js       | 4 ++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/93ab6b61/cordova-lib/spec-cordova/metadata/ios_parser.spec.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-cordova/metadata/ios_parser.spec.js b/cordova-lib/spec-cordova/metadata/ios_parser.spec.js
index d338b20..6ab42da 100644
--- a/cordova-lib/spec-cordova/metadata/ios_parser.spec.js
+++ b/cordova-lib/spec-cordova/metadata/ios_parser.spec.js
@@ -143,6 +143,7 @@ describe('ios project parser', function () {
                 getOrientation.andCallThrough();
                 wrapper(p.update_from_config(cfg), done, function() {
                     expect(plist_build.mostRecentCall.args[0].UISupportedInterfaceOrientations).toEqual([
'UIInterfaceOrientationPortrait', 'UIInterfaceOrientationPortraitUpsideDown' ]);
+                    expect(plist_build.mostRecentCall.args[0]['UISupportedInterfaceOrientations~ipad']).toEqual([
'UIInterfaceOrientationPortrait', 'UIInterfaceOrientationPortraitUpsideDown' ]);
                     expect(plist_build.mostRecentCall.args[0].UIInterfaceOrientation).toEqual([
'UIInterfaceOrientationPortrait' ]);
                 });
             });
@@ -150,6 +151,7 @@ describe('ios project parser', function () {
                 getOrientation.andReturn('');
                 wrapper(p.update_from_config(cfg), done, function() {
                     expect(plist_build.mostRecentCall.args[0].UISupportedInterfaceOrientations).toBeUndefined();
+                    expect(plist_build.mostRecentCall.args[0]['UISupportedInterfaceOrientations~ipad']).toBeUndefined();
                     expect(plist_build.mostRecentCall.args[0].UIInterfaceOrientation).toBeUndefined();
                 });
             });
@@ -157,6 +159,7 @@ describe('ios project parser', function () {
                 getOrientation.andReturn(p.helper.ORIENTATION_DEFAULT);
                 wrapper(p.update_from_config(cfg), done, function() {
                     expect(plist_build.mostRecentCall.args[0].UISupportedInterfaceOrientations).toBeUndefined();
+                    expect(plist_build.mostRecentCall.args[0]['UISupportedInterfaceOrientations~ipad']).toBeUndefined();
                     expect(plist_build.mostRecentCall.args[0].UIInterfaceOrientation).toBeUndefined();
                 });
             });

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/93ab6b61/cordova-lib/src/cordova/metadata/ios_parser.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/metadata/ios_parser.js b/cordova-lib/src/cordova/metadata/ios_parser.js
index ed5fff3..e182f88 100644
--- a/cordova-lib/src/cordova/metadata/ios_parser.js
+++ b/cordova-lib/src/cordova/metadata/ios_parser.js
@@ -86,17 +86,21 @@ ios_parser.prototype.update_from_config = function(config) {
             case 'portrait':
                 infoPlist['UIInterfaceOrientation'] = [ 'UIInterfaceOrientationPortrait'
];
                 infoPlist['UISupportedInterfaceOrientations'] = [ 'UIInterfaceOrientationPortrait',
'UIInterfaceOrientationPortraitUpsideDown' ];
+                infoPlist['UISupportedInterfaceOrientations~ipad'] = [ 'UIInterfaceOrientationPortrait',
'UIInterfaceOrientationPortraitUpsideDown' ];
                 break;
             case 'landscape':
                 infoPlist['UIInterfaceOrientation'] = [ 'UIInterfaceOrientationLandscapeLeft'
];
                 infoPlist['UISupportedInterfaceOrientations'] = [ 'UIInterfaceOrientationLandscapeLeft',
'UIInterfaceOrientationLandscapeRight' ];
+                infoPlist['UISupportedInterfaceOrientations~ipad'] = [ 'UIInterfaceOrientationLandscapeLeft',
'UIInterfaceOrientationLandscapeRight' ];
                 break;
             default:
                 infoPlist['UIInterfaceOrientation'] = [ orientation ];
                 delete infoPlist['UISupportedInterfaceOrientations'];
+                delete infoPlist['UISupportedInterfaceOrientations~ipad'];
         }
     } else {
         delete infoPlist['UISupportedInterfaceOrientations'];
+        delete infoPlist['UISupportedInterfaceOrientations~ipad'];
         delete infoPlist['UIInterfaceOrientation'];
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message