Commit 1b479edd by Crisu83

added viewport meta tag for responsive layouts (fixes #38)

parent c2503598
<component name="InspectionProjectProfileManager">
<profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" />
<option name="myLocal" value="false" />
<inspection_tool class="PhpDocMissingReturnTagInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
</profile>
</component>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="Project Default" />
<option name="USE_PROJECT_PROFILE" value="true" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
...@@ -74,10 +74,7 @@ class Bootstrap extends CApplicationComponent ...@@ -74,10 +74,7 @@ class Bootstrap extends CApplicationComponent
$this->registerYiiCss(); $this->registerYiiCss();
if ($this->enableJS) if ($this->enableJS)
{
Yii::app()->clientScript->registerCoreScript('jquery');
$this->registerCorePlugins(); $this->registerCorePlugins();
}
} }
/** /**
...@@ -94,7 +91,10 @@ class Bootstrap extends CApplicationComponent ...@@ -94,7 +91,10 @@ class Bootstrap extends CApplicationComponent
*/ */
public function registerResponsiveCss() public function registerResponsiveCss()
{ {
Yii::app()->clientScript->registerCssFile($this->getAssetsUrl().'/css/bootstrap-responsive.min.css'); /** @var CClientScript $cs */
$cs = Yii::app()->getClientScript();
$cs->registerMetaTag('width=device-width, initial-scale=1.0', 'viewport');
$cs->registerCssFile($this->getAssetsUrl().'/css/bootstrap-responsive.min.css');
} }
/** /**
...@@ -103,7 +103,7 @@ class Bootstrap extends CApplicationComponent ...@@ -103,7 +103,7 @@ class Bootstrap extends CApplicationComponent
*/ */
public function registerYiiCss() public function registerYiiCss()
{ {
Yii::app()->clientScript->registerCssFile($this->getAssetsUrl().'/css/yii-bootstrap.css'); Yii::app()->clientScript->registerCssFile($this->getAssetsUrl().'/css/bootstrap-yii.css');
} }
/** /**
...@@ -112,6 +112,8 @@ class Bootstrap extends CApplicationComponent ...@@ -112,6 +112,8 @@ class Bootstrap extends CApplicationComponent
*/ */
public function registerCorePlugins() public function registerCorePlugins()
{ {
Yii::app()->clientScript->registerCoreScript('jquery');
if (!$this->isPluginDisabled(self::PLUGIN_TRANSITION)) if (!$this->isPluginDisabled(self::PLUGIN_TRANSITION))
$this->enableTransitions(); $this->enableTransitions();
......
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