Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This strategy has been quite successful and has allowed uPortal adopters to freely mix and match portlets with various uPotal versions. If at all possible, uPortal would like to continue to allow adopters to upgrade uPortal and portlets independently of each other, and would like to avoid needing to maintain a separate view for each version of jQuery.

jQM may is not be compatible with the approach described above. The 100% compatible. In particular, the markup parsing and enhancement can necessarily only be applied once to the page. However, and we don't yet know whether the library is otherwise compatible with using jQuery in extreme noConflict mode.it does appear that it is possible to suppress parsing and enhancement for subsequent jQM includes, and it appears that when following our JS library inclusion strategy mobile events work with multiple included libraries.

Code Block
html
html

<script type="text/javascript" src="<rs:resourceURL value="/rs/jquery/1.5/jquery-1.5.js"/>"></script>
<script type="text/javascript">
  $("[data-role=page]").live('pagebeforecreate',function(event){
    return false;
  });
</script>
<script type="text/javascript" src="<rs:resourceURL value="/rs/jquery-mobile/1.0a3/jquery.mobile-1.0a3.js"/>"></script>
<script type="text/javascript">
  var ${n} = {};
  ${n}.jQuery.noConflict(true);
</script>

Theming

jQM has a somewhat different theme strategy from jQuery UI and other theming frameworks uPortal has used. Each jQuery theme contains a number of "swatches" (five in the default theme), which are ordered by visual importance. By default, the theme framework uses c as the baseline, a for important elements like headers and footers, and e for subtle accents. To style elements in the page, developers are instructed to place a "data-theme" attribute on the element or section to be styled differently from the default.

...

It might be wise for uPortal to attempt to do away with the swatch strategy, instead associating swatch colors with the portlet CSS names currently being donated to Fluid. For example, jQM recommends theming cancel and save buttons differently by using different swatches. uPortal might instead prefer to preserve the "primary" and "secondary" button CSS class names and associate swatch colors with those, since these CSS names are more semantic, easier to standardize on, and are already in use in uPortal. Similarly, we might prefer to re-use the portlet name CSS classes rather than using a non-default swatch level for portlet-specific navigation bars.

Navigation

Potential Strategies

Configure portlets to use portal's Javascript dependencies

...

jQM includes capabilities for AJAX navigation and performs attractive swipe-style animation when loading new pages via AJAX. As attractive as this feature is, AJAX navigation appears to be complex and likely will particularly poorly with uPortal 3.2's URL syntax. ~jbourey recommends shelving AJAX navigation for the initial mobile effort and re-visiting this as a 3.3+-only issue at a later date.