function _jquerymobile_build_js in jQuery Mobile module 7.2
Build the javascript for jquerymobile.
1 call to _jquerymobile_build_js()
- jquerymobile_load_files in ./
jquerymobile.inc - Load the required files.
File
- ./
jquerymobile.inc, line 94 - Includes for jquerymobile
Code
function _jquerymobile_build_js() {
global $theme_key;
$settings = _jquerymobile_get_settings($theme_key);
if (isset($settings)) {
$output = '';
$output .= 'var jqm = jQuery.noConflict();' . "\n";
$output .= 'jqm(document).bind("mobileinit", function() {' . "\n";
if (isset($settings['ns'])) {
$output .= "\n\t" . 'jqm.mobile.ns = "' . $settings['ns'] . '";';
}
if (isset($settings['autoInitializePage'])) {
$output .= "\n\t" . 'jqm.mobile.autoInitializePage = ' . $settings['autoInitializePage'] . ';';
}
if (isset($settings['subPageUrlKey'])) {
$output .= "\n\t" . 'jqm.mobile.subPageUrlKey = "' . $settings['subPageUrlKey'] . '";';
}
if (isset($settings['activePageClass'])) {
$output .= "\n\t" . 'jqm.mobile.activePageClass = "' . $settings['activePageClass'] . '";';
}
if (isset($settings['activeBtnClass'])) {
$output .= "\n\t" . 'jqm.mobile.activeBtnClass = "' . $settings['activeBtnClass'] . '";';
}
if (isset($settings['ajaxEnabled'])) {
$output .= "\n\t" . 'jqm.mobile.ajaxEnabled = ' . $settings['ajaxEnabled'] . ';';
}
if (isset($settings['hashListeningEnabled'])) {
$output .= "\n\t" . 'jqm.mobile.hashListeningEnabled = ' . $settings['hashListeningEnabled'] . ';';
}
if (isset($settings['defaultPageTransition'])) {
$output .= "\n\t" . 'jqm.mobile.defaultPageTransition = "' . $settings['defaultPageTransition'] . '";';
}
if (isset($settings['defaultDialogTransition'])) {
$output .= "\n\t" . 'jqm.mobile.defaultDialogTransition = "' . $settings['defaultDialogTransition'] . '";';
}
if (isset($settings['minScrollBack'])) {
$output .= "\n\t" . 'jqm.mobile.minScrollBack = "' . $settings['minScrollBack'] . '";';
}
if (isset($settings['loadingMessage'])) {
$output .= "\n\t" . 'jqm.mobile.loadingMessage = "' . $settings['loadingMessage'] . '";';
}
if (isset($settings['pageLoadErrorMessage'])) {
$output .= "\n\t" . 'jqm.mobile.pageLoadErrorMessage = "' . $settings['pageLoadErrorMessage'] . '";';
}
if (isset($settings['linkBindingEnabled'])) {
$output .= "\n\t" . 'jqm.mobile.linkBindingEnabled = ' . $settings['linkBindingEnabled'] . ';';
}
if (isset($settings['pushStateEnabled'])) {
$output .= "\n\t" . 'jqm.mobile.pushStateEnabled = ' . $settings['pushStateEnabled'] . ';';
}
if (isset($settings['touchOverflowEnabled'])) {
$output .= "\n\t" . 'jqm.mobile.touchOverflowEnabled = ' . $settings['touchOverflowEnabled'] . ';';
}
$output .= "\n});";
}
return $output;
}