LS2013 Core Project – Update the default.htm

We will update the default.htm file with our CSS and Script files along with a couple of other modifications. Overall pretty easy stuff.

  1. In Visual Studio
  2. Under the LsCoreProject.App project
  3. Open up the default.htm file
  4. Under the standard LightSwitch CSS links add the following in order
  5. LightSwitchTiles.min.css from the MetroUICss folder
  6. spectrum.css from the Content folder
  7. sp-msls-light-theme.css from the Content folder
  8. Scroll down to the scripts section
  9. Add the spectrum.js and itgLsHelper.js files
  10. At the document ready section add the following modification
    // Mod to allow us to identify what screen to start with, good for first run configurations
    var start = itgLsHelper.getUrlParameterByName("start");
    msls._run(start)
    .then(null, function failure(error) {
    alert(error);
    });
    
  11. Finally, after the document ready, but before the end body tag, add the following script. This fixes a problem with ETags. You can read more about the issue at this TechNet article by Dave Kidder.
    <script type="text/javascript">
    itgLsHelper.fixMetadataHandlerForEtag();
    itgLsHelper.fixJsonHandlerForEtag();
    </script>
    
  12. Save your solution

Yay! Section done…

Next… Add LogIn/LogOut/Register/ChangePassword


Here are the topics and their logical order:

  1. Create the project
  2. Add external CSS
  3. Add external scripts
  4. — You
  5. Add LogIn/LogOut/Register/ChangePassword
  6. Create the security data source
  7. Screens for permissions
  8. Screens for role management
  9. Screens for user management
  10. Tables for tile menus
  11. Screens for icon management
  12. Screens for menu management
  13. Create a tile menu screen
  14. Create a database project
  15. How to deploy successfully
  16. Wrap up

4 thoughts on “LS2013 Core Project – Update the default.htm

  1. Thomas says:

    Hi Dale,
    i think ist only the definition in the “Expose our public functions/methods” part of the itgLSHelpers.js:
    “getUrlParameter: getUrlParameterByName”

    i replaced the “getUrlParameterByName” in default.htm with “getUrlParameter” and it works

    Thomas

  2. Thomas says:

    Hi Dale,
    i encountered the same problem. App cannot run because getUrlParameterByName´ exists in itgLsHelper.js.
    Can i use getUrlParameter() instead?

    BTW: Great work! I love ur BLOG!

    Thomas

  3. joshbooker says:

    Hi Dale, Finally getting around to trying this tut. FYI: It appears the most recent version of itgLsHelper does not have getUrlParameterByName. It has getUrlParameter instead. That is unless I have an old version of your helper…I started this a while back and now am going through again from the start so maybe I messed up(?)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: