cancel
Showing results for 
Search instead for 
Did you mean: 

Hybrid Web Container: Overriding Generated Files

Former Member
0 Kudos

Hey Experts.

I am working with SUP 2.1 Mobile Workflow or Hybrid Web Container applications. I was curious if anyone out there has been able to modify the template files for when a Mobile Worklfow is generated?

Specifically my use case is to display header and footer in Android and Blackberry. These by default are not shown. For example in the generated workflow_jQueryMobileLookAndFeel.html file string on line 1821 we have the following JavaScript:

$('div[data-role="header"]').css('display', 'none');

$('div[data-role="footer"]').css('display', 'none');

I of course can undo this in the customBeforeShowScreen method but prefer modifying the template for generation of the html file as it is arguably 'cleaner'.

There is an instance where an override wont work such as the above example. I also want to show my headers without the default back button. In the jquery.mobile-1.0a4.1.js file on line 1607 there is an option that enables the back button by default when there are no other buttons. Again I want to show the header on the login screen but dont want to show a back button - its not relevant:

$.widget( "mobile.page", $.mobile.widget, ,

keepNative: null

},

Any ideas? Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

david_brandow
Contributor
0 Kudos

There are a few approaches you can take. When using the designer, you can inject the changes via JavaScript, as you have noted. You can also include the changes in files jquery.mobile.fix.js or jquery.mobile.fix.css that will get included after the jquery mobile files are included. You can also include changes in files that don't get overridden like API.js or Utils.js.

Another approach is to turn the Generate checkbox off. Doing so will break the lnk between changes made in the designer and the generated code, but it will leave with a nice easy way to continue to repackage and redeploy your changes.

Finally, you can stop using the designer altogether and manually create the .zip file and its contents.