mojoPortal content management system should work fine out of the box for most intranets as long as your users also have internet access. If your users don't have internet access but only have access to the intranet, then you need to configure a couple of things differently to make your mojoPortal site work correctly.

The issue is that we use jQuery and jQueryUI with mojoPortal, but we no longer ship the JavaScript with mojoPortal CMS because it makes our download a lot bigger, and in most installations it works best to load the JavaScript from the Google/jQuery CDN (Content Delivery Network). All that means is we load the JavaScript from a Google/jQuery URL instead of hosting the files within the mojoPortal installation. This is a best practice because it saves some load on your own servers and the same files can be cached in the browser for any sites that use the Google/jQuery CDN, but if the internet is not available to all the users you will then need to host the files yourself. Developers may also want to do this if they find themselves working frequently without internet access on their development machines. For example, if you are working while flying on a plane you may not have access to the internet and it may be hard to test your mojoPortal projects unless you download and configure jQuery and jQueryUI on your machine when you do have internet access so you can use them when you don't.

Here's a quick rundown on how to install and configure jQuery and jQueryUI within mojoPortal to run offline.

mojoPortal versions below 2.5.0.0

jQuery
  1. In the user.config add this line if it's not already in the file and make sure it's value it set to false: <add key="UseGoogleCDN" value="false" />
  2. Download the jQuery script file by clicking the "Download the compressed, production jQuery..." link, the file will be named like jquery-3.2.1.min.js.
  3. Create a directory in the ClientScripts directory (which is in the root of your site) and put the jQuery version in the name. Something like this: /jquery-3.2.1
  4. Copy the jQuery script file that you downloaded into this directory and rename it to jquery.min.js.
  5. In the user.config add this line if it's not already in the file and make sure it's value is set to the jQuery directory: <add key="jQueryBasePath" value="~/ClientScript/jquery-3.2.1/" />
jQueryUI
  1. Download the jQueryUI zip archive by clicking on the "Stable" button.
  2. Extract the jQueryUI zip archive and copy it's contents into the ClientScripts directory. Make sure the jQueryUI directory is named with the jQueryUI version in the name. Something like this: /jquery-ui-1.12.1
  3. Rename the jquery-ui-x.x.x.custom.min.js file to jquery-ui.min.js.
  4. Delete the:
    1. external folder
    2. index.html file
    3. AUTHORS.txt file
    4. package.json file
    5. Files that do not have ".min" in their name (min.js or min.css)
  5. Rename jquery-ui.min.css to jquery-ui.css.
  6. Create a directory inside the jQueryUI directory and name it to themes, then create another directory inside the themes directory and name it base.
  7. Move the jquery-ui.theme.min.css file and the images directory into the base directory.
  8. Open the jquery-ui.theme.min.css file in a text editor and find and replace url("images/ with url("images/themes/base.
  9. In the user.config add this line if it's not already in the file and make sure it's value is set to the jQueryUI directory: <add key="jQueryUIBasePath" value="~/ClientScript/jquery-ui-1.8.2/" />.
  10. Now set the jQueryUI theme in your skin's layout.master on the <portal:StyleSheetCombiner .../> control with the JQueryUIThemeName="base" attribute.
    • You can design your own custom themes at http://jqueryui.com/themeroller/. Follow the instructions above but name the base directory to a name of your choosing.
    • You can download additional jQuery themes from the Gallery tab at http://jqueryui.com/themeroller/. Follow the instructions above but name the base directory to the theme you're installing.

That should be all you need to do to host the jQuery and jQueryUI files locally.

mojoPortal version 2.5.0.0 and up

We've included our Framework skin base in our mojoSkins project and Framework manually calls jQuery and jQueryUI via the jQuery CDN in the layout.master. To locally install jQuery and jQueryUI with this configuration follow these steps:

jQuery
  1. Download the jQuery script file by clicking the "Download the compressed, production jQuery..." link, the file will be named like jquery-3.2.1.min.js.
  2. Create a directory in the ClientScripts directory (which is in the root of your site) and name it jquery.
  3. Move the jQuery script file to the jquery directory.
  4. In the layout.master of your skin delete the line that says something like <script src="//code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-h..." crossorigin="anonymous"></script> and replace with <script src="/ClientScripts/jquery/jquery-3.2.1.min.js"></script>.
jQueryUI
  1. Download the jQueryUI zip archive by clicking on the "Stable" button.
  2. Extract the jQueryUI zip archive and copy it's contents into the jquery directory that you created in the previous jQuery steps. Make sure the jQueryUI directory is named with the jQueryUI version in the name. Something like this: /jquery-ui-1.12.1
  3. To keep things clean, delete the:
    1. external folder
    2. index.html file
    3. AUTHORS.txt file
    4. package.json file
    5. Files that do not have ".min" in their name (min.js or min.css)
  4. In the layout.master of your skin delete the line that says something like <script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-V..." crossorigin="anonymous"></script> and replace with <script src="/ClientScripts/jquery/jquery-ui-1.12.1/jquery-ui-1.12.1.min.js"></script>.
  5. In the layout.master of your skin delete the line that says something like <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css"> and replace with <link rel="stylesheet" href="/ClientScripts/jquery/jquery-ui-1.12.1/jquery-ui-1.12.1.min.css">.

That's it! You should be good to go.

Last Modified by Elijah Fowler on Sep 11, 2017