Added knockoutjs components (step 1)

This commit is contained in:
RainLoop Team 2014-10-29 02:05:50 +04:00
parent e6438233cf
commit c2b7632c13
35 changed files with 779 additions and 187 deletions

View file

@ -245,10 +245,12 @@ class Utils
/**
* @param string $sDirName
* @param \RainLoop\Actions $oAction
* @param string $sNameSuffix = ''
*
* @return string
*/
public static function CompileTemplates($sDirName, $oAction)
public static function CompileTemplates($sDirName, $oAction, $sNameSuffix = '')
{
$sResult = '';
if (\file_exists($sDirName))
@ -257,7 +259,7 @@ class Utils
foreach ($aList as $sName)
{
$sTemplateName = \substr($sName, 0, -5);
$sTemplateName = \substr($sName, 0, -5).$sNameSuffix;
$sResult .= '<script id="'.\preg_replace('/[^a-zA-Z0-9]/', '', $sTemplateName).'" type="text/html" data-cfasync="false">'.
$oAction->ProcessTemplate($sTemplateName, \file_get_contents($sDirName.'/'.$sName)).'</script>';
}