Changeset 3727 for branches/2.2/mobile/inc
- Timestamp:
- 02/01/11 14:29:20 (13 years ago)
- Location:
- branches/2.2/mobile/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/mobile/inc/class.mobiletemplate.inc.php
r3690 r3727 12 12 function mobiletemplate(){ 13 13 $this->template = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']); 14 $this->template->set_file(Array('home_t' => 'template.tpl')); 14 15 $template = $GLOBALS['phpgw']->session->appsession('mobile.layout','mobile'); 16 17 $this->template->set_file(Array('home_t' => $template=="mini"?'pc_template.tpl':'template.tpl')); 15 18 $this->template->set_block('home_t', 'mobile_home'); 16 19 $this->template->set_block('home_t','success_message'); … … 26 29 $pre_content = $this->template->get_var("content"); 27 30 $this->template->set_var("content", $pre_content.$content); 31 } 32 33 /* 34 * @function set_home 35 * @abstract Carrega o atributo "home" do template principal para PC. 36 * @author Diógenes Ribeiro Duarte <diogenes.duarte@prodeb.ba.gov.br> 37 */ 38 public function set_home($content) { 39 $pre_content = $this->template->get_var("home"); 40 $this->template->set_var("home", $pre_content.$content); 28 41 } 29 42 … … 68 81 $class=='ui_home' && $method=='index'?$this->print_logout():$this->print_navbar(); 69 82 $filename = 'inc/class.'.$class.'.inc.php'; 83 if($GLOBALS['phpgw']->session->appsession('mobile.layout','mobile')=="mini") { 84 $ui_home = CreateObject('mobile.ui_home'); 85 $ui_home->index(array()); 86 } 70 87 include_once($filename); 71 88 $obj = new $class(); … … 120 137 $var = Array( 121 138 'css' => $this->get_mobile_css(), 139 'title' => lang("expresso mini") 122 140 ); 123 141 $this->template->set_var($var); -
branches/2.2/mobile/inc/class.ui_home.inc.php
r3706 r3727 9 9 var $public_functions = array( 10 10 'index' => true, 11 'search' => true 11 'search' => true, 12 'change_template' => true 12 13 ); 13 14 … … 18 19 $this->db = CreateObject('phpgwapi.db'); 19 20 $this->bocalendar = CreateObject('calendar.bocalendar'); 21 } 22 23 function change_template($params) { 24 25 $GLOBALS['phpgw']->session->appsession('mobile.layout','mobile',$params['template']); 26 header("location: index.php"); 20 27 } 21 28 … … 98 105 $GLOBALS['phpgw_info']['mobiletemplate']->set_error_msg($params["error_message"]); 99 106 $GLOBALS['phpgw_info']['mobiletemplate']->set_success_msg($params["success_message"]); 100 $GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'page')); 107 if($GLOBALS['phpgw']->session->appsession('mobile.layout','mobile')=="mini") 108 $GLOBALS['phpgw_info']['mobiletemplate']->set_home($this->template->fp('out', 'page')); 109 else 110 $GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'page')); 111 101 112 } 102 113
Note: See TracChangeset
for help on using the changeset viewer.