cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject [11/35] git commit: Removed statusBar prefix from StatusBar plugin API
Date Thu, 13 Mar 2014 19:58:40 GMT
Removed statusBar prefix from StatusBar plugin API



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

Branch: refs/heads/master
Commit: 4be7bcc82626c047117a80c802158a9be095e16a
Parents: b61eaae
Author: Shazron Abdullah <shazron@apache.org>
Authored: Mon Oct 7 17:20:36 2013 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Mon Oct 7 17:20:36 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cordova-statusbar/blob/4be7bcc8/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 508fd97..9863f11 100644
--- a/README.md
+++ b/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-statusbar/blob/4be7bcc8/src/ios/CDVStatusBar.h
----------------------------------------------------------------------
diff --git a/src/ios/CDVStatusBar.h b/src/ios/CDVStatusBar.h
index 3c9d573..f2ce759 100644
--- a/src/ios/CDVStatusBar.h
+++ b/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-statusbar/blob/4be7bcc8/src/ios/CDVStatusBar.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m
index e49bcd8..da4ae57 100644
--- a/src/ios/CDVStatusBar.m
+++ b/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-statusbar/blob/4be7bcc8/www/statusbar.js
----------------------------------------------------------------------
diff --git a/www/statusbar.js b/www/statusbar.js
index b570881..a2a8249 100644
--- a/www/statusbar.js
+++ b/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:


Mime
View raw message