May
9
Written by:
Michael Washington
5/9/2013 6:28 AM
The Visual Studio LightSwitch runtime was updated to support JQuery Mobile 1.3.
You can find more about it at this link: http://blogs.msdn.com/b/lightswitch/archive/2013/05/07/announcing-runtime-update-1-supporting-jquerymobile-1-3.aspx.
This is a step by step guide to updating the LightSwitch JavaScript Runtime.
Make a New Project.
Create the project.
Switch to File View.
Right-click on the HTMLClient project and select Manage NuGet Packages.
Select Updates, then NuGet official package source.
Click on the Microsoft.LightSwitch.Client.JavaScript.Runtime and then click the Update button.
The Runtime will update and the JQuery Mobile will also be updated.
Open the default.htm file, and make the following changes:
- light-theme.css to light-theme-1.0.1.css
- mlsls-light.css to msls-light-1.0.1.css
- jquery.mobile.structure-1.2.0.min.css to jquery.mobile.structure-1.3.0.min.css
- msls-1.0.0.min.css to msls-1.0.1.min.css
- jquery-1.8.2.min.js to jquery-1.9.1.min.js
- jquery.mobile-1.2.0.min.js to jquery.mobile-1.3.0.min.js
- msls-1.0.0.min.js to msls-1.0.1.min.js
Updating Beyond JQuery Mobile 1.3
At the time of this writing, JQuery Mobile 1.3.1 is required to make reflow tables work. It is available on the JQuery Mobile site but not on Nuget (yet).
Download the latest JQuery js and CSS files from the JQuery Mobile site.
Use Add/Existing Item to add the files to their proper folders (.css goes in the Content folder, and .js goes in the Scripts folder).
Open the default.htm page and update the references.
9 comment(s) so far...
With my projects, even with a fresh Lightswitch HTML Client (C#) project, NuGet does not say that there are any updates available.
I have described my experiences/problems here: http://social.msdn.microsoft.com/Forums/en-US/lightswitch/thread/580cb89d-e12a-4929-b102-f197ec50a9c7
Regards, Richard
By Richard on
5/9/2013 9:05 PM
|
Are you sure you are clicking the 'Updates' button see point 1 on the screen shot? If you don't do this the screen defaults to showing you a list of what is installed and only provides an uninstall option.
By Tim C on
5/28/2013 5:45 AM
|
@Tim C - If you don't see the Update button that means you already have the latest version.
By Michael Washington on
5/28/2013 5:48 AM
|
Sorry, probably did not explain very well. When you first go into the Manage NuGet screen it will default to showing you installed packages, which only provides the uninstall option. You have to click the 'updates' button to show the list of those with updates. Hence missing this step may be one reason why Richard did not see any. Of course it could also be he has the latest as you suggest.
By Tim C on
5/29/2013 4:33 AM
|
I've tried the above and it works fine for 1.3.0. However, when I try 1.3.1 (which I need for reflow tables) it does not work. When I had the files and adjust the references running even a basic solution gives the following error:
--------------------------- Message from webpage --------------------------- TypeError: Unable to get property 'popup' of undefined or null reference --------------------------- OK ---------------------------
Any suggestions would be gratefully received.
Thanks,
Tim
By Tim C on
5/29/2013 4:33 AM
|
@Tim C - Download the code for the reflow table on the Downloads page of this site and compare it to your own.
By Michael Washington on
5/30/2013 4:14 AM
|
I skipped the 'add existing file' stage assuming that if I copied the files into the right location VS would pick them up - it does not :-(. Thanks for the advice, spotted this by comparing the solutions and quickly corrected by adding the files in. Now to play with the grids.
Many Thanks,
Tim
By Tim C on
5/30/2013 4:14 AM
|
hi Michael, i got error when try Updating 'jQuery' from version '1.9.1' to '2.0.1.1'
Install failed. Rolling back... Updating 'jQuery 1.9.1' to 'jQuery 2.0.1.1' failed. Unable to find a version of 'Microsoft.LightSwitch.Client.JavaScript.Runtime' that is compatible with 'jQuery 2.0.1.1'.
By JOJO on
5/30/2013 7:37 PM
|
@JOJO - That is not covered in this article. Only the JQuery Mobile upgrade.
By Michael Washington on
5/30/2013 8:02 PM
|