Need help with Code Gallery and Asynchronous module definition (AMD) namespaces
Asynchronous module definition (AMD) namespaces are what I believe is needed for the Code Gallery example Insert a Terms of Use link (https://support.geocortex.com/essentialsGSCCodeGallery?sub-nav=codegall&main-nav=essentials&#!/feedtype=SINGLE_ARTICLE_SEARCH_RESULT&id=kA4600000004EVM) at GVH 2.8 and newer. For background seem my older post (https://support.geocortex.com/essentialsGSCForum?sub-nav=forum&main-nav=essentials&#!/feedtype=SINGLE_QUESTION_DETAIL&id=906f2000000fxaeAAA) that leads to this one.
So in the Terms of Use sections of Desktop.json.js are
"type": "codegallery.TermsOfUseLinkView"
and
"type": "codegallery.TermsOfUseModuleViewModel",
both of which I believe need a "require": statement to follow them. My trouble is I need help in determining what Asynchronous module definition (AMD) namespaces to enter for these. By my current understanding, Code Gallery submissions are marooned by AMD namespaces. Can anyone help?
Thanks,
Justin
0
-
For the link view:
"require": "geocortex/framework/ui/ViewBase",And for the view model:
"require": "geocortex/framework/ui/ViewModelBase"0 -
Thank you Jared.
I'm not successful yet, though. I've put these lines in, refreshed the browser, cleared the cache, and the frame still opens with no content. But I also see the Chrome warning icon "This page is trying to load scripts from unauthenticated sources."
In the Terms of Use frame when I click Agree, Chrome warns me the site is trying to load unsafe scripts. If I click Load unsafe scripts, the address bar "https" gets crossed out. It puzzles me why the warning comes up in the first place. It puzzles me further when I click the Terms of Use link on a site to which I have not added the two require lines, the warning appears there, too. This is new. Makes me wonder if it be GVH 2.8-related, but I'm quite certain the warning did not appear when I started this forum thread. So where should I look?
Thanks,Justin
0 -
Justin, I just sent an email to another client quite literally 10 seconds ago with this link https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content. It's a very common web issue. The problem is with loading the viewer in HTTPS but the viewer is loading HTTP resources... This is likely from the viewerConfigBase parameter. It should be HTTPS too.. 0 -
Oh - I should add that it can also very lilely be from HTTP map services also. 0 -
Thanks Kevin, but (to your second reply) every map service in site.xml starts with https:// as has been the case for years and not changed. From your first reply, I can'ts see the viewerConfigBase parameter because of the shortened URLs. I have run out of time today to dig further, but I don't expect that to be at fault, because the problem occurs only when I click Terms of Use 0 -
What are you trying to load when you click the Terms of Use? Ours loads a simple webpage in that frame, which is HTTPS. If the contents from your frame are HTTP, it is probably getting blocked. 0 -
Thanks Dan. What is loading is the code from the Code Gallery example Insert a Terms of Use link (https://support.geocortex.com/essentialsGSCCodeGallery?sub-nav=codegall&main-nav=essentials&#!/feedtype=SINGLE_ARTICLE_SEARCH_RESULT&id=kA4600000004EVM) as mentioned above.
I don't believe it's trying to load http content, because the code worked beautifully before the upgrade to GVH 2.8. I need to know, then if there might be more than just the two "require:" statements in Jared's reply necessary to make the Insert a Terms of Use link code work with AMD namespaces, and if so, where they need to go, and what they need to be. Can someone please help with this?0 -
Yeah, that loads a website in the window that pops up. You set that URL in the config file for the site as the disclaimerLink. 0 -
Dan, I need help finding where to put that. Is what you are telling me something that's different from earlier versions of the GVH? I ask because the TOU worked perfectly before I upgraded. 0 -
I suggest going through the steps of implementing this solution again. You have to modify the site's config files to add code snippets. One of the things you add is the link to be displayed in the popup.
Maybe one or more of your customizations was overwritten during the upgrade.0 -
I had to give up on this because even a reimplementation did not help. I am instead using Dan Briggs' How to add a disclaimer popup to a map (https://support.geocortex.com/essentialsGSCCodeGallery?sub-nav=codegall&main-nav=essentials&#!/feedtype=SINGLE_ARTICLE_SEARCH_RESULT&id=kA460000000bllE) 0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
11 kommentarer