Changeset 3484 for branches/2.2/mobile/inc
- Timestamp:
- 11/10/10 10:05:02 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/mobile/inc/class.mobiletemplate.inc.php
r3346 r3484 83 83 'lang_logout' => lang('Logout'), 84 84 'template_set' => $GLOBALS['phpgw_info']['server']['template_set'], 85 'css' => $this->get_mobile_css(), 85 86 'lang_search' => lang('Search') 86 87 ); 87 88 $this->template->set_var($var); 88 } 89 } 90 91 92 public function get_mobile_css() { 93 $css = "/mobile/templates/%s.css"; 94 95 global $path, $link; 96 97 $path = PHPGW_SERVER_ROOT . str_replace( '/', SEP, $css ); 98 99 $link = '<LINK href="%s" type="text/css" rel="StyleSheet">'; 100 $link = sprintf( $link, 101 "{$GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ]}{$css}" 102 ); 103 104 function _css( $css ) 105 { 106 global $link, $path; 107 108 if ( file_exists( sprintf( $path, str_replace( '/', SEP, $css ) ) ) ) 109 return sprintf( $link, $css ); 110 111 return ''; 112 } 113 114 $css = _css( 'css/mobile' ); 115 $css .= _css( $GLOBALS['phpgw_info']['server']['template_set'].'/css/base'); 116 $css .= _css( $GLOBALS['phpgw_info']['server']['template_set'].'/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']); 117 118 return ( $css ); 119 120 } 121 89 122 } 90 123 ?>
Note: See TracChangeset
for help on using the changeset viewer.