Commits

Christoffer Niska  committed f042f0f

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

  • Participants
  • Parent commits efe5468
  • Branches 1.0.0-wip

Comments (0)

Files changed (5)

File .idea/inspectionProfiles/Project_Default.xml

+<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>

File .idea/inspectionProfiles/profiles_settings.xml

+<component name="InspectionProjectProfileManager">
+  <settings>
+    <option name="PROJECT_PROFILE" value="Project Default" />
+    <option name="USE_PROJECT_PROFILE" value="true" />
+    <version value="1.0" />
+  </settings>
+</component>

File assets/css/bootstrap-yii.css

+/*
+	Forms
+*/
+
+span.required {
+	color: #F00;
+}
+
+/*
+	Grid view
+*/
+
+.grid-view {
+	padding-top: 20px;
+}
+
+.grid-view-loading {
+	background: url(../img/loading.gif) no-repeat;
+}
+
+.grid-view table.items th a {
+	display: block;
+	position: relative;
+}
+
+.grid-view table.items th a .caret {
+	display: none;
+	position: absolute;
+	right: 5px;
+	top: 7px;
+}
+
+.grid-view table.items th a.asc .caret {
+	display: block;
+}
+
+.grid-view table.items th a.desc .caret {
+	border-bottom: 4px solid #000;
+	border-top: none;
+	display: block;
+}
+
+.grid-view table.items tr.selected td {
+	background: #EEE;
+}
+
+.grid-view .button-column {
+	text-align: center;
+	width: 50px;
+}
+
+.grid-view .checkbox-column {
+	width: 15px;
+}
+
+.grid-view .summary {
+	margin-bottom: 5px;
+	text-align: right;
+}
+
+.grid-view .pager {
+	margin-top: 5px;
+}
+
+.grid-view .empty {
+	font-style: italic;
+}
+
+.grid-view .filters .filter-container {
+	padding: 0 10px 0 0;
+}
+
+.grid-view .filters input,
+.grid-view .filters select {
+	margin-bottom: 0;
+	width: 100%;
+}
+
+/*
+	List view
+*/
+
+.list-view-loading {
+	background: url(../img/loading.gif) no-repeat;
+}
+
+.list-view .summary {
+	margin-bottom: 5px;
+	text-align: right;
+}
+
+.list-view .pager {
+	margin-top: 5px;
+}
+
+.list-view .sorter ul {
+	display: inline;
+	list-style: none outside none;
+	margin: 0;
+	padding: 0;
+}
+
+.list-view .sorter li {
+	display: inline;
+	margin: 0 0 0 5px;
+	padding: 0;
+}
+
+.list-view .sorter a .caret {
+	position: absolute;
+	right: 5px;
+	top: 7px;
+}
+
+.list-view .sorter a.desc .caret {
+	border-bottom: 4px solid #000;
+	border-top: none;
+}
+
+/*
+	Detail view
+*/
+
+table.detail-view .null {
+	color: #FFC0CB;
+}
+
+table.detail-view th {
+	text-align: right;
+	width: 160px;
+}

File assets/css/yii-bootstrap.css

-/*
-	Forms
-*/
-
-span.required {
-	color: #F00;
-}
-
-/*
-	Grid view
-*/
-
-.grid-view {
-	padding-top: 20px;
-}
-
-.grid-view-loading {
-	background: url(../img/loading.gif) no-repeat;
-}
-
-.grid-view table.items th a {
-	display: block;
-	position: relative;
-}
-
-.grid-view table.items th a .caret {
-	display: none;
-	position: absolute;
-	right: 5px;
-	top: 7px;
-}
-
-.grid-view table.items th a.asc .caret {
-	display: block;
-}
-
-.grid-view table.items th a.desc .caret {
-	border-bottom: 4px solid #000;
-	border-top: none;
-	display: block;
-}
-
-.grid-view table.items tr.selected td {
-	background: #EEE;
-}
-
-.grid-view .button-column {
-	text-align: center;
-	width: 50px;
-}
-
-.grid-view .checkbox-column {
-	width: 15px;
-}
-
-.grid-view .summary {
-	margin-bottom: 5px;
-	text-align: right;
-}
-
-.grid-view .pager {
-	margin-top: 5px;
-}
-
-.grid-view .empty {
-	font-style: italic;
-}
-
-.grid-view .filters .filter-container {
-	padding: 0 10px 0 0;
-}
-
-.grid-view .filters input,
-.grid-view .filters select {
-	margin-bottom: 0;
-	width: 100%;
-}
-
-/*
-	List view
-*/
-
-.list-view-loading {
-	background: url(../img/loading.gif) no-repeat;
-}
-
-.list-view .summary {
-	margin-bottom: 5px;
-	text-align: right;
-}
-
-.list-view .pager {
-	margin-top: 5px;
-}
-
-.list-view .sorter ul {
-	display: inline;
-	list-style: none outside none;
-	margin: 0;
-	padding: 0;
-}
-
-.list-view .sorter li {
-	display: inline;
-	margin: 0 0 0 5px;
-	padding: 0;
-}
-
-.list-view .sorter a .caret {
-	position: absolute;
-	right: 5px;
-	top: 7px;
-}
-
-.list-view .sorter a.desc .caret {
-	border-bottom: 4px solid #000;
-	border-top: none;
-}
-
-/*
-	Detail view
-*/
-
-table.detail-view .null {
-	color: #FFC0CB;
-}
-
-table.detail-view th {
-	text-align: right;
-	width: 160px;
-}

File components/Bootstrap.php

 		$this->registerYiiCss();
 
 		if ($this->enableJS)
-		{
-			Yii::app()->clientScript->registerCoreScript('jquery');
 			$this->registerCorePlugins();
-		}
 	}
 
 	/**
 	 */
 	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');
 	}
 
 	/**
 	 */
 	public function registerYiiCss()
 	{
-		Yii::app()->clientScript->registerCssFile($this->getAssetsUrl().'/css/yii-bootstrap.css');
+		Yii::app()->clientScript->registerCssFile($this->getAssetsUrl().'/css/bootstrap-yii.css');
 	}
 
 	/**
 	 */
 	public function registerCorePlugins()
 	{
+		Yii::app()->clientScript->registerCoreScript('jquery');
+
 		if (!$this->isPluginDisabled(self::PLUGIN_TRANSITION))
 			$this->enableTransitions();