Needs work
Project:
DrupalGap
Version:
7.x-1.10
Component:
Mobile Application Development Kit Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Mar 2015 at 17:48 UTC
Updated:
22 Dec 2015 at 01:48 UTC
Jump to comment: Most recent
Comments
Comment #1
coolman7 commentedComment #2
tyler.frankenstein commentedPlease spend some time looking at the Documentation on drupalgap.org, many topics are already covered and won't need a support issue. Here is information on External Links:
http://drupalgap.org/node/524
Comment #3
coolman7 commentedI added InAppBrowser plugin. Works with a minor issue.
Comment #4
coolman7 commentedIt would be better to have an option to open default browser (like Chrome, Firefox or any other system default browser) instead of InAppBrowser but as far as I searched on internet, it is not so easy.
I want to open Google Play Store page of current app. InAppBrowser gives an error message for market:// type links, but opens Play Store correctly. It works but if I can open default browser, I may not have that error message.
Comment #5
tyler.frankenstein commentedOk, thank you for clarifying. Yes, it is difficult to open in the default browser, I've never gotten it to work.
Comment #6
tyler.frankenstein commentedThis is possible if you use _system as the target: http://plugins.cordova.io/#/package/org.apache.cordova.inappbrowser
DrupalGap doesn't support this yet, so you'll have to build your link manually, like so:
Comment #7
coolman7 commentedThanks for info.
If the drupalgap code will be changed like this, all the time external (system) browser will be used. Or there could be implemented another option like UseSystemBrowser. If UseSystemBrowser is false, target will be "_blank", if UseSystemBrowser is true, target will be "_system"
line 5547 of drupalgap.js:
Comment #8
eudaemonia commentedI'm using
<a href="#" onclick="window.open('web address', '_system');" linked text</a>to get links to open in a system browser and it's working great, but I have to do this manually: I have to open each individual piece of content and edit the html, which isn't feasible on at least one of my apps.Is there anyway to place a condition in the .js that would apply this automatically to links?
Comment #9
tyler.frankenstein commented@eudaemonia, please clarify what you mean by this.
Comment #10
eudaemonia commentedI have a content type foo that has a body field that more often than not contains one or more html links in the body field. Every time content of the type foo is created (by myself, a user, or an rss feed) if the body field has a link in it, I have to node/edit to apply the code above to each link in the body field.
Comment #11
tyler.frankenstein commentedI'd recommend expanding upon the http://drupalgap.org/project/pathfix module, or deriving from it the functionality you desire.