Minor internal layout changes
This commit is contained in:
@@ -34,18 +34,13 @@ class lnApp_Script extends HTMLRender {
|
||||
$foutput = $soutput = '';
|
||||
$mediapath = Route::get(static::$_media_path);
|
||||
|
||||
$i = $j = 0;
|
||||
foreach (static::$_data as $value) {
|
||||
switch ($value['type']) {
|
||||
case 'file':
|
||||
$foutput .= HTML::script($mediapath->uri(array('file'=>$value['data'])));
|
||||
if ($i++)
|
||||
$foutput .= static::$_spacer;
|
||||
break;
|
||||
case 'stdin':
|
||||
$soutput .= sprintf("<script type=\"text/javascript\">//<![CDATA[\n%s\n//]]></script>",$value['data']);
|
||||
if ($j++)
|
||||
$soutput .= static::$_spacer;
|
||||
break;
|
||||
default:
|
||||
throw new Kohana_Exception('Unknown style type :type',array(':type'=>$value['type']));
|
||||
|
@@ -14,6 +14,7 @@ class lnApp_Style extends HTMLRender {
|
||||
protected static $_data = array();
|
||||
protected static $_spacer = "\n";
|
||||
protected static $_required_keys = array('type','data');
|
||||
protected static $_unique_vals = array('file'=>'type');
|
||||
|
||||
/**
|
||||
* Return an instance of this class
|
||||
@@ -33,7 +34,6 @@ class lnApp_Style extends HTMLRender {
|
||||
$foutput = $soutput = '';
|
||||
$mediapath = Route::get(static::$_media_path);
|
||||
|
||||
$i = $j = 0;
|
||||
foreach (static::$_data as $value) {
|
||||
switch ($value['type']) {
|
||||
case 'file':
|
||||
@@ -42,8 +42,6 @@ class lnApp_Style extends HTMLRender {
|
||||
break;
|
||||
case 'stdin':
|
||||
$soutput .= sprintf("<style type=\"text/css\">%s</style>",$value['data']);
|
||||
if ($j++)
|
||||
$soutput .= static::$_spacer;
|
||||
break;
|
||||
default:
|
||||
throw new Kohana_Exception('Unknown style type :type',array(':type'=>$value['type']));
|
||||
|
Reference in New Issue
Block a user