diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index b75c0edef..7588f7198 100755 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -1168,10 +1168,24 @@ class G if(((in_array($browserName, $enabledBrowsers))||(in_array('ALL', $enabledBrowsers)))&&(!(in_array($browserName, $disabledBrowsers)))){ //G::pr($cssFileInfo['__ATTRIBUTES__']['file']); - $output .= file_get_contents ( $baseSkinDirectory . PATH_SEP.'css'.PATH_SEP.$cssFileInfo['__ATTRIBUTES__']['file'] ); + if($cssFileInfo['__ATTRIBUTES__']['file'] == 'rtl.css') { + G::LoadClass('serverConfiguration'); + $oServerConf =& serverConf::getSingleton(); + if (!(defined(SYS_LANG))) { + $syss = explode('://', $_SERVER['HTTP_REFERER']); + $sysObjets = explode('/', $syss['1']); + $sysLang = $sysObjets['2']; + } else { + $sysLang = SYS_LANG; + } + if ($oServerConf->isRtl($sysLang)) { + $output .= file_get_contents ( $baseSkinDirectory . PATH_SEP.'css'.PATH_SEP.$cssFileInfo['__ATTRIBUTES__']['file'] ); + } + } else { + $output .= file_get_contents ( $baseSkinDirectory . PATH_SEP.'css'.PATH_SEP.$cssFileInfo['__ATTRIBUTES__']['file'] ); + } } } - //Remove comments.. $regex = array( "`^([\t\s]+)`ism"=>'', diff --git a/gulliver/system/class.headPublisher.php b/gulliver/system/class.headPublisher.php index db871deae..6d772e1c2 100755 --- a/gulliver/system/class.headPublisher.php +++ b/gulliver/system/class.headPublisher.php @@ -302,7 +302,11 @@ class headPublisher { //$head .= $this->getExtJsStylesheets(); $head .= $this->getExtJsScripts(); $head .= $this->getExtJsVariablesScript(); - + + if (SYS_LANG == 'ar' || SYS_LANG == 'he' || SYS_LANG == 'en') { + $head .= " \n"; + } + return $head; } diff --git a/workflow/engine/classes/class.serverConfiguration.php b/workflow/engine/classes/class.serverConfiguration.php index 38ab499b2..4449010d2 100755 --- a/workflow/engine/classes/class.serverConfiguration.php +++ b/workflow/engine/classes/class.serverConfiguration.php @@ -54,6 +54,7 @@ class serverConf { private $lanDirection; private $lanLanguage; public $workspaces = array(); + public $rtlLang = array('ar','he','es'); public function __construct() { @@ -401,6 +402,15 @@ class serverConf { return null; } } + + function isRtl ($lang = SYS_LANG) { + $lang = substr($lang, 0, 2); + if (in_array($lang, $this->rtlLang)) { + return true; + } else { + return false; + } + } } \ No newline at end of file diff --git a/workflow/engine/skinEngine/base/config.xml b/workflow/engine/skinEngine/base/config.xml index 0c5ccfe87..ddcf56ea6 100755 --- a/workflow/engine/skinEngine/base/config.xml +++ b/workflow/engine/skinEngine/base/config.xml @@ -11,40 +11,45 @@ - + + - + + - + + - + + - + + \ No newline at end of file diff --git a/workflow/engine/skinEngine/base/layout-extjs.html b/workflow/engine/skinEngine/base/layout-extjs.html index fb5e52781..ef3b7b5cf 100755 --- a/workflow/engine/skinEngine/base/layout-extjs.html +++ b/workflow/engine/skinEngine/base/layout-extjs.html @@ -1,10 +1,13 @@ - + +{typeDocument} + + {header} - + {bodyTemplate} \ No newline at end of file diff --git a/workflow/engine/skinEngine/skinEngine.php b/workflow/engine/skinEngine/skinEngine.php index d464d2c77..beb9b595f 100755 --- a/workflow/engine/skinEngine/skinEngine.php +++ b/workflow/engine/skinEngine/skinEngine.php @@ -240,13 +240,34 @@ class SkinEngine $templateFile = $this->layoutFile['dirname'] . PATH_SEP . $this->layoutFileExtjs['basename']; } - + + $typeDocument = ''; + $template = new TemplatePower($templateFile); $template->prepare(); $template->assign('header', $header); $template->assign('styles', $styles); $template->assign('bodyTemplate', $body); - + + $oServerConf =& serverConf::getSingleton(); + if ($oServerConf->isRtl(SYS_LANG)) { + $template->assign('dirBody', 'dir="RTL"'); + $iexplores = array( + 'IE=10' => '(MSIE 10\.[0-9]+)', + 'IE=9' => '(MSIE 9\.[0-9]+)', + 'IE=8' => '(MSIE 8\.[0-9]+)', + 'IE=7' => '(MSIE 7\.[0-9]+)', + 'IE=6' => '(MSIE 6\.[0-9]+)' + ); + + foreach ($iexplores as $browser => $pattern) { + if (preg_match('/'.$pattern.'/', $_SERVER['HTTP_USER_AGENT'])) { + $typeDocument = ''; + } + } + } + + $template->assign('typeDocument', $typeDocument); echo $template->getOutputContent(); } diff --git a/workflow/engine/skinEngine/uxmodern/config.xml b/workflow/engine/skinEngine/uxmodern/config.xml index 70fce06c2..fa23e32a8 100644 --- a/workflow/engine/skinEngine/uxmodern/config.xml +++ b/workflow/engine/skinEngine/uxmodern/config.xml @@ -11,6 +11,7 @@ + @@ -19,6 +20,7 @@ + @@ -27,18 +29,21 @@ + + + diff --git a/workflow/engine/skinEngine/uxmodern/layout-extjs.html b/workflow/engine/skinEngine/uxmodern/layout-extjs.html index 6c7ba6b8e..70aff481d 100644 --- a/workflow/engine/skinEngine/uxmodern/layout-extjs.html +++ b/workflow/engine/skinEngine/uxmodern/layout-extjs.html @@ -1,5 +1,5 @@ - +{typeDocument} @@ -7,7 +7,8 @@ {header} - + {bodyTemplate} +cochalo \ No newline at end of file