Tuesday, April 7, 2015

Soti MobiControl Dynamic Template

Well, I just created my first ever Github project.  It's a template for use with Soti's MobiControl.  If you have ever used MobiControl then you know that the Lock Screen design/templates are VERY limited.  You basically have to hand write HTML and use their tags (ex. ) in the HTML to insert each and every entry in the Lockdown policy.  This is very cumbersome for anyone, let alone those who are not really good with HTML.  

Once you have finally created a good working template you better hope that you never need to add or delete an item from the lockdown policy.  If you do your going to have to go into the the HTML and manually add/remove the references to the correct lockdown tag. You better hope that it doesn't screw up your layout.  Or worse you decide to use a different device with a different screen size!  You may as well start over....

With that in mind I created a template that uses CSS and JavaScript to automatically adjust for the screen size, number of lockdown entries, and the header and footer text/image.  It also automatically uses the exe icon if you don't manually set an image for your entry (yeah you had to specify that in the HTML manually).  This new template will make it really easy to add and delete entries in the lockdown policy without ever having to touch the HTML.  Oh and did I mention it handles device rotation!?  Yep... That too.

If your using MobiControl and want to check it out, or are just interested in device orientation through CSS, or any of the other tweaks I used.  Check it out at https://github.com/mobilebob/Soti_Dynamic_Template

Description:
A Soti MobiControl template, that's dynamic. A mobile phone style template that changes automatically depending on how many entries you have in your lock screen. It keeps you from having to change the HTML every time you want to change the lock screen entries. It's also dynamic for screen size and changes based on device orientation. Uses CSS and Javascript

4 comments:

James Canning said...

Oh you beauty I have been looking for something like this for years!! Thank you from the bottom of my heart.

Aaron Brockhaus said...

I am getting an error on the device that I am deploying this soti template to - Object doesn't support this property or method 'insertRule'

Travis Epperson said...

@Aaron Brockhaus
Unfortunately the device your using doesn't support full Javascript. Right now the template doesn't support WinMobile devices or other older browsers. Sorry about that, I would love to build in a check and do something simpler (maybe without rotation) if it detects an old browser, but haven't had time.

https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/insertRule

Stuart Barrett said...

Thanks for this, it gave me a good starting point for my master template. We are using the same principal with the Soti Links being built dynamically - it is SO annoying that they can't be built within a for loop!

We also have multiple lockscreen pages which can be swiped through and the javascript creates the pages on the fly and decides on the grid setup depending on screen size.