mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 23:17:02 +03:00
Added knockoutjs components (step 1)
This commit is contained in:
parent
e6438233cf
commit
c2b7632c13
35 changed files with 779 additions and 187 deletions
|
|
@ -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>';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue