tag:blogger.com,1999:blog-34020393.post3386578000332573826..comments2024-03-27T10:59:38.307-07:00Comments on Jim's PeopleSoft Journal: Using RequireJS to Manage DependenciesJim Marionhttp://www.blogger.com/profile/12995110203807924786noreply@blogger.comBlogger39125tag:blogger.com,1999:blog-34020393.post-24233848015746991862016-07-27T03:35:46.745-07:002016-07-27T03:35:46.745-07:00Hi Jim, need your help to get an idea on the below...Hi Jim, need your help to get an idea on the below issue that happens on mobile devices.<br /><br />we are in Tools version 8.54. <br /><br />We are presenting an Employee name link in a page (this page is designed in dynamic HTML script). Once user clicks on a link we are showing a search page as a pop up(child page -this is fluid page designed in app designer))<br /><br />To open the search page we are using window.open method in Javascript. <br />Once user select name from search and click ok button, selected name will be copied to parent page and then child pop up page will be closed (using self.close method).<br /><br />This working fine in browsers, even in mobile. But when user saves the URL of this transaction as an APP, it fails to close the child window as it doesn't recognize as a page.<br /><br />Could you please provide an idea how to close a child window when its being opened from APP??<br /><br />Thanks,<br />Hari.AHarihttps://www.blogger.com/profile/03096781101535984499noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-26141222265116312562015-07-01T13:55:45.397-07:002015-07-01T13:55:45.397-07:00Thanks Jim, I think we are just about ready to go...Thanks Jim, I think we are just about ready to go live with HCM 9.2 and Interaction Hub!Kevin Weaverhttps://www.blogger.com/profile/09237087594753403371noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-62447468987302694842015-07-01T09:02:27.629-07:002015-07-01T09:02:27.629-07:00@Kevin, the recommendation hasn't changed much...@Kevin, the recommendation hasn't changed much. Create a new free formed stylesheet and add the #pthdr2logoswan:before with new attributes. Be sure to further qualify your selectors so your new selector wins the specificity test. The recommendation is to add this CSS to your attribute based branding theme so you can change logos by theme.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-18035888341945898132015-07-01T06:39:23.496-07:002015-07-01T06:39:23.496-07:00Thanks for your help, I got this all switched over...Thanks for your help, I got this all switched over to the requirejs using the jQuery UI dialog and it works great. And now I don't have any dependencies on my custom dashboard. I do however have one question about branding that is not related to requirejs. We want to change the Branding Logo and I noticed that the branding logo is defined within the new stylesheet.<br /><br />Like this:<br /><br />/* company logo div */<br />#pthdr2logoswan {<br />float:%AlignStart;<br />width: 113px;<br />height: 55px; /* new for hover menu */<br />margin:0;<br />/*position:relative;<br />top:-29px;*/<br />padding: 0 5px 0 0;<br />background:none; <br />}<br />#pthdr2logoswan:before {<br /> content: url(%Image(PT_ORACLELOGO_CSS));<br /> left: 4px;<br /> position: relative;<br /> top: 17 px;<br />}<br /><br /><br />What is the best practic for updating this to our company's logo.<br /><br />Thanks Jim!Kevin Weaverhttps://www.blogger.com/profile/09237087594753403371noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-11637812484642285192015-06-29T18:12:27.801-07:002015-06-29T18:12:27.801-07:00@Kevin, I use jQuery UI Dialog to serve /psc/. The...@Kevin, I use jQuery UI Dialog to serve /psc/. The difference between jQuery UI Dialog and others, however, is that jQuery UI dialog doesn't let you specify a URL. Instead, you have to specify a div with an iframe. What I usually do is use JavaScript to append a div with a specific ID containing an iframe and then I that as the base for the dialog. I have my own dialog function that receives a URL and title. I use that to build the dialog. It isn't as easy as the plugins.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-86377851613945053132015-06-29T17:33:58.633-07:002015-06-29T17:33:58.633-07:00That must be my problem. I don't find many re...That must be my problem. I don't find many references of using fancybox or colorbox in combination with requirejs. Is the jQuery UI's dialog box the equivalent to other jQuery APIs like colorbox? Can I use dialog to serve psc content? Thanks Jim! You are a huge help!Kevin Weaverhttps://www.blogger.com/profile/09237087594753403371noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-51976431805620633532015-06-29T16:15:38.775-07:002015-06-29T16:15:38.775-07:00@Kevin, I assume that $ is your variable in your r...@Kevin, I assume that $ is your variable in your require closure/callback function? I also assume that fancybox and/or colorbox are require elements at the end of the require array and before the function definition? If fancybox and colorbox aren't AMD modules, then you may also be having a problem because fancybox and colorbox are trying to register themselves into a global window.jQuery, which may not exist. This problem is caused by using jquery-private to keep jQuery out of the global scope.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-32779080312926643482015-06-29T13:17:19.346-07:002015-06-29T13:17:19.346-07:00Looks like I am dominating all the comments on thi...Looks like I am dominating all the comments on this entry. My latest issue is that I am trying to use this for either colorbox or fancybox. But I keep getting a $().fancybox or $().colorbox is not defined. I was reading how to make the colorbox dependent on the jquery, and I modifed the configuration js to incude this:<br /><br /> shim: {<br /> 'colorbox' : { deps: [ 'jquery' ]}<br />}<br /><br />Do you have any idea on how to make this work for either of fancybox or colorbox?<br /><br />Thanks Jim! Kevin Weaverhttps://www.blogger.com/profile/09237087594753403371noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-47105806751762734652015-06-29T11:30:39.539-07:002015-06-29T11:30:39.539-07:00Nevermind, I fat fingered my jquery html name. :)...Nevermind, I fat fingered my jquery html name. :) Kevin Weaverhttps://www.blogger.com/profile/09237087594753403371noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-33185734356614572472015-06-29T11:28:02.709-07:002015-06-29T11:28:02.709-07:00I am getting a JavaScript error in the jquery priv...I am getting a JavaScript error in the jquery private, <br /><br />TypeError: jq is undefined<br /> <br /><br />return jq.noConflict( true );});<br /><br />Any idea what I am doing wrong?Kevin Weaverhttps://www.blogger.com/profile/09237087594753403371noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-25939822599480372722015-06-27T10:24:00.155-07:002015-06-27T10:24:00.155-07:00That worked! However, I really don't like the...That worked! However, I really don't like the styles on the homepage tabs. There is a lot of space between them and they don't have rounded edges. Now I need to research how to modify the css.<br /><br />Thanks Jim!Kevin Weaverhttps://www.blogger.com/profile/09237087594753403371noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-75190943947079296122015-06-26T16:43:31.654-07:002015-06-26T16:43:31.654-07:00@Kevin, I did some research on this. I removed all...@Kevin, I did some research on this. I removed all component based pagelets from my homepage and RequireJS was still there, meaning it still works. So I asked development what to expect and one tip I received is to check the PeopleTools options in PeopleTools | Portal | Branding | Branding System Options. If the Application Package is PTBR_Branding, then it should work. If you applied an upgrade, however, the value may still be the old PT_BRANDING. I am using a PUM image, which has PTBR_BRANDING and that may be why it works for me and not for you. If it is still PT_BRANDING, then you should see RequireJS only if you have a component pagelet on the homepage.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-62998001252151897842015-06-26T14:50:23.579-07:002015-06-26T14:50:23.579-07:00@Kevin, the key is getting RequireJS to load. Ther...@Kevin, the key is getting RequireJS to load. There are a couple of ways to load RequireJS on a homepage. One of them is to create your own attribute based branding theme. The problem with this approach is that a homepage with a component would have RequireJS twice, but this may not be an issue. Never tried it.<br /><br />That was the whole point of this blog post: Pagelet Wizard and homepages working the same. So much for that idea.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-85671650719600360732015-06-26T09:04:11.049-07:002015-06-26T09:04:11.049-07:00@Kevin, I did not realize that. I checked and I ha...@Kevin, I did not realize that. I checked and I have company directory on my homepage, so that could explain it.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-44787823345219090192015-06-26T08:26:18.170-07:002015-06-26T08:26:18.170-07:00Jim,
I just tested a homepage in my 9.2 hcm with ...Jim,<br /><br />I just tested a homepage in my 9.2 hcm with no pagelets and the branding worked. So I think we have something wrong with our Interaction hub.<br /><br />Thanks for you time!Kevin Weaverhttps://www.blogger.com/profile/09237087594753403371noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-14563516807740224632015-06-26T07:16:18.075-07:002015-06-26T07:16:18.075-07:00Jim,
I have discovered that the Branding does not...Jim,<br /><br />I have discovered that the Branding does not work if there are no pagelets on the homepage. Does this mean that the branding will only work within components? The homepage where I wanted to use it is built with 1 navigation collection and 5 iscript based pagelets. Hence, no branding objects. Is this how it is suppose to work?<br /><br />Thanks!Kevin Weaverhttps://www.blogger.com/profile/09237087594753403371noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-8052556211095800442015-06-23T12:19:22.533-07:002015-06-23T12:19:22.533-07:00I will document the issue and open a service reque...I will document the issue and open a service request.<br /><br />Thanks!Kevin Weaverhttps://www.blogger.com/profile/09237087594753403371noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-74784279169796560932015-06-23T12:15:30.016-07:002015-06-23T12:15:30.016-07:00@Kevin, regarding branding, that is odd. I don'...@Kevin, regarding branding, that is odd. I don't know why it would behave that way.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-75206356169141583992015-06-23T12:09:03.475-07:002015-06-23T12:09:03.475-07:00That is the information I was looking for, thanks!...That is the information I was looking for, thanks! I have been doing some testing of the branding in Portal and I have discovered that the branding works on the default homepage, but I have another tab that it does not work. Is there something I need to configure on the tab to make it work? <br /><br />Thanks!Kevin Weaverhttps://www.blogger.com/profile/09237087594753403371noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-56725262026861421342015-06-23T09:56:01.828-07:002015-06-23T09:56:01.828-07:00@Kevin,
Homepages load from the server identified...@Kevin,<br /><br />Homepages load from the server identified in the URL, not from content providers. If you are logged into HCM, then you need to configure this in HCM. If you log into Interaction Hub, then you need this configured in Interaction Hub. The best approach is to configure it in both. Then when you import a pagelet into Interaction Hub from HCM, the pagelet can just use require(...) and let the container resolve library dependencies.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-66091929132935765292015-06-23T08:51:46.683-07:002015-06-23T08:51:46.683-07:00The RequireJS and the Configuration file don't...The RequireJS and the Configuration file don't show up in my Interaction Hub. After I configured them in my HCM environment, I could see them load there, but not in the Hub. I am being told now that we might have a bug fix the needs to be applied for Branding in Portal. So maybe that might fix this issue. Is my approach correct? Should I be configuring this in Interaction Hub or HCM? My initial thoughts was HCM, but when it did not work I started questioning myself. Now I am confused. Thanks for your help!<br /><br />KevinKevin Weaverhttps://www.blogger.com/profile/09237087594753403371noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-83007548568790301622015-06-23T08:36:58.570-07:002015-06-23T08:36:58.570-07:00@Kevin, when you say, "they still don't s...@Kevin, when you say, "they still don't show up," are you referring to the RequireJS and configuration file directly or the libraries included by RequireJS? Did you look at the network tab of your browser tools to make sure everything is being downloaded? Do you have any errors in the console that might help you identify what is wrong?Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-13050886520175231302015-06-23T07:55:08.080-07:002015-06-23T07:55:08.080-07:00Jim,
I am trying to get this to work for me on a ...Jim,<br /><br />I am trying to get this to work for me on a homepage in Interaction Hub using Pagelets that all require JQuery and come from our HCM system. I have created the branding objects and configured them using the Branding Sytem Options in HCM, but they don't show up in our Portal. <br />So I figured that I must need them in Interaction Hub, so I configured them there and still they don't show up on the homepage?<br /><br />Any thoughts?<br /><br />We are tools 8.54.09, if that helps...Kevin Weaverhttps://www.blogger.com/profile/09237087594753403371noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-55726316898461433312015-04-08T02:55:51.324-07:002015-04-08T02:55:51.324-07:00Hi Jim, thanks for your feedback!
I used exact th...Hi Jim, thanks for your feedback!<br /><br />I used exact the same example as you posted on your blog (with jQueryUI dialogs).<br /><br />I tried several options, but the one that worked for me was removing the #NAA_DIALOG_TEST_html in the selector area. Probably there are more ways to achieve this, but this was a pretty simple adjustment.<br /><br /><br />$("#NAA_DIALOG_TEST_html").find("button")<br /> .button()<br /> .click(function( event ) {<br /> event.preventDefault();<br /> $("#NAA_DIALOG_TEST_html .dialog").dialog();<br /> });<br /> });<br /><br />changed it to:<br /><br /><br /> $("#NAA_DIALOG_TEST_html").find("button")<br /> .button()<br /> .click(function( event ) {<br /> event.preventDefault();<br /> $(".dialog").dialog(); /*changed*/<br /> });<br /> });<br /><br />Hopefully this is useful to somebody<br />Now the dialog behaves like it should. Thanks for helping out!Anonymoushttps://www.blogger.com/profile/16861483083057536370noreply@blogger.comtag:blogger.com,1999:blog-34020393.post-70844561544695320632015-04-06T12:28:08.250-07:002015-04-06T12:28:08.250-07:00@Stefan, Add some JavaScript to print to the conso...@Stefan, Add some JavaScript to print to the console to see if your dialog is really setting itself to visible. Are you using jQuery UI dialogs or something different? I had a problem with jQuery UI dialogs and had to destroy them on close (hide) and recreate them each time I wanted to show a dialog.Jim Marionhttps://www.blogger.com/profile/12995110203807924786noreply@blogger.com