Commit d9a31fea by Crisu83

upgraded bootstrap.js to 2.1.0-wip and update the demo

parent a45375e3
......@@ -9,7 +9,6 @@
/**
* Bootstrap application component.
* Used for registering Bootstrap core functionality.
*/
class Bootstrap extends CApplicationComponent
{
......@@ -26,6 +25,7 @@ class Bootstrap extends CApplicationComponent
const PLUGIN_TOOLTIP = 'tooltip';
const PLUGIN_TRANSITION = 'transition';
const PLUGIN_TYPEAHEAD = 'typeahead';
// todo: add the affix plugin in version 2.1.0
/**
* @var boolean whether to register the Bootstrap core CSS (bootstrap.min.css).
......@@ -80,16 +80,16 @@ class Bootstrap extends CApplicationComponent
if (Yii::app() instanceof CConsoleApplication)
return;
if ($this->coreCss)
$this->registerCss();
if ($this->coreCss !== false)
$this->registerCoreCss();
if ($this->responsiveCss)
if ($this->responsiveCss !== false)
$this->registerResponsiveCss();
if ($this->yiiCss)
if ($this->yiiCss !== false)
$this->registerYiiCss();
if ($this->enableJS)
if ($this->enableJS !== false)
$this->registerCoreScripts();
parent::init();
......@@ -98,7 +98,7 @@ class Bootstrap extends CApplicationComponent
/**
* Registers the Bootstrap CSS.
*/
public function registerCss()
public function registerCoreCss()
{
Yii::app()->clientScript->registerCssFile($this->getAssetsUrl().'/css/bootstrap.css');
}
......@@ -130,7 +130,7 @@ class Bootstrap extends CApplicationComponent
*/
public function registerCoreScripts()
{
$this->registerJS();
$this->registerJS(Yii::app()->clientScript->coreScriptPosition);
$this->registerTooltip();
$this->registerPopover();
}
......@@ -145,7 +145,7 @@ class Bootstrap extends CApplicationComponent
/** @var CClientScript $cs */
$cs = Yii::app()->getClientScript();
$cs->registerCoreScript('jquery');
$cs->registerScriptFile($this->getAssetsUrl().'/js/bootstrap.min.js', $position);
$cs->registerScriptFile($this->getAssetsUrl().'/js/bootstrap.js', $position);
}
/**
......@@ -331,7 +331,7 @@ class Bootstrap extends CApplicationComponent
}
/**
* Returns the version number.
* Returns the extension version number.
* @return string the version
*/
public function getVersion()
......
......@@ -86,12 +86,10 @@ class SiteController extends Controller
);
$rawData = array();
for ($i = 0; $i < 100; $i++)
for ($i = 0; $i < 8; $i++)
$rawData[] = array('id'=>$i + 1);
$listDataProvider = new CArrayDataProvider($rawData, array(
'pagination'=>array('pageSize'=>8),
));
$listDataProvider = new CArrayDataProvider($rawData);
$phpLighter = new CTextHighlighter();
$phpLighter->language = 'PHP';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment