You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2013/10/08 02:20:42 UTC

git commit: Removed statusBar prefix from StatusBar plugin API

Updated Branches:
  refs/heads/plugins 48e6586e2 -> a381e82aa


Removed statusBar prefix from StatusBar plugin API


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

Branch: refs/heads/plugins
Commit: a381e82aa6ce936bdc870a301a31126868fbb0e0
Parents: 48e6586
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Oct 7 17:20:36 2013 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Oct 7 17:20:36 2013 -0700

----------------------------------------------------------------------
 statusbar/README.md              | 22 +++++++++++-----------
 statusbar/src/ios/CDVStatusBar.h |  6 +++---
 statusbar/src/ios/CDVStatusBar.m | 12 ++++++------
 statusbar/www/statusbar.js       | 12 ++++++------
 4 files changed, 26 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/a381e82a/statusbar/README.md
----------------------------------------------------------------------
diff --git a/statusbar/README.md b/statusbar/README.md
index 508fd97..9863f11 100644
--- a/statusbar/README.md
+++ b/statusbar/README.md
@@ -10,13 +10,13 @@ For iOS 7, to use the statusbar style functions, you need the addition of a key
 Methods
 -------
 
-- StatusBar.statusBarOverlaysWebView
+- StatusBar.overlaysWebView
 - StatusBar.styleDefault
 - StatusBar.styleLightContent
 - StatusBar.styleBlackTranslucent
 - StatusBar.styleBlackOpaque
-- StatusBar.statusBarBackgroundColorByName
-- StatusBar.statusBarBackgroundColorByHexString
+- StatusBar.backgroundColorByName
+- StatusBar.backgroundColorByHexString
 
 Properties
 --------
@@ -37,12 +37,12 @@ Permissions
             <key>UIViewControllerBasedStatusBarAppearance</key>
             <false/>
 
-StatusBar.statusBarOverlaysWebView
+StatusBar.overlaysWebView
 =================
 
 On iOS 7, make the statusbar overlay or not overlay the WebView.
 
-    StatusBar.statusBarOverlaysWebView(true);
+    StatusBar.overlaysWebView(true);
 
 Description
 -----------
@@ -58,8 +58,8 @@ Supported Platforms
 Quick Example
 -------------
 
-    StatusBar.statusBarOverlaysWebView(true);
-    StatusBar.statusBarOverlaysWebView(false);
+    StatusBar.overlaysWebView(true);
+    StatusBar.overlaysWebView(false);
 
 StatusBar.styleDefault
 =================
@@ -114,12 +114,12 @@ Supported Platforms
 - iOS
 
 
-StatusBar.statusBarBackgroundColorByName
+StatusBar.backgroundColorByName
 =================
 
 On iOS 7, when you set StatusBar.statusBarOverlaysWebView to false, you can set the background color of the statusbar by color name.
 
-    StatusBar.statusBarBackgroundColorByName("red");
+    StatusBar.backgroundColorByName("red");
 
 Supported color names are:
 
@@ -131,12 +131,12 @@ Supported Platforms
 
 - iOS
 
-StatusBar.statusBarBackgroundColorByHexString
+StatusBar.backgroundColorByHexString
 =================
 
 On iOS 7, when you set StatusBar.statusBarOverlaysWebView to false, you can set the background color of the statusbar by a hex string (#RRGGBB).
 
-    StatusBar.statusBarBackgroundColorByHexString("#C0C0C0");
+    StatusBar.backgroundColorByHexString("#C0C0C0");
 
 
 Supported Platforms

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/a381e82a/statusbar/src/ios/CDVStatusBar.h
----------------------------------------------------------------------
diff --git a/statusbar/src/ios/CDVStatusBar.h b/statusbar/src/ios/CDVStatusBar.h
index 3c9d573..f2ce759 100644
--- a/statusbar/src/ios/CDVStatusBar.h
+++ b/statusbar/src/ios/CDVStatusBar.h
@@ -29,14 +29,14 @@
 
 @property (atomic, assign) BOOL statusBarOverlaysWebView;
 
-- (void) statusBarOverlaysWebView:(CDVInvokedUrlCommand*)command;
+- (void) overlaysWebView:(CDVInvokedUrlCommand*)command;
 
 - (void) styleDefault:(CDVInvokedUrlCommand*)command;
 - (void) styleLightContent:(CDVInvokedUrlCommand*)command;
 - (void) styleBlackTranslucent:(CDVInvokedUrlCommand*)command;
 - (void) styleBlackOpaque:(CDVInvokedUrlCommand*)command;
 
-- (void) statusBarBackgroundColorByName:(CDVInvokedUrlCommand*)command;
-- (void) statusBarBackgroundColorByHexString:(CDVInvokedUrlCommand*)command;
+- (void) backgroundColorByName:(CDVInvokedUrlCommand*)command;
+- (void) backgroundColorByHexString:(CDVInvokedUrlCommand*)command;
 
 @end

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/a381e82a/statusbar/src/ios/CDVStatusBar.m
----------------------------------------------------------------------
diff --git a/statusbar/src/ios/CDVStatusBar.m b/statusbar/src/ios/CDVStatusBar.m
index e49bcd8..da4ae57 100644
--- a/statusbar/src/ios/CDVStatusBar.m
+++ b/statusbar/src/ios/CDVStatusBar.m
@@ -61,7 +61,7 @@
 
     setting  = @"StatusBarBackgroundColor";
     if ([self settingForKey:setting]) {
-        [self _statusBarBackgroundColorByHexString:[self settingForKey:setting]];
+        [self _backgroundColorByHexString:[self settingForKey:setting]];
     }
 }
 
