From c47af38f5170e6aa2332d8ccbacaf742bf53cc50 Mon Sep 17 00:00:00 2001 From: Anton Degtyarev Date: Wed, 16 Apr 2014 14:59:15 +0400 Subject: [PATCH] error fix --- EClientScriptBoost.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/EClientScriptBoost.php b/EClientScriptBoost.php index 1954b77..dbc805f 100644 --- a/EClientScriptBoost.php +++ b/EClientScriptBoost.php @@ -67,6 +67,7 @@ class EClientScriptBoost extends CClientScript 'TbBulkActions#', 'TbEditableField#', 'TbEditable#', + 'TbGridView#', 'TbSelect2#', 'Yii2Debug#', 'Yii.CHtml.#', @@ -112,7 +113,7 @@ protected function registerContent($type, $id, $content, $registerParam=null, ar $debug = $this->debug === null ? YII_DEBUG : $this->debug; // Check if this script is in the exceptions - if so, skip caching. - // TODO: do we really need skipList for CSS? + // Should be checked for both script and CSS content $skip = false; foreach($this->skipList as $s) { $skip|=strpos($id, $s) === 0; @@ -121,7 +122,12 @@ protected function registerContent($type, $id, $content, $registerParam=null, ar // Do not use cache for content with IDs listed in {@link $this->skipList} if ($skip) - $compressed = EScriptBoost::minifyJs($content); + { + if ($type == 'script') + $compressed = EScriptBoost::minifyJs($content); + else if ($type == 'css') + $compressed = EScriptBoost::minifyCss($content); + } else $compressed = Yii::app()->cache->get($id);