Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
Yii Bootstrap
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Common
Yii Bootstrap
Commits
deb80c5a
Commit
deb80c5a
authored
Oct 18, 2013
by
Hikonobu Kurihara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated components.Bootstrap
YII_DEVでない場合、minifyされたファイルを読み込むようにした。2.1.0の実装を流用した。
parent
6e2475d7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
Bootstrap.php
components/Bootstrap.php
+8
-3
No files found.
components/Bootstrap.php
View file @
deb80c5a
...
@@ -97,10 +97,13 @@ class Bootstrap extends CApplicationComponent
...
@@ -97,10 +97,13 @@ class Bootstrap extends CApplicationComponent
/**
/**
* Registers the Bootstrap CSS.
* Registers the Bootstrap CSS.
*
* stolen from 2.1.0
*/
*/
public
function
registerCoreCss
()
public
function
registerCoreCss
()
{
{
Yii
::
app
()
->
clientScript
->
registerCssFile
(
$this
->
getAssetsUrl
()
.
'/css/bootstrap.css'
);
$filename
=
YII_DEBUG
?
'bootstrap.css'
:
'bootstrap.min.css'
;
Yii
::
app
()
->
clientScript
->
registerCssFile
(
$this
->
getAssetsUrl
()
.
'/css/'
.
$filename
);
}
}
/**
/**
...
@@ -112,7 +115,8 @@ class Bootstrap extends CApplicationComponent
...
@@ -112,7 +115,8 @@ class Bootstrap extends CApplicationComponent
/** @var CClientScript $cs */
/** @var CClientScript $cs */
$cs
=
Yii
::
app
()
->
getClientScript
();
$cs
=
Yii
::
app
()
->
getClientScript
();
$cs
->
registerMetaTag
(
'width=device-width, initial-scale=1.0'
,
'viewport'
);
$cs
->
registerMetaTag
(
'width=device-width, initial-scale=1.0'
,
'viewport'
);
$cs
->
registerCssFile
(
$this
->
getAssetsUrl
()
.
'/css/bootstrap-responsive.css'
);
$filename
=
YII_DEBUG
?
'bootstrap-responsive.css'
:
'bootstrap-responsive.min.css'
;
$cs
->
registerCssFile
(
$this
->
getAssetsUrl
()
.
'/css/'
.
$filename
);
}
}
/**
/**
...
@@ -145,7 +149,8 @@ class Bootstrap extends CApplicationComponent
...
@@ -145,7 +149,8 @@ class Bootstrap extends CApplicationComponent
/** @var CClientScript $cs */
/** @var CClientScript $cs */
$cs
=
Yii
::
app
()
->
getClientScript
();
$cs
=
Yii
::
app
()
->
getClientScript
();
$cs
->
registerCoreScript
(
'jquery'
);
$cs
->
registerCoreScript
(
'jquery'
);
$cs
->
registerScriptFile
(
$this
->
getAssetsUrl
()
.
'/js/bootstrap.js'
,
$position
);
$filename
=
YII_DEBUG
?
'bootstrap.js'
:
'bootstrap.min.js'
;
$cs
->
registerScriptFile
(
$this
->
getAssetsUrl
()
.
'/js/'
.
$filename
,
$position
);
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment