This page describes why you may need to transit your legacy application from using jQTouch to jQuery Mobile and steps you need to perform.
jQuery Mobile may be considered as an advanced successor of jQTouch library. At the moment jQuery Mobile have more development progress, provides better support, supports more platforms and performs pretty reliable. Rhodes has been ported to jQuery Mobile and have no jQTouch out of box support anymore.
Target platform should be supported by jQuery Mobile framework.
You need to use Rhodes application template code (rhodes_root_dir/res/generators/templates/application) as the source of files to copy from.
The most notable difference between jQTouch and jQuery Mobile is last one using HTML5 conforming custom data-something attributes instead of jQTouch classes. Structure of a page with jQuery Mobile is pretty similar to the jQTouch, but have significant differences. For example no distinct div for title and toolbar, everything goes to the common header div. For detailed description on how to do advanced jQuery Mobile pages, forms and controls mastering look at jQuery Mobile documentation please.
Here is just a sample on how to change jQTouch application page to meet jQuery Mobile format. Let you have this jQTouch page code:
<div class="pageTitle"> <h1>Edit <%= @product.name %></h1> </div> <div class="toolbar"> <div class="leftItem backButton"> <a href="<%= url_for :action => :show, :id => @product.object %>">Cancel</a> </div> <div class="rightItem regularButton"> <a href="<%= url_for :action => :delete, :id => @product.object %>">Delete</a> </div> </div> <div class="content"> <form method="POST" action="<%= url_for :action => :update %>"> <input type="hidden" name="id" value="<%= @product.object %>"/> <ul> <li> <label for="product[name]" class="fieldLabel">Name</label> <input type="text" name="product[name]" value="<%= @product.name %>" <%= placeholder("Name") %> /> </li> <li> <label for="product[brand]" class="fieldLabel">Brand</label> <input type="text" name="product[brand]" value="<%= @product.brand %>" <%= placeholder("Brand") %> /> </li> </ul> <input type="submit" class="standardButton" value="Update"/> </form> </div>
To use it with jQuery Mobile the page should be converted this way:
<div data-role="page"> <div data-role="header" data-position="inline"> <h1>Edit <%= @product.name %></h1> <a href="<%= url_for :action => :show, :id => @product.object %>" class="ui-btn-left" data-icon="back" data-direction="reverse">Cancel</a> <a href="<%= url_for :action => :delete, :id => @product.object %>" class="ui-btn-right" data-icon="delete" data-direction="reverse">Delete</a> </div> <div data-role="content"> <form method="POST" action="<%= url_for :action => :update %>"> <input type="hidden" name="id" value="<%= @product.object %>"/> <div data-role="fieldcontain"> <label for="product[name]" class="fieldLabel">Name</label> <input type="text" id="product[name]" name="product[name]" value="<%= @product.name %>" <%= placeholder( "Name" ) %> /> </div> <div data-role="fieldcontain"> <label for="product[brand]" class="fieldLabel">Brand</label> <input type="text" id="product[brand]" name="product[brand]" value="<%= @product.brand %>" <%= placeholder( "Brand" ) %> /> </div> <input type="submit" value="Update"/> </form> </div> </div>
Pay attention on following page code parts please: