Class Index | File Index

Classes


Namespace mobilize

Mobilization core

mobilize is a core class of mobilize.js.

You only want to use this class directly if you are developing mobilization for your own framework. Otherwise use one of the stock CMS classes supplied with mobilize.js.

mobilize does not need to be instiated and it's a static singleton. Instead, the functionality is extended by an extender. Extender is a Javascript which directly overrides mobilize member functions in mobilize namespace.


Defined in: mobilize.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
Async flag indicating that jQuery Mobile has been loaded
<static>  
Async flag indicating that mobile page transform is complete
Method Summary
Method Attributes Method Name and Description
<static>  
mobilize.baseurl(url)

Get baseurl from url by ignoring file and url parameters

Example
mobilize.baseurl(window.location.href)
<static>  
mobilize.bindEventHandlers()
Subclass may override.
<static>  
Must be called before template loading, as immediately when jQuery Mobile script tag is inserted to DOM, some of its event handlers are run.
<static>  
mobilize.bootstrap()
Entry point to mobilize.js machinery.
<static>  
mobilize.callWithErrorReporting(func)
Make a function call and report possible exceptions back to a centralized server.
<static>  
mobilize.checkMobileBrowser(userAgent, forceMobilize)
Check if browser is running on mobile platform
<static>  
mobilize.checkResourceWhitelist(src, list)
Check if a given link is on resource whitelist.
<static>  
mobilize.cleanCSSLink()
Remove web only tags
<static>  
mobilize.cleanCSSStyle()
Remove unnecessary CSS links from if not needed for mobile.
<static>  
mobilize.cleanHead()
Stop loading Javascripts and CSS we do not need in mobile mode.
<static>  
mobilize.cleanJavascript()
Remove unnecessary script tags if not needed for mobile.
<static>  
Get rid of mobile template
<static>  
mobilize.completeTransform()
We can proceed with the page visual enhancements
<static>  
mobilize.constructBody()
Create section of a mobile rendered version.
<static>  
mobilize.constructHead()
Create section of a mobile rendered version.
<static>  
mobilize.createCookie(name, value, days)
See: http://www.quirksmode.org/js/cookies.html
<static>  
mobilize.createNavigationBox(selection, title, outputter)
Create jQuery Mobile navigation links out of arbitary link list.
<static>  
Stop loading all web page resources until mobile template is properly placed and template transformation has taken place.
<static>  
mobilize.eraseCookie(name)
See: http://www.quirksmode.org/js/cookies.html
<static>  
mobilize.extend(target, source)
Simple shallow copy from an object to another.
<static>  
mobilize.finish()
Mobile transformation is done.
<static>  
mobilize.getAJAX(url, callback(payload))
Helper function to do AJAXy requests before jQuery has been loaded.
<static>  
mobilize.getExtendedOptions()
Return plug-in specific options overrides
<static>  
mobilize.getUrlVars()
Read URL parameters to dict.
<static>  
mobilize.init(options)
Initialize mobilize class.
<static>  
mobilize.loadMobileTemplate()
Start loading mobile template to DOM tree.
<static>  
mobilize.loadScript(url, callbacl)
Magical script loader.
<static>  
mobilize.log(msg:)
Utility for internal debug logging
<static>  
mobilize.onMobileInit(e)
jQuery mobile initializer handler
<static>  
mobilize.prepareFinish()
Check that all async conditions have been completed allowing us to finish the page.
<static>  
Put mobile template to DOM tree
<static>  
mobilize.readCookie(name)
See: http://www.quirksmode.org/js/cookies.html
<static>  
mobilize.remapLinks(callback, removeCallback)
Based on mobilize options, rewrite link targets with mobile ones or hide links.
<static>  
mobilize.rewriteLink(a)
<static>  
mobilize.rewriteLinkTarget(href)
<static>  
mobilize.suspendRendering()
Make sure the browser does not load anything extra before mobile transform has taken place
<static>  
mobilize.swapBody()
Make the transformed mobile template body visible and remove the other body data.
<static>  
mobilize.transform()
Transform the web page content to mobile frame.
Namespace Detail
mobilize

Author: Mikko Ohtamaa, Jussi Toivola.
Field Detail
<static> mobilize.jQueryMobileLoaded
Async flag indicating that jQuery Mobile has been loaded

<static> mobilize.transformComplete
Async flag indicating that mobile page transform is complete
Method Detail
<static> mobilize.baseurl(url)

Get baseurl from url by ignoring file and url parameters

Example
mobilize.baseurl(window.location.href)
Parameters:
url
: Url to parse

<static> mobilize.bindEventHandlers()
Subclass may override. This is called after jQuery Mobile has been set up. You can now attach event handlers to jQuery UI elements.

<static> mobilize.bindTemplateEventHandlers()
Must be called before template loading, as immediately when jQuery Mobile script tag is inserted to DOM, some of its event handlers are run.

<static> mobilize.bootstrap()
Entry point to mobilize.js machinery.

Stop loading current HTML resources, start async processes to get the page mobilized.


<static> mobilize.callWithErrorReporting(func)
Make a function call and report possible exceptions back to a centralized server. We use this to track problems with possible not-so-well-implemented mobile browsers.
Parameters:
func

<static> mobilize.checkMobileBrowser(userAgent, forceMobilize)
Check if browser is running on mobile platform
Parameters:
userAgent
= userAgent name. Uses browser's userAgent by default
forceMobilize
= Force detection to mobile to true or false regardless of real type URL parameter mobilize= can also be used to force mobile. The state is also stored to 'mobilize-mobile' cookie this information is passed to server for the following requests. URL and options.force paremeters override cookie and detection.

<static> mobilize.checkResourceWhitelist(src, list)
Check if a given link is on resource whitelist.
Parameters:
src
URL
list
List of substring matches. If matches do not remove the element.
Returns:
true if the src string has substring match of any list element

<static> mobilize.cleanCSSLink()
Remove web only tags

<static> mobilize.cleanCSSStyle()
Remove unnecessary CSS links from if not needed for mobile. Supports syntaxes