Skip to Content
author's profile photo Former Member
Former Member

Hybrid Web Container: Overriding Generated Files

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Dec 08, 2011 at 02:21 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.