Changeset 23409
- Timestamp:
- 2014/05/12 15:52:35 (10 years ago)
- Location:
- branches/version-2_13-dev/data/class
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/SC_Display.php
r23124 r23409 116 116 } 117 117 $this->response->setContentType('text/html'); 118 $this->setView(new SC_ MobileView_Ex());118 $this->setView(new SC_SiteView_Ex(true, DEVICE_TYPE_MOBILE)); 119 119 break; 120 120 case DEVICE_TYPE_SMARTPHONE: 121 $this->setView(new SC_S martphoneView_Ex());121 $this->setView(new SC_SiteView_Ex(true, DEVICE_TYPE_SMARTPHONE)); 122 122 break; 123 123 case DEVICE_TYPE_PC: 124 $this->setView(new SC_SiteView_Ex( ));124 $this->setView(new SC_SiteView_Ex(true, DEVICE_TYPE_PC)); 125 125 break; 126 126 case DEVICE_TYPE_ADMIN: -
branches/version-2_13-dev/data/class/SC_SiteView.php
r23370 r23409 24 24 class SC_SiteView extends SC_View_Ex 25 25 { 26 public function __construct($setPrevURL = true )26 public function __construct($setPrevURL = true, $device = DEVICE_TYPE_PC) 27 27 { 28 28 parent::__construct(); 29 30 switch ($device) { 31 case DEVICE_TYPE_MOBILE: 32 $this->_smarty->template_dir = realpath(MOBILE_TEMPLATE_REALDIR); 33 $this->_smarty->compile_dir = realpath(MOBILE_COMPILE_REALDIR); 34 $this->assignTemplatePath(DEVICE_TYPE_MOBILE); 35 break; 36 37 case DEVICE_TYPE_SMARTPHONE: 38 $this->_smarty->template_dir = realpath(SMARTPHONE_TEMPLATE_REALDIR); 39 $this->_smarty->compile_dir = realpath(SMARTPHONE_COMPILE_REALDIR); 40 $this->assignTemplatePath(DEVICE_TYPE_SMARTPHONE); 41 break; 42 43 case DEVICE_TYPE_PC: 44 $this->_smarty->template_dir = realpath(TEMPLATE_REALDIR); 45 $this->_smarty->compile_dir = realpath(COMPILE_REALDIR); 46 $this->assignTemplatePath(DEVICE_TYPE_PC); 47 break; 48 } 29 49 30 50 if ($setPrevURL) { 31 51 $this->setPrevURL(); 32 52 } 33 }34 53 35 public function init() 36 { 37 parent::init(); 38 39 $this->_smarty->template_dir = realpath(TEMPLATE_REALDIR); 40 $this->_smarty->compile_dir = realpath(COMPILE_REALDIR); 41 42 $this->assignTemplatePath(DEVICE_TYPE_PC); 54 SC_Helper_Plugin_Ex::hook("SC_SiteView_Construct_After", array($this)); 43 55 } 44 56 -
branches/version-2_13-dev/data/class/helper/SC_Helper_Mail.php
r23360 r23409 174 174 $objMailView = null; 175 175 if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) { 176 $objMailView = new SC_ MobileView_Ex();176 $objMailView = new SC_SiteView_Ex(true, DEVICE_TYPE_MOBILE); 177 177 } else { 178 178 $objMailView = new SC_SiteView_Ex();
Note: See TracChangeset
for help on using the changeset viewer.