@@ -97,7 +97,7 @@
     return _statusBarOverlaysWebView;
 }
 
-- (void) statusBarOverlaysWebView:(CDVInvokedUrlCommand*)command
+- (void) overlaysWebView:(CDVInvokedUrlCommand*)command
 {
     id value = [command.arguments objectAtIndex:0];
     if (!([value isKindOfClass:[NSNumber class]])) {
@@ -147,7 +147,7 @@
     [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque];
 }
 
-- (void) statusBarBackgroundColorByName:(CDVInvokedUrlCommand*)command
+- (void) backgroundColorByName:(CDVInvokedUrlCommand*)command
 {
     id value = [command.arguments objectAtIndex:0];
     if (!([value isKindOfClass:[NSString class]])) {
@@ -160,7 +160,7 @@
     }
 }
 
-- (void) _statusBarBackgroundColorByHexString:(NSString*)hexString
+- (void) _backgroundColorByHexString:(NSString*)hexString
 {
     unsigned int rgbValue = 0;
     NSScanner* scanner = [NSScanner scannerWithString:hexString];
@@ -170,7 +170,7 @@
     _statusBarBackgroundView.backgroundColor = [UIColor colorWithRed:((rgbValue & 0xFF0000) >> 16)/255.0 green:((rgbValue & 0xFF00) >> 8)/255.0 blue:(rgbValue & 0xFF)/255.0 alpha:1.0];
 }
 
-- (void) statusBarBackgroundColorByHexString:(CDVInvokedUrlCommand*)command
+- (void) backgroundColorByHexString:(CDVInvokedUrlCommand*)command
 {
     NSString* value = [command.arguments objectAtIndex:0];
     if (!([value isKindOfClass:[NSString class]])) {
@@ -181,7 +181,7 @@
         return;
     }
     
-    [self _statusBarBackgroundColorByHexString:value];
+    [self _backgroundColorByHexString:value];
 }
 
 

http://git-wip-us.apache.org/repos/asf/cordova-labs/blob/a381e82a/statusbar/www/statusbar.js
----------------------------------------------------------------------
diff --git a/statusbar/www/statusbar.js b/statusbar/www/statusbar.js
index b570881..a2a8249 100644
--- a/statusbar/www/statusbar.js
+++ b/statusbar/www/statusbar.js
@@ -26,8 +26,8 @@ var argscheck = require('cordova/argscheck'),
 var StatusBar = function() {
 };
 
-StatusBar.statusBarOverlaysWebView = function(doOverlay) {
-    exec(null, null, "StatusBar", "statusBarOverlaysWebView", [doOverlay]);
+StatusBar.overlaysWebView = function(doOverlay) {
+    exec(null, null, "StatusBar", "overlaysWebView", [doOverlay]);
 };
 
 StatusBar.styleDefault = function() {
@@ -46,12 +46,12 @@ StatusBar.styleBlackOpaque = function() {
     exec(null, null, "StatusBar", "styleBlackOpaque", []);
 };
 
-StatusBar.statusBarBackgroundColorByName = function(colorname) {
-    exec(null, null, "StatusBar", "statusBarBackgroundColorByName", [colorname]);
+StatusBar.backgroundColorByName = function(colorname) {
+    exec(null, null, "StatusBar", "backgroundColorByName", [colorname]);
 }
 
-StatusBar.statusBarBackgroundColorByHexString = function(hexString) {
-    exec(null, null, "StatusBar", "statusBarBackgroundColorByHexString", [hexString]);
+StatusBar.backgroundColorByHexString = function(hexString) {
+    exec(null, null, "StatusBar", "backgroundColorByHexString", [hexString]);
 }
 
 // TODO: