From 207e6f159f23de67231b97f5ebfae162ad3751c3 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 7 Apr 2015 10:16:36 +0200 Subject: [PATCH 01/44] Update SpinnerDialog.java --- src/android/SpinnerDialog.java | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/android/SpinnerDialog.java b/src/android/SpinnerDialog.java index 41e6352..ab09199 100644 --- a/src/android/SpinnerDialog.java +++ b/src/android/SpinnerDialog.java @@ -43,16 +43,39 @@ public void onCancel(DialogInterface dialog) { ProgressDialog dialog; if (isFixed) { - dialog = CallbackProgressDialog.show(cordova.getActivity(), title, message, true, false, null, callbackContext); + //If there is a progressDialog yet change the text + if (!SpinnerDialog.this.spinnerDialogStack.empty()) { + if (title != null) { + SpinnerDialog.this.spinnerDialogStack[SpinnerDialog.this.spinnerDialogStack.length-1].setTitle(title); + } + if (message!=null) { + SpinnerDialog.this.spinnerDialogStack[SpinnerDialog.this.spinnerDialogStack.length-1].setMessage(message); + } + } + else{ + dialog = CallbackProgressDialog.show(cordova.getActivity(), title, message, true, false, null, callbackContext); + SpinnerDialog.this.spinnerDialogStack.push(dialog); + } } else { - dialog = ProgressDialog.show(cordova.getActivity(), title, message, true, true, onCancelListener); + //If there is a progressDialog yet change the text + if (!SpinnerDialog.this.spinnerDialogStack.empty()) { + if (title != null) { + SpinnerDialog.this.spinnerDialogStack[SpinnerDialog.this.spinnerDialogStack.length-1].setTitle(title); + } + if (message!=null) { + SpinnerDialog.this.spinnerDialogStack[SpinnerDialog.this.spinnerDialogStack.length-1].setMessage(message); + } + } + else{ + dialog = ProgressDialog.show(cordova.getActivity(), title, message, true, true, onCancelListener); + SpinnerDialog.this.spinnerDialogStack.push(dialog); + } } if (title == null && message == null) { dialog.setContentView(new ProgressBar(cordova.getActivity())); } - SpinnerDialog.this.spinnerDialogStack.push(dialog); } }; @@ -72,6 +95,7 @@ public void run() { this.cordova.getActivity().runOnUiThread(runnable); } + return true; } From a8e1e2156ccdcaa34f8364913334f921d8ab25e8 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 7 Apr 2015 10:17:09 +0200 Subject: [PATCH 02/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index dc1137d..a53decb 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.2"> SpinnerDialog From 1cebe2f4c13b4d66fbfc07c3af91caff8e2f7d43 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 7 Apr 2015 10:19:24 +0200 Subject: [PATCH 03/44] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 0274c31..0658599 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,9 @@ or ```cordova plugin add https://github.com/Paldom/SpinnerDialog.git``` Add following to config.xml: `````` or `````` +## Update 07/04/2015 +Only one spinner dialog can be shown, if there is one yet, text and title will be changed. + ## Methods - `window.plugins.spinnerDialog.show` From 5294a81435deb541b23657af094af72f339ea254 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 7 Apr 2015 10:20:56 +0200 Subject: [PATCH 04/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index a53decb..5942738 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,7 +1,7 @@ SpinnerDialog From 6a2ac7260d3cc1b93c9f8c4aba0255e7d5641c17 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 7 Apr 2015 10:21:42 +0200 Subject: [PATCH 05/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 5942738..1232ab4 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,7 +1,7 @@ SpinnerDialog From c19eaa214f933cdd334bc9fa8aab0a131abecb03 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 7 Apr 2015 10:27:41 +0200 Subject: [PATCH 06/44] Update SpinnerDialog.java --- src/android/SpinnerDialog.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/android/SpinnerDialog.java b/src/android/SpinnerDialog.java index ab09199..6e042f8 100644 --- a/src/android/SpinnerDialog.java +++ b/src/android/SpinnerDialog.java @@ -45,11 +45,12 @@ public void onCancel(DialogInterface dialog) { if (isFixed) { //If there is a progressDialog yet change the text if (!SpinnerDialog.this.spinnerDialogStack.empty()) { + dialog = SpinnerDialog.this.spinnerDialogStack[SpinnerDialog.this.spinnerDialogStack.length-1]; if (title != null) { - SpinnerDialog.this.spinnerDialogStack[SpinnerDialog.this.spinnerDialogStack.length-1].setTitle(title); + dialog.setTitle(title); } if (message!=null) { - SpinnerDialog.this.spinnerDialogStack[SpinnerDialog.this.spinnerDialogStack.length-1].setMessage(message); + dialog.setMessage(message); } } else{ @@ -59,11 +60,12 @@ public void onCancel(DialogInterface dialog) { } else { //If there is a progressDialog yet change the text if (!SpinnerDialog.this.spinnerDialogStack.empty()) { + dialog = SpinnerDialog.this.spinnerDialogStack[SpinnerDialog.this.spinnerDialogStack.length-1]; if (title != null) { - SpinnerDialog.this.spinnerDialogStack[SpinnerDialog.this.spinnerDialogStack.length-1].setTitle(title); + dialog.setTitle(title); } if (message!=null) { - SpinnerDialog.this.spinnerDialogStack[SpinnerDialog.this.spinnerDialogStack.length-1].setMessage(message); + dialog.setMessage(message); } } else{ From 023fdbfafa6f8402a94e026c36bf83afc3c150b4 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 7 Apr 2015 10:34:03 +0200 Subject: [PATCH 07/44] Update SpinnerDialog.java --- src/android/SpinnerDialog.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/android/SpinnerDialog.java b/src/android/SpinnerDialog.java index 6e042f8..069663e 100644 --- a/src/android/SpinnerDialog.java +++ b/src/android/SpinnerDialog.java @@ -45,7 +45,7 @@ public void onCancel(DialogInterface dialog) { if (isFixed) { //If there is a progressDialog yet change the text if (!SpinnerDialog.this.spinnerDialogStack.empty()) { - dialog = SpinnerDialog.this.spinnerDialogStack[SpinnerDialog.this.spinnerDialogStack.length-1]; + dialog = SpinnerDialog.this.spinnerDialogStack.peek(); if (title != null) { dialog.setTitle(title); } @@ -60,7 +60,7 @@ public void onCancel(DialogInterface dialog) { } else { //If there is a progressDialog yet change the text if (!SpinnerDialog.this.spinnerDialogStack.empty()) { - dialog = SpinnerDialog.this.spinnerDialogStack[SpinnerDialog.this.spinnerDialogStack.length-1]; + dialog = SpinnerDialog.this.spinnerDialogStack.peek(); if (title != null) { dialog.setTitle(title); } From 4a94c70889197a3e9c4abdfd93dc908233eb9435 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 7 Apr 2015 10:34:19 +0200 Subject: [PATCH 08/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 1232ab4..77ed30b 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.3"> SpinnerDialog From 56054878367f7a02c3fbb6e2588ec83520006fe5 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 7 Apr 2015 11:58:08 +0200 Subject: [PATCH 09/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index a30dfd0..dbd30be 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -73,6 +73,9 @@ - (UIView *)overlay { - (void) show:(CDVInvokedUrlCommand*)command { callbackId = command.callbackId; + + //If there is a loading mask yet we hide it + [self hide]; title = [command argumentAtIndex:0]; message = [command argumentAtIndex:1]; From 765ede929cd20f48d1d6465509268abe97b592af Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 7 Apr 2015 11:58:19 +0200 Subject: [PATCH 10/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 77ed30b..9d09b03 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.4"> SpinnerDialog From a2e8bc5ead9bba5ae61d0567e3f0bfa19200df02 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 14 Apr 2015 16:33:57 +0200 Subject: [PATCH 11/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index dbd30be..faf377c 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -29,7 +29,7 @@ @implementation CDVSpinnerDialog @synthesize messageView = _messageView; -(CGRect)rectForView { - if ((NSFoundationVersionNumber <= 1047.25 /* 7.1 */) && UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) { + if ((NSFoundationVersionNumber <= NSFoundationVersionNumber_iOS_7_1) && UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) { return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.height, [UIScreen mainScreen].bounds.size.width); } return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.width, [UIScreen mainScreen].bounds.size.height); From 912228014a087b009fb26f2595165ed530d38b3e Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 14 Apr 2015 16:34:16 +0200 Subject: [PATCH 12/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 9d09b03..2ac1dd0 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.5"> SpinnerDialog From 160a3f591d9004f4b33732383933ffc1cf7f3ea5 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 14 Apr 2015 16:58:42 +0200 Subject: [PATCH 13/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index faf377c..885091a 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -29,9 +29,7 @@ @implementation CDVSpinnerDialog @synthesize messageView = _messageView; -(CGRect)rectForView { - if ((NSFoundationVersionNumber <= NSFoundationVersionNumber_iOS_7_1) && UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) { - return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.height, [UIScreen mainScreen].bounds.size.width); - } + //Since ios 8 screen bound are returned correctly return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.width, [UIScreen mainScreen].bounds.size.height); } From 200a0a2597e48026a5f0fdf11b5840f466b0da5e Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 14 Apr 2015 16:58:54 +0200 Subject: [PATCH 14/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 2ac1dd0..36a47fc 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.6"> SpinnerDialog From 3319882f8b915f199592502d496ce82b9bf0f14d Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 14 Apr 2015 17:09:29 +0200 Subject: [PATCH 15/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index 885091a..764b747 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -30,7 +30,7 @@ @implementation CDVSpinnerDialog -(CGRect)rectForView { //Since ios 8 screen bound are returned correctly - return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.width, [UIScreen mainScreen].bounds.size.height); + return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen].bounds.size.height, [UIScreen mainScreen]bounds].size.width); } - (void)handleTapGesture:(UITapGestureRecognizer *)gesture From 5d42d8d1569aaf1565085d253d6521055f85e8f2 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 14 Apr 2015 17:09:42 +0200 Subject: [PATCH 16/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 36a47fc..64fd4f0 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.7"> SpinnerDialog From cba72eb78a41d6ad8cba37793a7f3520bf5e1bd7 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 14 Apr 2015 17:16:03 +0200 Subject: [PATCH 17/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index 764b747..4fc32c9 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -30,7 +30,7 @@ @implementation CDVSpinnerDialog -(CGRect)rectForView { //Since ios 8 screen bound are returned correctly - return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen].bounds.size.height, [UIScreen mainScreen]bounds].size.width); + return CGRectMake( 0.0f, 0.0f, [UIScreen mainScreen].bounds.size.height, [[UIScreen mainScreen]bounds].size.width); } - (void)handleTapGesture:(UITapGestureRecognizer *)gesture From 0ea25ecd4c23eab6e3234c87ff71199a5854f084 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 14 Apr 2015 17:16:13 +0200 Subject: [PATCH 18/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 64fd4f0..b30ade5 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.8"> SpinnerDialog From f65f9fc754927da69dd740ec0d5fa66a45c48488 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 14 Apr 2015 17:27:54 +0200 Subject: [PATCH 19/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index 4fc32c9..b15aefb 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -29,8 +29,12 @@ @implementation CDVSpinnerDialog @synthesize messageView = _messageView; -(CGRect)rectForView { - //Since ios 8 screen bound are returned correctly - return CGRectMake( 0.0f, 0.0f, [UIScreen mainScreen].bounds.size.height, [[UIScreen mainScreen]bounds].size.width); + UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; + BOOL landscape = (orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight); + if(landscape){ + return CGRectMake( 0.0f, 0.0f, [UIScreen mainScreen].bounds.size.height, [[UIScreen mainScreen]bounds].size.width); + } + return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.width, [UIScreen mainScreen].bounds.size.height); } - (void)handleTapGesture:(UITapGestureRecognizer *)gesture From f6f475c1ab0a455e0118041eb5be6ca42cc99cbb Mon Sep 17 00:00:00 2001 From: javierClavei Date: Tue, 14 Apr 2015 17:28:07 +0200 Subject: [PATCH 20/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index b30ade5..1177e64 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.9"> SpinnerDialog From 066932076e589b5de05f7892db8f64c73dac6924 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 11 Nov 2015 11:03:13 +0100 Subject: [PATCH 21/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index b15aefb..1685707 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -29,11 +29,12 @@ @implementation CDVSpinnerDialog @synthesize messageView = _messageView; -(CGRect)rectForView { - UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; + /*UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; BOOL landscape = (orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight); if(landscape){ return CGRectMake( 0.0f, 0.0f, [UIScreen mainScreen].bounds.size.height, [[UIScreen mainScreen]bounds].size.width); } + return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.width, [UIScreen mainScreen].bounds.size.height);*/ return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.width, [UIScreen mainScreen].bounds.size.height); } From 7533f9b2f20034c7fc5c35731a0c5bd14e71125b Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 11 Nov 2015 11:03:31 +0100 Subject: [PATCH 22/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 1177e64..222c9cf 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.10"> SpinnerDialog From 6545c94e10039a0a27246104f55b36b0a58e504d Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 11:15:35 +0100 Subject: [PATCH 23/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index 1685707..7b55b54 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -52,7 +52,7 @@ - (void)handleTapGesture:(UITapGestureRecognizer *)gesture - (UIView *)overlay { if (!_overlay) { _overlay = [[UIView alloc] initWithFrame:self.rectForView]; - _overlay.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.35]; + _overlay.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.15]; _indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; _indicator.center = _overlay.center; [_indicator startAnimating]; @@ -60,8 +60,8 @@ - (UIView *)overlay { _messageView = [[UILabel alloc] initWithFrame: self.rectForView]; [_messageView setText: message == nil ? title : message]; - [_messageView setTextColor: [UIColor colorWithRed:1 green:1 blue:1 alpha:0.85]]; - [_messageView setBackgroundColor: [UIColor colorWithRed:0 green:0 blue:0 alpha:0]]; + [_messageView setTextColor: [UIColor colorWithRed:0 green:0 blue: alpha:1]]; + [_messageView setBackgroundColor: [UIColor colorWithRed:1 green:1 blue:1 alpha:1]]; [_messageView setTextAlignment: NSTextAlignmentCenter]; _messageView.center = (CGPoint){_overlay.center.x, _overlay.center.y + 40}; [_overlay addSubview:_messageView]; From 112d1f916a45a975b68fec24ac030c57a430c87b Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 11:15:54 +0100 Subject: [PATCH 24/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 222c9cf..2dbdcb6 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.11"> SpinnerDialog From e9cfba13fe81aca619ca18a716eedade6ed4a1ab Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 11:23:30 +0100 Subject: [PATCH 25/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index 7b55b54..b16c2ad 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -60,7 +60,7 @@ - (UIView *)overlay { _messageView = [[UILabel alloc] initWithFrame: self.rectForView]; [_messageView setText: message == nil ? title : message]; - [_messageView setTextColor: [UIColor colorWithRed:0 green:0 blue: alpha:1]]; + [_messageView setTextColor: [UIColor colorWithRed:0 green:0 blue:0 alpha:1]]; [_messageView setBackgroundColor: [UIColor colorWithRed:1 green:1 blue:1 alpha:1]]; [_messageView setTextAlignment: NSTextAlignmentCenter]; _messageView.center = (CGPoint){_overlay.center.x, _overlay.center.y + 40}; From 72a4aff8038f01ca9ed2fa053e8ff66ca62b1148 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 11:23:45 +0100 Subject: [PATCH 26/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 2dbdcb6..3912145 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.12"> SpinnerDialog From f09cdef305af0af7bf4f7a931f0a98d25c15d25b Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 11:29:17 +0100 Subject: [PATCH 27/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index b16c2ad..a3e6e28 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -61,7 +61,7 @@ - (UIView *)overlay { _messageView = [[UILabel alloc] initWithFrame: self.rectForView]; [_messageView setText: message == nil ? title : message]; [_messageView setTextColor: [UIColor colorWithRed:0 green:0 blue:0 alpha:1]]; - [_messageView setBackgroundColor: [UIColor colorWithRed:1 green:1 blue:1 alpha:1]]; + [_messageView setBackgroundColor: [UIColor colorWithRed:1 green:0 blue:0 alpha:1]]; [_messageView setTextAlignment: NSTextAlignmentCenter]; _messageView.center = (CGPoint){_overlay.center.x, _overlay.center.y + 40}; [_overlay addSubview:_messageView]; From 4db94542180f0c1929a3355334952b7dfce68446 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 11:29:36 +0100 Subject: [PATCH 28/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 3912145..af70764 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.13"> SpinnerDialog From b33442fda1692e56808dd3723dfcada94a9335a6 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 11:43:55 +0100 Subject: [PATCH 29/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index a3e6e28..03f97cd 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -38,6 +38,10 @@ -(CGRect)rectForView { return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.width, [UIScreen mainScreen].bounds.size.height); } +-(CGRect)rectForMessage { + return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.width/2, 200); +} + - (void)handleTapGesture:(UITapGestureRecognizer *)gesture { CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; @@ -58,7 +62,7 @@ - (UIView *)overlay { [_indicator startAnimating]; [_overlay addSubview:_indicator]; - _messageView = [[UILabel alloc] initWithFrame: self.rectForView]; + _messageView = [[UILabel alloc] initWithFrame: self.rectForMessage]; [_messageView setText: message == nil ? title : message]; [_messageView setTextColor: [UIColor colorWithRed:0 green:0 blue:0 alpha:1]]; [_messageView setBackgroundColor: [UIColor colorWithRed:1 green:0 blue:0 alpha:1]]; From 927ea3875482722595ff77aa492a291b2c627664 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 11:44:08 +0100 Subject: [PATCH 30/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index af70764..0dd0b69 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.14"> SpinnerDialog From 8efda5439f3cd6428ed71a9243df417b96dafa0d Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 11:53:22 +0100 Subject: [PATCH 31/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index 03f97cd..5386c3a 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -39,7 +39,7 @@ -(CGRect)rectForView { } -(CGRect)rectForMessage { - return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.width/2, 200); + return CGRectMake( 0.0f, 0.0f, 500, 150); } - (void)handleTapGesture:(UITapGestureRecognizer *)gesture @@ -56,7 +56,7 @@ - (void)handleTapGesture:(UITapGestureRecognizer *)gesture - (UIView *)overlay { if (!_overlay) { _overlay = [[UIView alloc] initWithFrame:self.rectForView]; - _overlay.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.15]; + _overlay.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.25]; _indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; _indicator.center = _overlay.center; [_indicator startAnimating]; From 7f6c5bafbe7e93951b3f139d1ae2e8a564439892 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 11:53:36 +0100 Subject: [PATCH 32/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 0dd0b69..7fb5d64 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.15"> SpinnerDialog From 10e95750e28bcdb2393ace2758cf55029e720670 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 12:05:21 +0100 Subject: [PATCH 33/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index 5386c3a..6cbf967 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -38,10 +38,6 @@ -(CGRect)rectForView { return CGRectMake( 0.0f, 0.0f, [[UIScreen mainScreen]bounds].size.width, [UIScreen mainScreen].bounds.size.height); } --(CGRect)rectForMessage { - return CGRectMake( 0.0f, 0.0f, 500, 150); -} - - (void)handleTapGesture:(UITapGestureRecognizer *)gesture { CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; @@ -56,16 +52,16 @@ - (void)handleTapGesture:(UITapGestureRecognizer *)gesture - (UIView *)overlay { if (!_overlay) { _overlay = [[UIView alloc] initWithFrame:self.rectForView]; - _overlay.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.25]; + _overlay.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.35]; _indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; _indicator.center = _overlay.center; [_indicator startAnimating]; [_overlay addSubview:_indicator]; - _messageView = [[UILabel alloc] initWithFrame: self.rectForMessage]; + _messageView = [[UILabel alloc] initWithFrame: self.rectForView]; [_messageView setText: message == nil ? title : message]; - [_messageView setTextColor: [UIColor colorWithRed:0 green:0 blue:0 alpha:1]]; - [_messageView setBackgroundColor: [UIColor colorWithRed:1 green:0 blue:0 alpha:1]]; + [_messageView setTextColor: [UIColor colorWithRed:1 green:1 blue:1 alpha:0.85]]; + [_messageView setBackgroundColor: [UIColor colorWithRed:0 green:0 blue:0 alpha:0]]; [_messageView setTextAlignment: NSTextAlignmentCenter]; _messageView.center = (CGPoint){_overlay.center.x, _overlay.center.y + 40}; [_overlay addSubview:_messageView]; @@ -90,7 +86,11 @@ - (void) show:(CDVInvokedUrlCommand*)command { UIViewController *rootViewController = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; + [self.overlay setAlpha:0.0]; [rootViewController.view addSubview:self.overlay]; + [UIView beginAnimations:nil context:nil]; + [self.overlay setAlpha:1.0]; + [UIView commitAnimations]; } From ee6cec3fb7de160747eb67591444b6a6bd2779ad Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 12:05:35 +0100 Subject: [PATCH 34/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 7fb5d64..6cf0781 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.16"> SpinnerDialog From 5f3ff56131ed5ce0eac06f9f4818ddcd128b77d0 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 12:17:29 +0100 Subject: [PATCH 35/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index 6cbf967..3f4229e 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -78,20 +78,25 @@ - (void) show:(CDVInvokedUrlCommand*)command { callbackId = command.callbackId; //If there is a loading mask yet we hide it - [self hide]; - + //[self hide]; + title = [command argumentAtIndex:0]; message = [command argumentAtIndex:1]; isFixed = [command argumentAtIndex:2]; - - UIViewController *rootViewController = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; - - [self.overlay setAlpha:0.0]; - [rootViewController.view addSubview:self.overlay]; - [UIView beginAnimations:nil context:nil]; - [self.overlay setAlpha:1.0]; - [UIView commitAnimations]; - + + //Si hay ya un loading cambiamos el texto + if (_overlay) { + [self.messageView setText: message == nil ? title : message]; + } + else{//Si no lo mostramos con un fadding + UIViewController *rootViewController = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; + + [self.overlay setAlpha:0.0]; + [rootViewController.view addSubview:self.overlay]; + [UIView beginAnimations:nil context:nil]; + [self.overlay setAlpha:1.0]; + [UIView commitAnimations]; + } } - (void) hide:(CDVInvokedUrlCommand*)command { From 30de43868833e8f2a7781e360d76bcd672bf908c Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 12:17:45 +0100 Subject: [PATCH 36/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 6cf0781..c58a3d2 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.17"> SpinnerDialog From 9a37311fa37b7941eed5a21dfb09d8f9b875716f Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 12:30:04 +0100 Subject: [PATCH 37/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index 3f4229e..a3e2ef1 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -86,7 +86,7 @@ - (void) show:(CDVInvokedUrlCommand*)command { //Si hay ya un loading cambiamos el texto if (_overlay) { - [self.messageView setText: message == nil ? title : message]; + [_messageView setText: message == nil ? title : message]; } else{//Si no lo mostramos con un fadding UIViewController *rootViewController = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; From a4048c0b9daf6850882aaa850c0e6c8e3a5133e6 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 12:30:33 +0100 Subject: [PATCH 38/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index c58a3d2..d4ffbca 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.18"> SpinnerDialog From 1b4b846ca6a8ba81dff9ca93d5acf627fec1c731 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 15:22:32 +0100 Subject: [PATCH 39/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index a3e2ef1..3da54ba 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -84,11 +84,11 @@ - (void) show:(CDVInvokedUrlCommand*)command { message = [command argumentAtIndex:1]; isFixed = [command argumentAtIndex:2]; - //Si hay ya un loading cambiamos el texto + /* //Si hay ya un loading cambiamos el texto if (_overlay) { [_messageView setText: message == nil ? title : message]; } - else{//Si no lo mostramos con un fadding + else{//Si no lo mostramos con un fadding*/ UIViewController *rootViewController = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; [self.overlay setAlpha:0.0]; @@ -96,7 +96,7 @@ - (void) show:(CDVInvokedUrlCommand*)command { [UIView beginAnimations:nil context:nil]; [self.overlay setAlpha:1.0]; [UIView commitAnimations]; - } + //} } - (void) hide:(CDVInvokedUrlCommand*)command { From 949f98efb13da3bd44a8d82f8e0fb13aafab2c38 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 15:22:46 +0100 Subject: [PATCH 40/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index d4ffbca..0089594 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.19"> SpinnerDialog From d99d24fe31cb562f1863fd1538a19920d5f34f38 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 15:52:35 +0100 Subject: [PATCH 41/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index 3da54ba..5a2b71e 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -84,11 +84,12 @@ - (void) show:(CDVInvokedUrlCommand*)command { message = [command argumentAtIndex:1]; isFixed = [command argumentAtIndex:2]; - /* //Si hay ya un loading cambiamos el texto + //Si hay ya un loading cambiamos el texto if (_overlay) { [_messageView setText: message == nil ? title : message]; + //[self.messageView setText: message == nil ? title : message]; } - else{//Si no lo mostramos con un fadding*/ + else{//Si no lo mostramos con un fadding UIViewController *rootViewController = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; [self.overlay setAlpha:0.0]; @@ -96,7 +97,7 @@ - (void) show:(CDVInvokedUrlCommand*)command { [UIView beginAnimations:nil context:nil]; [self.overlay setAlpha:1.0]; [UIView commitAnimations]; - //} + } } - (void) hide:(CDVInvokedUrlCommand*)command { From 81fe7615b305e4284accd93fc6215cd41914510a Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 15:53:02 +0100 Subject: [PATCH 42/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 0089594..2f25b62 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.20"> SpinnerDialog From cdbaf0462d8099f7ce31d0a0f704edaeeeb94b9b Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 16:05:00 +0100 Subject: [PATCH 43/44] Update CDVSpinnerDialog.m --- src/ios/CDVSpinnerDialog.m | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ios/CDVSpinnerDialog.m b/src/ios/CDVSpinnerDialog.m index 5a2b71e..b549925 100644 --- a/src/ios/CDVSpinnerDialog.m +++ b/src/ios/CDVSpinnerDialog.m @@ -87,7 +87,6 @@ - (void) show:(CDVInvokedUrlCommand*)command { //Si hay ya un loading cambiamos el texto if (_overlay) { [_messageView setText: message == nil ? title : message]; - //[self.messageView setText: message == nil ? title : message]; } else{//Si no lo mostramos con un fadding UIViewController *rootViewController = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; From a3cccf2ea8dc4cfc7798136f57ce4fd30238e7c0 Mon Sep 17 00:00:00 2001 From: javierClavei Date: Wed, 15 Nov 2017 16:05:15 +0100 Subject: [PATCH 44/44] Update plugin.xml --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 2f25b62..692d2e9 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.3.21"> SpinnerDialog