LS2013 Core Project Updated

Note that the March 2014 Update to Visual Studio caused, what seems like, breaking changes to the user management side of this tutorial.

As time in the next few weeks allows, I’ll be working on updating the content.

We have pushed an update to GitHub. This is a major refactoring which will cause issues with the previous code.

In this update we have moved most of the logic into the external itgLsHelper.js file. There were some minor updates to tables and a few screens that I’ve documented and put in a page here. I’ve also added a BreakingChanges file to the project on GitHub.

Here are some of the items in this update:

  • Password field with validation
  • Confirm Password field with validation, both of these will give you some pretty good information on how to easily implement your own custom validators.
  • A screen picker field used in the tile menu system
  • Client side user roles and permission checking
  • Ability to export the tile menu for inclusion in other or same project(s)
  • Ability to import/use a JSON representation of a tile menu, makes for fast loading
  • Much cleaner by using the itgLsHelper space

Note that these are not specific to the tile menus, but can be used in any other screen/code that you desire. Hopefully you’ll find the value has increased big time with this update. Let me know your thoughts.

Here are a few of the functions included in the itgLsHelper.js file:

init – initializes the system: gets user name & permissions, imports menus

passwordValidator – setup a visual field for password entry and validation

confirmPasswordValidator – setup a visual field for password entry and validate against the password field

screens – returns an array of your screens, name, display name and methods to show them

changeButtonIcon – changes the icon class of a button

colorPicker – setup a visual field as a color picker

iconPicker – setup a visual field as an icon picker

screenPicker – setup a visual field as a screen picker

userHasPermission – does the current user have the permission assignment

userHasRole – does the current user have the role assignment

tileMenu – setup a screen/container for a predefined MetroUI type tile menu

exportTileMenusToJson – export/return a JSON object representing all the tile menus

importJsonTileMenus – import a JSON object representing a set of menus and their tiles

importIconClassList – import a csv list of icon class list

urlParameterByName – get a URL parameter by its name

fixMetadataHandlerForEtag – a fix for a known ETag issue

fixJsonHandlerForEtag – a fix for a known ETag issue

internalHelpers – bunch of functions for internal use, but good information!

Enjoy!

10 thoughts on “LS2013 Core Project Updated

  1. Hi

    Thanks for LsCoreProject, i use it for my simple project.

    But i don’t understand, why Profile menu not working? When i click “Profile” screen opening, but he empty.

  2. Juan Montoya says:

    Just wonder if you have any changes on the status of this issue. I still can not find why it is not working. Any help would be appreciated.

  3. Juan Montoya says:

    Related to my previous question: from the start screen itgLsHelper never hits the line that creates the menu: itgLsHelper.tileMenu(options.element, options.menuName);

    // Watch our ready property
    options.contentItem.dataBind(“screen.” + readyPropertyName, function (newValue) {
    if (newValue) {
    // When the ready bit is flipped, show our tile menu
    itgLsHelper.tileMenu(options.element, options.menuName);
    }
    });

  4. Juan Montoya says:

    I have been trying to use this project as a template for other projects I am working on. The problem I have is that when I try to use the menu in the start screen (generated from the database) it is showing the security administration tile for any user. I can not find a good explanation why is not doing the permissions check in the start screen. In other screens the permissions validation works. Any help will be appreciated.

  5. Thomas says:

    Hi Dale,
    i like your CoreProject very much! I try to use it as a template for my newest development.

    One thing is not clear to me….
    I use an external SQL Server 2012 DB.
    Is it the same approach (starting app, reading odata services as security datasource) for an external db?
    Im a little confused because in the sql server the security tables are much more than the few odata services.

    I would be very happe if you can send me in the right direction :-)

    Thomas

    • dwm9100b says:

      I’ve not tested the code to work with only an external sql server. But its pretty basic and it just uses built in methods. Which should work with internal/external. I also have an update which hasn’t been fully tested yet that changes some of the authentication code.

    • pmalcolm says:

      Hi Thomas, did you find a solution.. I am currently trying to figure how to use an external table also.

    • dwm9100b says:

      Yep same approach.

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

Follow

Get every new post delivered to your Inbox.

Join 143 other followers

%d bloggers like this: