diff options
| author | Antonio Gallo <tonicucoz@gmail.com> | 2011-12-27 07:27:36 +0000 | 
|---|---|---|
| committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-12-27 07:27:36 +0000 | 
| commit | 7bda3432520d07d31220fc66b3e552e1eed46f82 (patch) | |
| tree | 5d9381cd3eb10999db4088ffa931a334f8bd4dcc /h-source/Application/Controllers/BaseController.php | |
| parent | b5d776bc5c8261ac75a74ed3070ca13a6eb741ca (diff) | |
mobile: added language dialog
Diffstat (limited to 'h-source/Application/Controllers/BaseController.php')
| -rw-r--r-- | h-source/Application/Controllers/BaseController.php | 16 | 
1 files changed, 11 insertions, 5 deletions
| diff --git a/h-source/Application/Controllers/BaseController.php b/h-source/Application/Controllers/BaseController.php index 69b47ac..7bd8027 100644 --- a/h-source/Application/Controllers/BaseController.php +++ b/h-source/Application/Controllers/BaseController.php @@ -100,13 +100,14 @@ class BaseController extends Controller  			Lang::$current = $data['lang'];  		} +		$data['langIcon'] = Lang::getIcon(Lang::$current); +		$data['langLabel'] = Lang::getLabel(Lang::$current); +		  		//set desktop or mobile version  		Version::set();  		//subfolder of the Views folder where to look for view files  		Params::$viewSubfolder = Version::getViewSubfolder(); -		 -		  		$data['tm'] = $this->_topMenuClasses;  		$this->_queryString = $this->sanitizeQueryString($this->_queryString); @@ -240,15 +241,20 @@ class BaseController extends Controller  	{  		$status = $this->_queryString;  		$cPage = $this->querySanitized ? $this->currPage : $this->baseUrl."/home/index"; -		$link = "<ul class='languages_link_box'>\n"; +		 +		$mobileDataRole = Version::get() === "mobile" ? "data-role='listview'" : null; +		 +		$link = "<ul $mobileDataRole class='languages_link_box'>\n";  		foreach (Lang::$complete as $abbr => $fullName)  		{  			$linkClass = (strcmp($abbr,$lang) === 0) ? "class='current_lang'" : null;  			$status[0] = $abbr;  			$href = Url::createUrl($status);  			$fullNameArray = explode(',',$fullName); -			$text = "<img src='".$this->baseUrl."/Public/Img/Famfamfam/".$fullNameArray[0]."'><span>".$fullNameArray[1]."</span>"; -			$link .= "\t<li><a $linkClass href='".$cPage.$href."'>$text</a></li>\n"; +			$text = "<img class='ui-li-icon' src='".$this->baseUrl."/Public/Img/Famfamfam/".$fullNameArray[0]."'><span>".$fullNameArray[1]."</span>"; + +			$mobileRel = Version::get() === "mobile" ? "rel='external'" : null; +			$link .= "\t<li><a $mobileRel $linkClass href='".$cPage.$href."'>$text</a></li>\n";  		}  		$link .= "</ul>\n";  		return $link; | 
