We will update the default.htm file with our CSS and Script files along with a couple of other modifications. Overall pretty easy stuff.
- In Visual Studio
- Under the LsCoreProject.App project
- Open up the default.htm file
- Under the standard LightSwitch CSS links add the following in order
- LightSwitchTiles.min.css from the MetroUICss folder
- spectrum.css from the Content folder
- sp-msls-light-theme.css from the Content folder
- Scroll down to the scripts section
- Add the spectrum.js and itgLsHelper.js files
- 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); });
- 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>
- Save your solution
Yay! Section done…
Next… Add LogIn/LogOut/Register/ChangePassword
Here are the topics and their logical order:
- Create the project
- Add external CSS
- Add external scripts
- — You
- Add LogIn/LogOut/Register/ChangePassword
- Create the security data source
- Screens for permissions
- Screens for role management
- Screens for user management
- Tables for tile menus
- Screens for icon management
- Screens for menu management
- Create a tile menu screen
- Create a database project
- How to deploy successfully
- Wrap up
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
Sorry… yes you are correct, I need to update the project.
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
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(?)