[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16329373#comment-16329373 ] ASF GitHub Bot commented on CB-12132: - infil00p closed pull request #197: CB-12132: (android & ios) implement hidenotclose feature URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/197 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 1e0645c4..ffbd9c62 --- a/README.md +++ b/README.md @@ -114,6 +114,7 @@ instance, or the system browser. - __hardwareback__: set to `yes` to use the hardware back button to navigate backwards through the `InAppBrowser`'s history. If there is no previous page, the `InAppBrowser` will close. The default value is `yes`, so you must set it to `no` if you want the back button to simply close the InAppBrowser. - __mediaPlaybackRequiresUserAction__: Set to `yes` to prevent HTML5 audio or video from autoplaying (defaults to `no`). - __shouldPauseOnSuspend__: Set to `yes` to make InAppBrowser WebView to pause/resume with the app to stop background audio (this may be required to avoid Google Play issues like described in [CB-11013](https://issues.apache.org/jira/browse/CB-11013)). +- __hidenotclose__: set to 'yes' to make the done/close button hide the browser window rather than closing the browser (defaults to 'no') iOS only: @@ -131,6 +132,7 @@ instance, or the system browser. - __presentationstyle__: Set to `pagesheet`, `formsheet` or `fullscreen` to set the [presentation style](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (defaults to `fullscreen`). - __transitionstyle__: Set to `fliphorizontal`, `crossdissolve` or `coververtical` to set the [transition style](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (defaults to `coververtical`). - __toolbarposition__: Set to `top` or `bottom` (default is `bottom`). Causes the toolbar to be at the top or bottom of the window. +- __hidenotclose__: set to 'yes' to make the done/close button hide the browser window rather than closing the browser (defaults to 'no') Windows only: diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java index b54c2241..f8ccb9ee 100644 --- a/src/android/InAppBrowser.java +++ b/src/android/InAppBrowser.java @@ -77,6 +77,7 @@ Licensed to the Apache Software Foundation (ASF) under one private static final String SYSTEM = "_system"; private static final String EXIT_EVENT = "exit"; private static final String LOCATION = "location"; +private static final String HIDEWINDOW = "hidenotclose"; private static final String ZOOM = "zoom"; private static final String HIDDEN = "hidden"; private static final String LOAD_START_EVENT = "loadstart"; @@ -94,6 +95,7 @@ Licensed to the Apache Software Foundation (ASF) under one private EditText edittext; private CallbackContext callbackContext; private boolean showLocationBar = true; +private boolean hideNotClose = false; private boolean showZoomControls = true; private boolean openWindowHidden = false; private boolean clearAllCache = false; @@ -501,6 +503,15 @@ private boolean getShowLocationBar() { return this.showLocationBar; } +/** + * Should we hide instead of closing + * + * @return boolean + */ +private boolean getHideNotClose() { +return this.hideNotClose; +} + private InAppBrowser getInAppBrowser(){ return this; } @@ -517,12 +528,17 @@ public String showWebPage(final String url, HashMapfeatures) { showZoomControls = true; openWindowHidden = false; mediaPlaybackRequiresUserGesture = false; +hideNotClose = false; if (features != null) { Boolean show = features.get(LOCATION); if (show != null) { showLocationBar = show.booleanValue(); } +Boolean hideWin = features.get(HIDEWINDOW); +if (hideWin != null) { +hideNotClose = hideWin.booleanValue(); +} Boolean zoom = features.get(ZOOM); if (zoom != null) { showZoomControls = zoom.booleanValue(); @@ -704,7 +720,10 @@ public boolean onKey(View v, int keyCode, KeyEvent event) { close.setOnClickListener(new
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16329372#comment-16329372 ] ASF GitHub Bot commented on CB-12132: - infil00p commented on issue #197: CB-12132: (android & ios) implement hidenotclose feature URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/197#issuecomment-358428376 This hasn't been looked at in over a year and has conflicts, closing. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: cordova-plugin-inappbrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15721851#comment-15721851 ] ASF GitHub Bot commented on CB-12132: - Github user jcesarmobile commented on a diff in the pull request: https://github.com/apache/cordova-plugin-inappbrowser/pull/197#discussion_r90834795 --- Diff: README.md --- @@ -131,6 +132,7 @@ instance, or the system browser. - __presentationstyle__: Set to `pagesheet`, `formsheet` or `fullscreen` to set the [presentation style](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (defaults to `fullscreen`). - __transitionstyle__: Set to `fliphorizontal`, `crossdissolve` or `coververtical` to set the [transition style](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (defaults to `coververtical`). - __toolbarposition__: Set to `top` or `bottom` (default is `bottom`). Causes the toolbar to be at the top or bottom of the window. +- __hidenotclose__: set to 'yes' to make the done/close button hide the browser window rather than closing the browser (defaults to 'no') --- End diff -- yeah, it's for both, but the preference is documented for both too, so in the iOS section it should say "done" and in the Android section it should say "close" instead of saying "done/close" on both > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15721844#comment-15721844 ] ASF GitHub Bot commented on CB-12132: - Github user ghenry22 commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/197 I will look through the proposed changes next week and resolve conflicts > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15713418#comment-15713418 ] ASF GitHub Bot commented on CB-12132: - Github user jcesarmobile commented on a diff in the pull request: https://github.com/apache/cordova-plugin-inappbrowser/pull/197#discussion_r90559216 --- Diff: README.md --- @@ -131,6 +132,7 @@ instance, or the system browser. - __presentationstyle__: Set to `pagesheet`, `formsheet` or `fullscreen` to set the [presentation style](http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalPresentationStyle) (defaults to `fullscreen`). - __transitionstyle__: Set to `fliphorizontal`, `crossdissolve` or `coververtical` to set the [transition style](http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle) (defaults to `coververtical`). - __toolbarposition__: Set to `top` or `bottom` (default is `bottom`). Causes the toolbar to be at the top or bottom of the window. +- __hidenotclose__: set to 'yes' to make the done/close button hide the browser window rather than closing the browser (defaults to 'no') --- End diff -- Change done/close to just done as iOS has no close button > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15713421#comment-15713421 ] ASF GitHub Bot commented on CB-12132: - Github user jcesarmobile commented on a diff in the pull request: https://github.com/apache/cordova-plugin-inappbrowser/pull/197#discussion_r90559723 --- Diff: src/ios/CDVInAppBrowser.m --- @@ -815,6 +827,13 @@ - (void)close }); } +- (void)hide --- End diff -- As I said before, you can just remove this method if you call browserHide from the another hide > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15713422#comment-15713422 ] ASF GitHub Bot commented on CB-12132: - Github user jcesarmobile commented on a diff in the pull request: https://github.com/apache/cordova-plugin-inappbrowser/pull/197#discussion_r90559621 --- Diff: src/ios/CDVInAppBrowser.m --- @@ -246,25 +246,11 @@ - (void)show:(CDVInvokedUrlCommand*)command - (void)hide:(CDVInvokedUrlCommand*)command --- End diff -- Just make it ```- (void)hide:(CDVInvokedUrlCommand*)command { [self browserHide]; } There is no need to create a new hide method, you can call browserHide directly > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15713423#comment-15713423 ] ASF GitHub Bot commented on CB-12132: - Github user jcesarmobile commented on a diff in the pull request: https://github.com/apache/cordova-plugin-inappbrowser/pull/197#discussion_r90559822 --- Diff: src/ios/CDVInAppBrowser.h --- @@ -96,6 +97,7 @@ @property (nonatomic) NSURL* currentURL; - (void)close; +- (void)hide; --- End diff -- There is no need for this method > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15713420#comment-15713420 ] ASF GitHub Bot commented on CB-12132: - Github user jcesarmobile commented on a diff in the pull request: https://github.com/apache/cordova-plugin-inappbrowser/pull/197#discussion_r90560844 --- Diff: src/ios/CDVInAppBrowser.m --- @@ -568,7 +576,11 @@ - (void)createViews self.spinner.userInteractionEnabled = NO; [self.spinner stopAnimating]; -self.closeButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(close)]; +if (_browserOptions.hidenotclose != nil) { --- End diff -- This shows a warning > Comparison between pointer and integer ('int' and 'void *') Take a look how the other options are parsed and converted to booleans and do the same so you can use `if (browserOptions.hidenotclose)` > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15713419#comment-15713419 ] ASF GitHub Bot commented on CB-12132: - Github user jcesarmobile commented on a diff in the pull request: https://github.com/apache/cordova-plugin-inappbrowser/pull/197#discussion_r90559136 --- Diff: README.md --- @@ -114,6 +114,7 @@ instance, or the system browser. - __hardwareback__: set to `yes` to use the hardware back button to navigate backwards through the `InAppBrowser`'s history. If there is no previous page, the `InAppBrowser` will close. The default value is `yes`, so you must set it to `no` if you want the back button to simply close the InAppBrowser. - __mediaPlaybackRequiresUserAction__: Set to `yes` to prevent HTML5 audio or video from autoplaying (defaults to `no`). - __shouldPauseOnSuspend__: Set to `yes` to make InAppBrowser WebView to pause/resume with the app to stop background audio (this may be required to avoid Google Play issues like described in [CB-11013](https://issues.apache.org/jira/browse/CB-11013)). +- __hidenotclose__: set to 'yes' to make the done/close button hide the browser window rather than closing the browser (defaults to 'no') --- End diff -- change done/close to just close as the done button is for iOS > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15662470#comment-15662470 ] ASF GitHub Bot commented on CB-12132: - Github user ghenry22 commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/197 @jcesarmobile - updated to remove that duplicate code, tested in my app and it's working well. > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15662456#comment-15662456 ] ASF GitHub Bot commented on CB-12132: - Github user cordova-qa commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/197 Cordova CI Build has one or more failures. **Commit** - [Link](https://github.com/apache/cordova-plugin-inappbrowser/pull/197/commits/52d12445685f333a9c386287bab0d12b937c85bd) **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95/) | Builder Name | Console Output | Test Report | Device Logs | | :---: | :---: | :---: | :---:| | [Windows 8.1 Store]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=windows-8.1-store/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=windows-8.1-store/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=windows-8.1-store/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=windows-8.1-store/artifact/) | | [Windows 10 Store]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=windows-10-store/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=windows-10-store/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=windows-10-store/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=windows-10-store/artifact/) | | [Windows 8.1 Phone]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=windows-8.1-phone/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=windows-8.1-phone/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=windows-8.1-phone/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=windows-8.1-phone/artifact/) | | [iOS]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=ios/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=ios/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=ios/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=ios/artifact/) | | [Android]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=android/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=android/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=android/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/95//PLATFORM=android/artifact/) | > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15660644#comment-15660644 ] ASF GitHub Bot commented on CB-12132: - Github user ghenry22 commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/197 Oh I see now, sorry I misunderstood. I can definitely make that change > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15660463#comment-15660463 ] ASF GitHub Bot commented on CB-12132: - Github user jcesarmobile commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/197 I didn't meant to reuse the existing hide, but make the old hide just call the new browserHide as browserHide has the exact same code ```- (void)hide:(CDVInvokedUrlCommand*)command { [self browserHide]; }``` > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15659767#comment-15659767 ] ASF GitHub Bot commented on CB-12132: - Github user ghenry22 commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/197 The new methods follow what is implemented for close, where there are 2 close methods, one designed for the user to call and one for use with a selector that the done button will hit. In order to have minimal changes to the existing code and keep the logic consistent I have implemented the same for the hide method. You can just reuse the existing hide method as it expects a parameter which cannot be passed when it is used as a selector. Hence the 2 close methods as well. The browserHide method is implemented in line with the browserExit method again for consistent behaviour. While there is some code duplication it seems that it is necessary because of the different use cases, or called as selector vs called by user from javascript. I have implemented for iOS and android, I could possibly do windows as well but I don't have the devices to test other platforms. > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15659198#comment-15659198 ] Gaven Henry commented on CB-12132: -- The new methods follow what is implemented for close, where there are 2 close methods, one designed for the user to call and one for use with a selector that the done button will hit. In order to have minimal changes to the existing code and keep the logic consistent I have implemented the same for the hide method. You can just reuse the existing hide method as it expects a parameter which cannot be passed when it is used as a selector. Hence the 2 close methods as well. The browserHide method is implemented in line with the browserExit method again for consistent behaviour. While there is some code duplication it seems that it is necessary because of the different use cases, or called as selector vs called by user from javascript. I have implemented for iOS and android, I could possibly do windows as well but I don't have the devices to test other platforms. On Sat, Nov 12, 2016 at 7:45 AM +0800, "ASF GitHub Bot (JIRA)"wrote: [ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15658541#comment-15658541 ] ASF GitHub Bot commented on CB-12132: - Github user jcesarmobile commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/197 The existing hide and the new browserHide do exactly the same, can you make the old hide just call browserHide instead of duplicating code. Can you try adding this to other platforms too? -- This message was sent by Atlassian JIRA (v6.3.4#6332) > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15658541#comment-15658541 ] ASF GitHub Bot commented on CB-12132: - Github user jcesarmobile commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/197 The existing hide and the new browserHide do exactly the same, can you make the old hide just call browserHide instead of duplicating code. Can you try adding this to other platforms too? > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15656442#comment-15656442 ] ASF GitHub Bot commented on CB-12132: - Github user cordova-qa commented on the issue: https://github.com/apache/cordova-plugin-inappbrowser/pull/197 Cordova CI Build has completed successfully. **Commit** - [Link](https://github.com/apache/cordova-plugin-inappbrowser/pull/197/commits/ec563a7af77e9f74cc73be8fd1a606946d4b4809) **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94/) | Builder Name | Console Output | Test Report | Device Logs | | :---: | :---: | :---: | :---:| | [Windows 8.1 Store]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=windows-8.1-store/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=windows-8.1-store/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=windows-8.1-store/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=windows-8.1-store/artifact/) | | [Windows 10 Store]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=windows-10-store/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=windows-10-store/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=windows-10-store/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=windows-10-store/artifact/) | | [Windows 8.1 Phone]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=windows-8.1-phone/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=windows-8.1-phone/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=windows-8.1-phone/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=windows-8.1-phone/artifact/) | | [iOS]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=ios/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=ios/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=ios/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=ios/artifact/) | | [Android]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=android/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=android/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=android/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-inappbrowser-pr/94//PLATFORM=android/artifact/) | > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12132) Add hidenotcloseoption
[ https://issues.apache.org/jira/browse/CB-12132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15656423#comment-15656423 ] ASF GitHub Bot commented on CB-12132: - GitHub user ghenry22 opened a pull request: https://github.com/apache/cordova-plugin-inappbrowser/pull/197 CB-12132: (android & ios) implement hidenotclose feature ### Platforms affected android & ios ### What does this PR do? This adds a new option hidenotclose which can be passed to the inappbrowser. When set to yes the done button on iOS or the X button android will hide the web view instead of closing it. This allows the user to show/hide the web view multiple times without having to reload the content and you can clean up when you know they are done by calling close once. ### What testing has been done on this change? manually tested on both android and ios with both enabled and disabled settings. when disabled (as by default) existing behaviour is maintained ### Checklist - [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database - [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB- is the JIRA ID & "android" is the platform affected. - [O] Added automated test coverage as appropriate for this change. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ghenry22/cordova-plugin-inappbrowser hide_not_close Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-inappbrowser/pull/197.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 #197 commit ec563a7af77e9f74cc73be8fd1a606946d4b4809 Author: ghenry22Date: 2016-11-11T07:39:35Z CB-12132: (android & ios) implement hidenotclose feature This adds a new option hidenotclose which can be passed to the inappbrowser. When set to yes the done button on iOS or the X button android will hide the web view instead of closing it. This allows the user to show/hide the web view multiple times without having to reload the content and you can clean up when you know they are done by calling close once. > Add hidenotcloseoption > -- > > Key: CB-12132 > URL: https://issues.apache.org/jira/browse/CB-12132 > Project: Apache Cordova > Issue Type: New Feature > Components: Plugin InAppBrowser >Reporter: Gaven Henry >Priority: Minor > Labels: features > Original Estimate: 24h > Remaining Estimate: 24h > > add a new option for android and ios: > option: hidenotclose=yes > this makes the done button on iOS or the X button android hide the > inappbrowser webview instead of closing and destroying it. > this is useful when doing something like: > load a webview hidden (so it's nice and preloaded for the user) > use the show() method when the user clicks to see it > use the done/X button to hide the window > call the close() method when done to clean up > this allows us to start pre-loading the data, open and close the window > multiple times without having to reload and then to call close when done to > dispose of the view and clean up. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org